@Override protected void resetEditorFrom(@NotNull K2JSRunConfiguration configuration) { htmlChooseFile.setText( toSystemIndependentName(configuration.settings().getPageToOpenFilePath())); browserComboBox.setSelectedItem(configuration.settings().getBrowserFamily()); generatedChooseFile.setText( toSystemIndependentName(configuration.settings().getGeneratedFilePath())); openInBrowserCheckBox.setSelected( configuration.settings().isShouldOpenInBrowserAfterTranslation()); }
@Override protected void applyEditorTo(@NotNull K2JSRunConfiguration configuration) throws ConfigurationException { K2JSConfigurationSettings settings = configuration.settings(); settings.setPageToOpenFilePath(toSystemIndependentName(htmlChooseFile.getText())); Object item = browserComboBox.getSelectedItem(); if (item instanceof BrowsersConfiguration.BrowserFamily) { settings.setBrowserFamily((BrowsersConfiguration.BrowserFamily) item); } settings.setGeneratedFilePath(toSystemIndependentName(generatedChooseFile.getText())); settings.setShouldOpenInBrowserAfterTranslation(openInBrowserCheckBox.isSelected()); }