Exemplo n.º 1
0
  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;
  }
Exemplo n.º 2
0
 public ActionCallback selectOrderEntry(
     @NotNull final Module module, @Nullable final OrderEntry orderEntry) {
   return ModuleStructureConfigurable.getInstance(myProject).selectOrderEntry(module, orderEntry);
 }
Exemplo n.º 3
0
 private void addModulesConfig() {
   myModulesConfig = ModuleStructureConfigurable.getInstance(myProject);
   addConfigurable(myModulesConfig, ConfigurableId.MODULES);
 }