本文整理汇总了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();
}
示例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));
}
示例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;
}
示例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());
}
示例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));
}