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


Java ModulesComboBox类代码示例

本文整理汇总了Java中com.intellij.application.options.ModulesComboBox的典型用法代码示例。如果您正苦于以下问题:Java ModulesComboBox类的具体用法?Java ModulesComboBox怎么用?Java ModulesComboBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: CreateGradleLibraryFromFilesDialog

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
public CreateGradleLibraryFromFilesDialog(@NotNull Project project, @NotNull List<OrderRoot> roots) {
  super(project, true);
  setTitle(COMMAND_TITLE);
  myProject = project;
  myRoots = roots;
  mySettingsFile = GradleSettingsFile.get(myProject);

  final FormBuilder builder = LibraryNameAndLevelPanel.createFormBuilder();
  myModulesComboBox = new ModulesComboBox();
  myModulesComboBox.fillModules(myProject);
  myModulesComboBox.setSelectedModule(findModule(roots));
  for (Iterator iter = ((SortedListModel)myModulesComboBox.getModel()).iterator(); iter.hasNext(); ) {
    Module module = (Module)iter.next();
    String path = GradleSettingsFile.getModuleGradlePath(module);
    if (path == null || !mySettingsFile.hasBuildFile(path)) {
      iter.remove();
    }
  }
  builder.addLabeledComponent("&Add to module:", myModulesComboBox);
  myPanel = builder.getPanel();
  init();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:CreateLibraryFromFilesAction.java

示例2: setModules

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
private void setModules(final Collection<Module> modules)
{
	if(myModulesDescriptionsComboBox != null)
	{
		myModulesDescriptionsComboBox.setModules(modules);
	}
	else if(myModulesList instanceof ModulesComboBox)
	{
		((ModulesComboBox) myModulesList).setModules(modules);
	}
	else
	{
		SortedComboBoxModel<Module> model = (SortedComboBoxModel<Module>) myModulesList.getModel();
		model.setAll(modules);
		model.add(null);
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:18,代码来源:ConfigurationModuleSelector.java

示例3: JarApplicationConfigurable

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
public JarApplicationConfigurable(final Project project) {
  myProject = project;
  myAnchor = UIUtil.mergeComponentsWithAnchor(myJarPathComponent, myCommonProgramParameters, myJrePathEditor);
  ModulesComboBox modulesComboBox = myModuleComponent.getComponent();
  modulesComboBox.allowEmptySelection("<whole project>");
  modulesComboBox.fillModules(project);
  myJrePathEditor.setDefaultJreSelector(DefaultJreSelector.fromModuleDependencies(modulesComboBox, true));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:JarApplicationConfigurable.java

示例4: setModules

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
private void setModules(final Collection<Module> modules) {
  if (myModulesList instanceof ModulesComboBox) {
    ((ModulesComboBox)myModulesList).setModules(modules);
  }
  else {
    SortedComboBoxModel<Module> model = (SortedComboBoxModel<Module>)myModulesList.getModel();
    model.setAll(modules);
    model.add(null);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ConfigurationModuleSelector.java

示例5: createCenterPanel

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
@Nullable
@Override
protected JComponent createCenterPanel() {
    modulesComboBox = new ModulesComboBox();
    modulesComboBox.setMinimumAndPreferredWidth(300);
    modulesComboBox.fillModules(project);
    if(modulesComboBox.getItemCount() > 0) {
        modulesComboBox.setSelectedIndex(0);
    }
    final NonOpaquePanel panel = new NonOpaquePanel();
    panel.add(modulesComboBox, BorderLayout.NORTH);
    return panel;
}
 
开发者ID:jimkyndemeyer,项目名称:js-graphql-intellij-plugin,代码行数:14,代码来源:JSGraphQLConfigModuleDialog.java

示例6: createUIComponents

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
/**
 * Initializes some UI components in this panel that require special set-up.
 *
 * <p>This is automatically called by the IDEA SDK and should not be directly invoked.
 */
private void createUIComponents() {
  modulesComboBox = new ModulesComboBox();
  modulesComboBox.fillModules(project);

  ApplicationManager.getApplication()
      .runReadAction(
          () -> {
            Module[] modules = ModuleManager.getInstance(project).getSortedModules();
            if (modules.length > 0) {
              // Defaults to the first, top-level module in this project.
              modulesComboBox.setSelectedModule(modules[0]);
            }
          });

  cloudLibrariesTable = new CloudLibraryTable(libraries);
  cloudLibrariesTable.setTableHeader(null);
  cloudLibrariesTable
      .getSelectionModel()
      .addListSelectionListener(
          e -> {
            ListSelectionModel model = (ListSelectionModel) e.getSource();
            if (!model.isSelectionEmpty()) {
              int selectedIndex = model.getMinSelectionIndex();
              CloudLibrary library =
                  (CloudLibrary)
                      cloudLibrariesTable.getModel().getValueAt(selectedIndex, CLOUD_LIBRARY_COL);
              detailsPanel.setCloudLibrary(library, apiManagementMap.get(library));
              updateManagementUI();
            }
          });
  addTableModelListener(e -> updateManagementUI());

  projectSelector = new ProjectSelector(project);
  projectSelector.addProjectSelectionListener(cloudProject -> updateManagementUI());
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:41,代码来源:GoogleCloudApiSelectorPanel.java

示例7: DefracConfigurationModuleSelector

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
public DefracConfigurationModuleSelector(@NotNull final Project project,
                                         @NotNull final ModulesComboBox modulesComboBox) {
  super(project, modulesComboBox);

  this.condition = new Condition<Module>() {
    @Override
    public boolean value(final Module module) {
      final DefracFacet facet = DefracFacet.getInstance(module);

      return facet != null
          && !facet.getPlatform().isGeneric()
          && !facet.isMacroLibrary();
    }
  };
}
 
开发者ID:defrac,项目名称:defrac-plugin-intellij,代码行数:16,代码来源:DefracConfigurationModuleSelector.java

示例8: setModules

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
private void setModules(final Collection<Module> modules) {
    if (myModulesList instanceof ModulesComboBox) {
        ((ModulesComboBox) myModulesList).setModules(modules);
    } else {
        SortedComboBoxModel<Module> model = (SortedComboBoxModel<Module>) myModulesList.getModel();
        model.setAll(modules);
        model.add(null);
    }
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:10,代码来源:ConfigurationModuleSelector.java

示例9: JarApplicationConfigurable

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
public JarApplicationConfigurable(final Project project)
{
	myProject = project;
	myAnchor = UIUtil.mergeComponentsWithAnchor(myJarPathComponent, myCommonProgramParameters, myJrePathEditor);
	ModulesComboBox modulesComboBox = myModuleComponent.getComponent();
	modulesComboBox.allowEmptySelection("<whole project>");
	modulesComboBox.fillModules(project);
	myJrePathEditor.setDefaultJreSelector(DefaultJreSelector.fromModuleDependencies(modulesComboBox, true));
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:10,代码来源:JarApplicationConfigurable.java

示例10: ConfigurationModuleSelector

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
public ConfigurationModuleSelector(Project project, ModulesComboBox modulesComboBox, String noModule)
{
	myProject = project;
	myModulesList = modulesComboBox;
	myModulesDescriptionsComboBox = null;
	modulesComboBox.allowEmptySelection(noModule);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:8,代码来源:ConfigurationModuleSelector.java

示例11: getModuleCombo

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
public ModulesComboBox getModuleCombo()
{
    return moduleCombo;
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:5,代码来源:WeaveRunnerConfPanel.java

示例12: ConfigurationModuleSelector

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
public ConfigurationModuleSelector(Project project, ModulesComboBox modulesComboBox) {
  this(project, modulesComboBox, "<no module>");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ConfigurationModuleSelector.java

示例13: getModulesComponent

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
public ModulesComboBox getModulesComponent() {
  return myModule.getComponent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:TestDiscoveryConfigurable.java

示例14: getModuleComponent

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
private ModulesComboBox getModuleComponent() {
  return myModule.getComponent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:AppletConfigurable.java

示例15: getModulesComponent

import com.intellij.application.options.ModulesComboBox; //导入依赖的package包/类
public ModulesComboBox getModulesComponent() {
  return moduleClasspath.getComponent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:TestNGConfigurationEditor.java


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