private void restoreValues() {
        for (StorageKey key : StorageKey.values()) {
            if (!storageValues.containsKey(key)) {
                continue;
            }

            switch (key) {
                case WINDOW_STATE:
                    setState(Integer.valueOf(storageValues.get(key)));
                    break;
                case WINDOW_HEIGHT:
                    String height = storageValues.get(StorageKey.WINDOW_HEIGHT);
                    String width = storageValues.get(StorageKey.WINDOW_WIDTH);

                    if (height != null && width != null) {
                        setPreferredSize(new Dimension(Integer.parseInt(width), Integer.parseInt(height)));
                    }
                    break;
                case WINDOW_POSITION_X:
                    String xPos = storageValues.get(StorageKey.WINDOW_POSITION_X);
                    String yPos = storageValues.get(StorageKey.WINDOW_POSITION_Y);

                    if (xPos != null && yPos != null) {
                        setLocation(Integer.parseInt(xPos), Integer.parseInt(yPos));
                    }
                    break;
                case GRAMMAR_FILE_PATH:
                    grammarFileTextField.setText(storageValues.get(key));
                    Components.moveCurserToEndOfTextField(grammarFileTextField);
                    grammarSaveButton.setEnabled(true);

                    if (grammarFileTextField.getText().length() > 0) {
                        grammarReloadButton.setEnabled(true);
                        grammarReloadButton.doClick();
                    }
                    break;
                case INITIALISATION_FILE_PATH:
                    initialisationFileTextField.setText(storageValues.get(key));
                    Components.moveCurserToEndOfTextField(initialisationFileTextField);
                    initialisationSaveButton.setEnabled(true);

                    if (initialisationFileTextField.getText().length() > 0) {
                        initialisationReloadButton.setEnabled(true);
                        initialisationReloadButton.doClick();
                    }
                    break;
                case EDITOR_FONT_SIZE:
                    setEditorFontSizes(Integer.valueOf(storageValues.get(key)));
                    break;
            }
        }
    }