@Override public void disposeUIResources() { if (!myUiInitialized) return; final PropertiesComponent propertiesComponent = PropertiesComponent.getInstance(myProject); propertiesComponent.setValue("project.structure.last.edited", myUiState.lastEditedConfigurable); propertiesComponent.setValue( "project.structure.proportion", String.valueOf(myUiState.proportion)); propertiesComponent.setValue( "project.structure.side.proportion", String.valueOf(myUiState.sideProportion)); myWasUiDisposed = true; myUiState.proportion = mySplitter.getProportion(); saveSideProportion(); myContext.getDaemonAnalyzer().stop(); for (Configurable each : myName2Config) { each.disposeUIResources(); } myContext.clear(); myName2Config.clear(); myModuleConfigurator.getFacetsConfigurator().clearMaps(); Disposer.dispose(myErrorsComponent); myUiInitialized = false; }
@Override protected void dispose(Configurable configurable) { if (configurable != null) { long time = System.currentTimeMillis(); try { configurable.disposeUIResources(); } catch (Exception unexpected) { LOG.error("cannot dispose configurable", unexpected); } finally { warn(configurable, "dispose", time); } } }
private void editColorsAndFonts() { final String toConfigure = getSelectedType().getSeverity(null).myName; doOKAction(); myOptionsList.clearSelection(); final DataContext dataContext = DataManager.getInstance().getDataContext(myPanel); final OptionsEditor optionsEditor = OptionsEditor.KEY.getData(dataContext); if (optionsEditor != null) { final ColorAndFontOptions colorAndFontOptions = optionsEditor.findConfigurable(ColorAndFontOptions.class); assert colorAndFontOptions != null; final SearchableConfigurable javaPage = colorAndFontOptions.findSubConfigurable(InspectionColorSettingsPage.class); LOG.assertTrue(javaPage != null); optionsEditor .clearSearchAndSelect(javaPage) .doWhenDone( new Runnable() { @Override public void run() { final Runnable runnable = javaPage.enableSearch(toConfigure); if (runnable != null) { SwingUtilities.invokeLater(runnable); } } }); } else { ColorAndFontOptions colorAndFontOptions = new ColorAndFontOptions(); final Configurable[] configurables = colorAndFontOptions.buildConfigurables(); try { final SearchableConfigurable javaPage = colorAndFontOptions.findSubConfigurable(InspectionColorSettingsPage.class); LOG.assertTrue(javaPage != null); ShowSettingsUtil.getInstance() .editConfigurable(CommonDataKeys.PROJECT.getData(dataContext), javaPage); } finally { for (Configurable configurable : configurables) { configurable.disposeUIResources(); } colorAndFontOptions.disposeUIResources(); } } }
public void disposeUIResources() { myConfigurable.disposeUIResources(); }