use of com.intellij.ui.navigation.Place in project intellij-plugins by JetBrains.
the class AddAsSwcLibDialog method openProjectStructure.
private void openProjectStructure(final Module module, final FlexBuildConfiguration bc) {
ApplicationManager.getApplication().invokeLater(() -> {
final ProjectStructureConfigurable configurable = ProjectStructureConfigurable.getInstance(myProject);
ShowSettingsUtil.getInstance().editConfigurable(myProject, configurable, () -> {
final Place place = FlexBuildConfigurationsExtension.getInstance().getConfigurator().getPlaceFor(module, bc.getName()).putPath(CompositeConfigurable.TAB_NAME, DependenciesConfigurable.TAB_NAME);
configurable.navigateTo(place, true);
});
});
}
use of com.intellij.ui.navigation.Place in project intellij-plugins by JetBrains.
the class FlashProjectStructureErrorsDialog method openProjectStructure.
private void openProjectStructure() {
final TreePath selectionPath = myTree.getSelectionPath();
DefaultMutableTreeNode node = selectionPath == null ? null : (DefaultMutableTreeNode) selectionPath.getLastPathComponent();
Object userObject = node == null ? null : node.getUserObject();
if (userObject == null)
return;
final Ref<Module> moduleRef = new Ref<>();
final Ref<FlexBuildConfiguration> bcRef = new Ref<>();
final Ref<FlashProjectStructureProblem> problemRef = new Ref<>();
if (userObject instanceof FlashProjectStructureProblem) {
problemRef.set((FlashProjectStructureProblem) userObject);
node = (DefaultMutableTreeNode) node.getParent();
userObject = node.getUserObject();
}
if (userObject instanceof FlexBuildConfiguration) {
bcRef.set((FlexBuildConfiguration) userObject);
node = (DefaultMutableTreeNode) node.getParent();
userObject = node.getUserObject();
}
if (userObject instanceof Module) {
moduleRef.set((Module) userObject);
}
close(CANCEL_EXIT_CODE);
final ProjectStructureConfigurable configurable = ProjectStructureConfigurable.getInstance(myProject);
ShowSettingsUtil.getInstance().editConfigurable(myProject, configurable, () -> {
final Place place;
if (problemRef.get() instanceof FlashProjectStructureProblem.FlexUnitOutputFolderProblem) {
place = new Place().putPath(ProjectStructureConfigurable.CATEGORY, configurable.getProjectConfig());
} else if (moduleRef.isNull()) {
place = new Place().putPath(ProjectStructureConfigurable.CATEGORY, configurable.getModulesConfig());
} else if (bcRef.isNull()) {
place = new Place().putPath(ProjectStructureConfigurable.CATEGORY, configurable.getModulesConfig()).putPath(MasterDetailsComponent.TREE_OBJECT, moduleRef.get());
} else {
place = FlexBuildConfigurationsExtension.getInstance().getConfigurator().getPlaceFor(moduleRef.get(), bcRef.get().getName());
if (!problemRef.isNull()) {
place.putPath(CompositeConfigurable.TAB_NAME, problemRef.get().tabName);
place.putPath(FlexBCConfigurable.LOCATION_ON_TAB, problemRef.get().locationOnTab);
}
}
configurable.navigateTo(place, true);
});
}
use of com.intellij.ui.navigation.Place in project intellij-plugins by JetBrains.
the class DependenciesConfigurable method editLibrary.
private void editLibrary(final SharedLibraryItem item) {
final Library liveLibrary = item.findLiveLibrary();
if (liveLibrary != null) {
final BaseLibrariesConfigurable librariesConfigurable = LibraryTablesRegistrar.APPLICATION_LEVEL.equals(liveLibrary.getTable().getTableLevel()) ? GlobalLibrariesConfigurable.getInstance(myProject) : ProjectLibrariesConfigurable.getInstance(myProject);
final Place place = new Place().putPath(ProjectStructureConfigurable.CATEGORY, librariesConfigurable).putPath(MasterDetailsComponent.TREE_OBJECT, liveLibrary);
ProjectStructureConfigurable.getInstance(myProject).navigateTo(place, true);
}
}
use of com.intellij.ui.navigation.Place in project intellij-community by JetBrains.
the class ProjectStructureConfigurable method select.
public ActionCallback select(@NotNull Sdk sdk, final boolean requestFocus) {
Place place = createPlaceFor(myJdkListConfig);
place.putPath(MasterDetailsComponent.TREE_NAME, sdk.getName());
return navigateTo(place, requestFocus);
}
use of com.intellij.ui.navigation.Place in project intellij-community by JetBrains.
the class ProjectStructureConfigurable method select.
public ActionCallback select(@NotNull LibraryOrderEntry libraryOrderEntry, final boolean requestFocus) {
final Library lib = libraryOrderEntry.getLibrary();
if (lib == null || lib.getTable() == null) {
return selectOrderEntry(libraryOrderEntry.getOwnerModule(), libraryOrderEntry);
}
Place place = createPlaceFor(getConfigurableFor(lib));
place.putPath(MasterDetailsComponent.TREE_NAME, libraryOrderEntry.getLibraryName());
return navigateTo(place, requestFocus);
}
Aggregations