public void reset() { basePackageField.setText(myData.getBasePackage()); myFSCRadioButton.setSelected(myData.getFsc()); myRunSeparateCompilerRadioButton.setSelected(!myData.getFsc()); updateLibrariesList(); setCompilerLibraryById( new LibraryId(myData.getCompilerLibraryName(), myData.getCompilerLibraryLevel())); myMaximumHeapSize.setText(Integer.toString(myData.getMaximumHeapSize())); myVmParameters.setText(myData.getVmOptions()); myEnableWarnings.setSelected(myData.getWarnings()); myDeprecationWarnings.setSelected(myData.getDeprecationWarnings()); myUncheckedWarnings.setSelected(myData.getUncheckedWarnings()); myOptimiseBytecode.setSelected(myData.getOptimiseBytecode()); myExplainTypeErrors.setSelected(myData.getExplainTypeErrors()); myEnableContinuations.setSelected(myData.getContinuations()); myDebuggingInfoLevel.setSelectedItem(myData.getDebuggingInfoLevel()); myCompilerOptions.setText(myData.getCompilerOptions()); myPlugins = new ArrayList( CompilerPlugin.fromPaths(myData.getPluginPaths(), myEditorContext.getModule())); getPluginsModel().setItems(myPlugins); }
private void update(ConfigurationData data) { data.setBasePackage(basePackageField.getText()); data.setFsc(myFSCRadioButton.isSelected()); data.setCompilerLibraryName(getCompilerLibraryName()); data.setCompilerLibraryLevel(getCompilerLibraryLevel()); try { data.setMaximumHeapSize(Integer.parseInt(myMaximumHeapSize.getText().trim())); } catch (NumberFormatException e) { data.setMaximumHeapSize(myData.getMaximumHeapSize()); } data.setVmOptions(myVmParameters.getText().trim()); data.setWarnings(myEnableWarnings.isSelected()); data.setDeprecationWarnings(myDeprecationWarnings.isSelected()); data.setUncheckedWarnings(myUncheckedWarnings.isSelected()); data.setOptimiseBytecode(myOptimiseBytecode.isSelected()); data.setExplainTypeErrors(myExplainTypeErrors.isSelected()); data.setContinuations(myEnableContinuations.isSelected()); data.setDebuggingInfoLevel((DebuggingInfoLevel) myDebuggingInfoLevel.getSelectedItem()); data.setCompilerOptions(myCompilerOptions.getText().trim()); data.setPluginPaths(CompilerPlugin.toPaths(myPlugins)); updateCheckboxesState(); }