当前位置: 首页>>代码示例>>Java>>正文


Java ProjectStructureConfigurable.getInstance方法代码示例

本文整理汇总了Java中com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java ProjectStructureConfigurable.getInstance方法的具体用法?Java ProjectStructureConfigurable.getInstance怎么用?Java ProjectStructureConfigurable.getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable的用法示例。


在下文中一共展示了ProjectStructureConfigurable.getInstance方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: performFix

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
@Override
public void performFix() {
  final LibraryTable.ModifiableModel libraryTable = myContext.getModifiableLibraryTable(myLibrary.getTable());
  if (libraryTable instanceof LibrariesModifiableModel) {
    for (String invalidRoot : myInvalidUrls) {
      final ExistingLibraryEditor libraryEditor = ((LibrariesModifiableModel)libraryTable).getLibraryEditor(myLibrary);
      libraryEditor.removeRoot(invalidRoot, myType);
    }
    myContext.getDaemonAnalyzer().queueUpdate(LibraryProjectStructureElement.this);
    final ProjectStructureConfigurable structureConfigurable = ProjectStructureConfigurable.getInstance(myContext.getProject());
    navigate().doWhenDone(new Runnable() {
      @Override
      public void run() {
        final NamedConfigurable configurable = structureConfigurable.getConfigurableFor(myLibrary).getSelectedConfigurable();
        if (configurable instanceof LibraryConfigurable) {
          ((LibraryConfigurable)configurable).updateComponent();
        }
      }
    });
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:LibraryProjectStructureElement.java

示例2: navigate

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
@Override
public void navigate(boolean openLibraryEditor) {
  final OrderEntry entry = getSelectedEntry();
  final ProjectStructureConfigurable rootConfigurable = ProjectStructureConfigurable.getInstance(myState.getProject());
  if (entry instanceof ModuleOrderEntry){
    Module module = ((ModuleOrderEntry)entry).getModule();
    if (module != null) {
      rootConfigurable.select(module.getName(), null, true);
    }
  }
  else if (entry instanceof LibraryOrderEntry){
    if (!openLibraryEditor && !((LibraryOrderEntry)entry).getLibraryLevel().equals(LibraryTableImplUtil.MODULE_LEVEL)) {
      rootConfigurable.select((LibraryOrderEntry)entry, true);
    }
    else {
      doEdit();
    }
  }
  else if (entry instanceof JdkOrderEntry) {
    Sdk jdk = ((JdkOrderEntry)entry).getJdk();
    if (jdk != null) {
      rootConfigurable.select(jdk, true);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:ClasspathPanelImpl.java

示例3: run

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
@Override
public void run() {
  final Set<String> sdkNames = getSdkNamesFromModules(myProblemModules);
  if (sdkNames.size() == 1) {
    final Sdk sdk = ProjectJdkTable.getInstance().findJdk(sdkNames.iterator().next());
    if (sdk != null && sdk.getSdkType() instanceof AndroidSdkType) {
      final ProjectStructureConfigurable config = ProjectStructureConfigurable.getInstance(myProject);
      if (ShowSettingsUtil.getInstance().editConfigurable(myProject, config, new Runnable() {
        @Override
        public void run() {
          config.select(sdk, true);
        }
      })) {
        askAndRebuild(myProject);
      }
      return;
    }
  }

  final String moduleToSelect = myProblemModules.size() > 0
                                ? myProblemModules.iterator().next().getName()
                                : null;
  if (ModulesConfigurator.showDialog(myProject, moduleToSelect, ClasspathEditor.NAME)) {
    askAndRebuild(myProject);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:RenderErrorPanel.java

示例4: navigate

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
@Override
public void navigate(boolean openLibraryEditor) {
  final OrderEntry entry = getSelectedEntry();
  final ProjectStructureConfigurable rootConfigurable = ProjectStructureConfigurable.getInstance(myState.getProject());
  if (entry instanceof ModuleOrderEntry){
    Module module = ((ModuleOrderEntry)entry).getModule();
    if (module != null) {
      rootConfigurable.select(module.getName(), null, true);
    }
  }
  else if (entry instanceof LibraryOrderEntry){
    if (!openLibraryEditor) {
      rootConfigurable.select((LibraryOrderEntry)entry, true);
    }
    else {
      myEditButton.actionPerformed(null);
    }
  }
  else if (entry instanceof JdkOrderEntry) {
    Sdk jdk = ((JdkOrderEntry)entry).getJdk();
    if (jdk != null) {
      rootConfigurable.select(jdk, true);
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:26,代码来源:ClasspathPanelImpl.java

示例5: navigate

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
@Override
public void navigate(boolean openLibraryEditor) {
  final OrderEntry entry = getSelectedEntry();
  final ProjectStructureConfigurable rootConfigurable = ProjectStructureConfigurable.getInstance(myState.getProject());
  if (entry instanceof ModuleOrderEntry) {
    Module module = ((ModuleOrderEntry)entry).getModule();
    if (module != null) {
      rootConfigurable.select(module.getName(), null, true);
    }
  }
  else if (entry instanceof LibraryOrderEntry) {
    if (!openLibraryEditor) {
      rootConfigurable.select((LibraryOrderEntry)entry, true);
    }
    else {
      myEditButton.actionPerformed(null);
    }
  }
  else if (entry instanceof ModuleExtensionWithSdkOrderEntry) {
    Sdk jdk = ((ModuleExtensionWithSdkOrderEntry)entry).getSdk();
    if (jdk != null) {
      rootConfigurable.select(jdk, true);
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:26,代码来源:ClasspathPanelImpl.java

示例6: getProjectStructureContext

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
@Nullable
private static StructureConfigurableContext getProjectStructureContext(Project project) {
  if (ApplicationManager.getApplication().isHeadlessEnvironment()) return null;

  final ProjectStructureConfigurable structureConfigurable = ProjectStructureConfigurable.getInstance(project);
  return structureConfigurable.isUiInitialized() ? structureConfigurable.getContext() : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:IdeaModifiableModelsProvider.java

示例7: validateExistingModuleName

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
public void validateExistingModuleName(Project project) throws ConfigurationException {
  final String moduleName = getModuleName();
  final Module module;
  final ProjectStructureConfigurable fromConfigurable = ProjectStructureConfigurable.getInstance(project);
  if (fromConfigurable != null) {
    module = fromConfigurable.getModulesConfig().getModule(moduleName);
  }
  else {
    module = ModuleManager.getInstance(project).findModuleByName(moduleName);
  }
  if (module != null) {
    throw new ConfigurationException("Module \'" + moduleName + "\' already exist in project. Please, specify another name.");
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:ModuleNameLocationComponent.java

示例8: validateExistingModuleName

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
private void validateExistingModuleName() throws ConfigurationException {
  final String moduleName = getModuleName();
  final Module module;
  final ProjectStructureConfigurable fromConfigurable = ProjectStructureConfigurable.getInstance(myWizardContext.getProject());
  if (fromConfigurable != null) {
    module = fromConfigurable.getModulesConfig().getModule(moduleName);
  }
  else {
    module = ModuleManager.getInstance(myWizardContext.getProject()).findModuleByName(moduleName);
  }
  if (module != null) {
    throw new ConfigurationException("Module \'" + moduleName + "\' already exist in project. Please, specify another name.");
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:SelectTemplateStep.java

示例9: navigate

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
@Override
public void navigate(@Nonnull final ModuleExtensionWithSdkOrderEntryImpl orderEntry) {
  final Sdk sdk = orderEntry.getSdk();
  if (sdk == null) {
    return;
  }
  Project project = orderEntry.getModuleRootLayer().getProject();
  final ProjectStructureConfigurable config = ProjectStructureConfigurable.getInstance(project);
  ProjectStructureDialog.show(project, new Consumer<ProjectStructureConfigurable>() {
    @Override
    public void consume(ProjectStructureConfigurable configurable) {
      config.select(sdk, true);
    }
  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:16,代码来源:ModuleExtensionWithSdkOrderEntryTypeEditor.java

示例10: navigate

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
default void navigate(@Nonnull final T orderEntry) {
  Project project = orderEntry.getOwnerModule().getProject();
  final ProjectStructureConfigurable config = ProjectStructureConfigurable.getInstance(project);
  ProjectStructureDialog.show(project, new Consumer<ProjectStructureConfigurable>() {
    @Override
    public void consume(ProjectStructureConfigurable configurable) {
      config.selectOrderEntry(orderEntry.getOwnerModule(), orderEntry);
    }
  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:OrderEntryTypeEditor.java

示例11: show

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
public static boolean show(@Nonnull Project project, final Consumer<ProjectStructureConfigurable> configurableConsumer) {
  final ProjectStructureConfigurable configurable = ProjectStructureConfigurable.getInstance(project);
  ProjectStructureDialog dialog =
          new ProjectStructureDialog(project, configurable, OptionsEditorDialog.DIMENSION_KEY, true, IdeModalityType.PROJECT, configurable);
  if (configurableConsumer != null) {
    new UiNotifyConnector.Once(dialog.getContentPane(), new Activatable() {
      @Override
      public void showNotify() {
        configurableConsumer.consume(configurable);
      }
    });
  }
  return dialog.showAndGet();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:15,代码来源:ProjectStructureDialog.java

示例12: getProjectStructureContext

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
@Nullable
private static StructureConfigurableContext getProjectStructureContext(Project project) {
  final ProjectStructureConfigurable structureConfigurable = ProjectStructureConfigurable.getInstance(project);
  return structureConfigurable.isUiInitialized() ? structureConfigurable.getContext() : null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:6,代码来源:IdeaModifiableModelsProvider.java

示例13: getProjectStructureContext

import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable; //导入方法依赖的package包/类
@Nullable
private static StructureConfigurableContext getProjectStructureContext(Project project) {
  final ProjectStructureConfigurable structureConfigurable = ProjectStructureConfigurable.getInstance(project);
  return structureConfigurable.getContext() ;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:IdeaModifiableModelsProvider.java


注:本文中的com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。