public void setCompilerLibraryById(LibraryId id) { if (id.isEmpty()) { // myCompilerLibrary.addItem(null); myCompilerLibrary.setSelectedItem(null); } else { LibraryDescriptor descriptor = findLibraryDescriptorFor(id); if (descriptor == null) { LibraryDescriptor newId = LibraryDescriptor.createFor(id); myCompilerLibrary.addItem(newId); myCompilerLibrary.setSelectedItem(newId); } else { myCompilerLibrary.setSelectedItem(descriptor); } } }
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); }