当前位置: 首页>>代码示例>>Java>>正文


Java LibraryTable.getTableLevel方法代码示例

本文整理汇总了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();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ClasspathPanelImpl.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:StructureConfigurableContext.java

示例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();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:BaseLibrariesConfigurable.java

示例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.");
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:LibraryTablesRegistrarImpl.java

示例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;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:LibraryOrderEntryImpl.java


注:本文中的com.intellij.openapi.roots.libraries.LibraryTable.getTableLevel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。