Search in sources :

Example 1 with BaseLibrariesConfigurable

use of com.intellij.openapi.roots.ui.configuration.projectRoot.BaseLibrariesConfigurable in project intellij-community by JetBrains.

the class CreateNewLibraryAction method actionPerformed.

@Override
public void actionPerformed(AnActionEvent e) {
    Library library = createLibrary(myType, myLibrariesConfigurable.getTree(), myProject, myLibrariesConfigurable.getModelProvider().getModifiableModel());
    if (library == null)
        return;
    final BaseLibrariesConfigurable rootConfigurable = ProjectStructureConfigurable.getInstance(myProject).getConfigurableFor(library);
    final DefaultMutableTreeNode libraryNode = MasterDetailsComponent.findNodeByObject((TreeNode) rootConfigurable.getTree().getModel().getRoot(), library);
    rootConfigurable.selectNodeInTree(libraryNode);
    LibraryEditingUtil.showDialogAndAddLibraryToDependencies(library, myProject, true);
}
Also used : DefaultMutableTreeNode(javax.swing.tree.DefaultMutableTreeNode) Library(com.intellij.openapi.roots.libraries.Library) BaseLibrariesConfigurable(com.intellij.openapi.roots.ui.configuration.projectRoot.BaseLibrariesConfigurable)

Aggregations

Library (com.intellij.openapi.roots.libraries.Library)1 BaseLibrariesConfigurable (com.intellij.openapi.roots.ui.configuration.projectRoot.BaseLibrariesConfigurable)1 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)1