@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; }
public ProjectStructureConfigurable( final Project project, final ProjectLibrariesConfigurable projectLibrariesConfigurable, final GlobalLibrariesConfigurable globalLibrariesConfigurable, final ModuleStructureConfigurable moduleStructureConfigurable, FacetStructureConfigurable facetStructureConfigurable, ArtifactsStructureConfigurable artifactsStructureConfigurable) { myProject = project; myFacetStructureConfigurable = facetStructureConfigurable; myArtifactsStructureConfigurable = artifactsStructureConfigurable; myModuleConfigurator = new ModulesConfigurator(myProject); myContext = new StructureConfigurableContext(myProject, myModuleConfigurator); myModuleConfigurator.setContext(myContext); myProjectLibrariesConfig = projectLibrariesConfigurable; myGlobalLibrariesConfig = globalLibrariesConfigurable; myModulesConfig = moduleStructureConfigurable; myProjectLibrariesConfig.init(myContext); myGlobalLibrariesConfig.init(myContext); myModulesConfig.init(myContext); myFacetStructureConfigurable.init(myContext); if (!project.isDefault()) { myArtifactsStructureConfigurable.init( myContext, myModulesConfig, myProjectLibrariesConfig, myGlobalLibrariesConfig); } final PropertiesComponent propertiesComponent = PropertiesComponent.getInstance(myProject); myUiState.lastEditedConfigurable = propertiesComponent.getValue("project.structure.last.edited"); final String proportion = propertiesComponent.getValue("project.structure.proportion"); myUiState.proportion = proportion != null ? Float.parseFloat(proportion) : 0; final String sideProportion = propertiesComponent.getValue("project.structure.side.proportion"); myUiState.sideProportion = sideProportion != null ? Float.parseFloat(sideProportion) : 0; }