Java Code Examples for com.intellij.openapi.roots.libraries.LibraryTable#getTableLevel()
The following examples show how to use
com.intellij.openapi.roots.libraries.LibraryTable#getTableLevel() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LibraryTablesRegistrarImpl.java From consulo with Apache License 2.0 | 5 votes |
@Override public void registerLibraryTable(@Nonnull LibraryTable libraryTable) { String tableLevel = libraryTable.getTableLevel(); final LibraryTable oldTable = myLibraryTables.put(tableLevel, libraryTable); if (oldTable != null) { throw new IllegalArgumentException("Library table '" + tableLevel + "' already registered."); } }
Example 2
Source File: LibraryOrderEntryImpl.java From consulo with Apache License 2.0 | 5 votes |
@Override @javax.annotation.Nullable public String getLibraryLevel() { if (myLibrary != null) { final LibraryTable table = myLibrary.getTable(); return table.getTableLevel(); } else { return myLibraryLevel; } }
Example 3
Source File: StructureConfigurableContext.java From consulo with Apache License 2.0 | 5 votes |
public LibraryTable.ModifiableModel getModifiableLibraryTable(@Nonnull LibraryTable table) { final String tableLevel = table.getTableLevel(); if (tableLevel.equals(LibraryTableImplUtil.MODULE_LEVEL)) { return table.getModifiableModel(); } return myLevel2Providers.get(tableLevel); }
Example 4
Source File: BaseLibrariesConfigurable.java From consulo with Apache License 2.0 | 5 votes |
public void createLibraryNode(Library library) { final LibraryTable table = library.getTable(); if (table != null) { final String level = table.getTableLevel(); final LibraryConfigurable configurable = new LibraryConfigurable(myContext.createModifiableModelProvider(level), library, myContext, TREE_UPDATER); final MyNode node = new MyNode(configurable); addNode(node, myRoot); final ProjectStructureDaemonAnalyzer daemonAnalyzer = myContext.getDaemonAnalyzer(); daemonAnalyzer.queueUpdate(new LibraryProjectStructureElement(myContext, library)); daemonAnalyzer.queueUpdateForAllElementsWithErrors(); } }
Example 5
Source File: LibraryClasspathTableItem.java From consulo with Apache License 2.0 | 5 votes |
@Override public void doEdit(ClasspathPanelImpl panel) { final Library library = getEntry().getLibrary(); if (library == null) { return; } final LibraryTable table = library.getTable(); final String tableLevel = table != null ? table.getTableLevel() : LibraryTableImplUtil.MODULE_LEVEL; final LibraryTablePresentation presentation = LibraryEditingUtil.getLibraryTablePresentation(myContext.getProject(), tableLevel); final LibraryTableModifiableModelProvider provider = panel.getModifiableModelProvider(tableLevel); EditExistingLibraryDialog dialog = EditExistingLibraryDialog.createDialog(panel, provider, library, myContext.getProject(), presentation, myContext); dialog.setContextModule(getEntry().getOwnerModule()); dialog.show(); }