예제 #1
0
 public ModuleConfigurable(
     ModulesConfigurator modulesConfigurator, Module module, final Runnable updateTree) {
   super(true, updateTree);
   myModule = module;
   myModuleName = myModule.getName();
   myConfigurator = modulesConfigurator;
   myContext = ModuleStructureConfigurable.getInstance(myModule.getProject()).getContext();
   myProjectStructureElement = new ModuleProjectStructureElement(myContext, myModule);
 }
예제 #2
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;
  }
예제 #3
0
 public ActionCallback selectOrderEntry(
     @NotNull final Module module, @Nullable final OrderEntry orderEntry) {
   return ModuleStructureConfigurable.getInstance(myProject).selectOrderEntry(module, orderEntry);
 }
예제 #4
0
 private void addModulesConfig() {
   myModulesConfig = ModuleStructureConfigurable.getInstance(myProject);
   addConfigurable(myModulesConfig, ConfigurableId.MODULES);
 }