use of com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable in project intellij-community by JetBrains.
the class ExternalModuleStructureExtension method getModulesConfigurator.
@Nullable
private static ModulesConfigurator getModulesConfigurator(Project project) {
if (ApplicationManager.getApplication().isHeadlessEnvironment())
return null;
final ProjectStructureConfigurable structureConfigurable = ProjectStructureConfigurable.getInstance(project);
StructureConfigurableContext context = structureConfigurable.isUiInitialized() ? structureConfigurable.getContext() : null;
return context != null ? context.getModulesConfigurator() : null;
}
use of com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable in project intellij-community by JetBrains.
the class ModuleNameLocationComponent method validateExistingModuleName.
private void validateExistingModuleName() throws ConfigurationException {
Project project = myWizardContext.getProject();
if (project == null)
return;
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.");
}
}
use of com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable in project intellij-community by JetBrains.
the class ClasspathPanelImpl method navigate.
@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);
}
}
}
use of com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable in project intellij-plugins by JetBrains.
the class FlexBCConfigurator method createBcConfigurable.
private CompositeConfigurable createBcConfigurable(final Module module, final ModifiableFlexBuildConfiguration bc, final Runnable treeNodeNameUpdater) {
final ProjectStructureConfigurable c = ProjectStructureConfigurable.getInstance(module.getProject());
final Runnable bcNatureModifier = createBCNatureModifier(bc);
return new FlexBCConfigurable(module, bc, bcNatureModifier, myConfigEditor, c.getProjectJdksModel(), c.getContext()) {
public void apply() throws ConfigurationException {
super.apply();
myBCToOutputPathMap.put(bc, bc.getActualOutputFilePath());
}
@Override
public void setDisplayName(final String name) {
super.setDisplayName(name);
treeNodeNameUpdater.run();
myEventDispatcher.getMulticaster().buildConfigurationRenamed(this);
}
}.wrapInTabs();
}
use of com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable in project intellij-plugins by JetBrains.
the class FlexSdkUtils method openModuleConfigurable.
public static void openModuleConfigurable(final Module module) {
final ProjectStructureConfigurable projectStructureConfigurable = ProjectStructureConfigurable.getInstance(module.getProject());
ShowSettingsUtil.getInstance().editConfigurable(module.getProject(), projectStructureConfigurable, () -> projectStructureConfigurable.select(module.getName(), ClasspathEditor.NAME, true));
}
Aggregations