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


Java ModulesComboBox.fillModules方法代码示例

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


在下文中一共展示了ModulesComboBox.fillModules方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例3: 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

示例4: 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

示例5: 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


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