本文整理汇总了Java中com.intellij.openapi.roots.libraries.LibraryTable.getTableLevel方法的典型用法代码示例。如果您正苦于以下问题:Java LibraryTable.getTableLevel方法的具体用法?Java LibraryTable.getTableLevel怎么用?Java LibraryTable.getTableLevel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.roots.libraries.LibraryTable
的用法示例。
在下文中一共展示了LibraryTable.getTableLevel方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doEdit
import com.intellij.openapi.roots.libraries.LibraryTable; //导入方法依赖的package包/类
private void doEdit() {
final OrderEntry entry = getSelectedEntry();
if (!(entry instanceof LibraryOrderEntry)) return;
final Library library = ((LibraryOrderEntry)entry).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(getProject(), tableLevel);
final LibraryTableModifiableModelProvider provider = getModifiableModelProvider(tableLevel);
EditExistingLibraryDialog dialog = EditExistingLibraryDialog.createDialog(this, provider, library, myState.getProject(),
presentation, getStructureConfigurableContext());
dialog.setContextModule(getRootModel().getModule());
dialog.show();
myEntryTable.repaint();
ModuleStructureConfigurable.getInstance(myState.getProject()).getTree().repaint();
}
示例2: getModifiableLibraryTable
import com.intellij.openapi.roots.libraries.LibraryTable; //导入方法依赖的package包/类
public LibraryTable.ModifiableModel getModifiableLibraryTable(@NotNull LibraryTable table) {
final String tableLevel = table.getTableLevel();
if (tableLevel.equals(LibraryTableImplUtil.MODULE_LEVEL)) {
return table.getModifiableModel();
}
return myLevel2Providers.get(tableLevel);
}
示例3: createLibraryNode
import com.intellij.openapi.roots.libraries.LibraryTable; //导入方法依赖的package包/类
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();
}
}
示例4: registerLibraryTable
import com.intellij.openapi.roots.libraries.LibraryTable; //导入方法依赖的package包/类
@Override
public void registerLibraryTable(@NotNull LibraryTable libraryTable) {
String tableLevel = libraryTable.getTableLevel();
final LibraryTable oldTable = myLibraryTables.put(tableLevel, libraryTable);
if (oldTable != null) {
throw new IllegalArgumentException("Library table '" + tableLevel + "' already registered.");
}
}
示例5: getLibraryLevel
import com.intellij.openapi.roots.libraries.LibraryTable; //导入方法依赖的package包/类
@Override
@Nullable
public String getLibraryLevel() {
if (myLibrary != null) {
final LibraryTable table = myLibrary.getTable();
return table.getTableLevel();
} else {
return myLibraryLevel;
}
}