use of com.intellij.openapi.roots.libraries.LibraryTablePresentation in project intellij-community by JetBrains.
the class LibraryElementPresentation method getLibraryTableDisplayName.
public static String getLibraryTableDisplayName(final Library library) {
LibraryTable table = library.getTable();
LibraryTablePresentation presentation = table != null ? table.getPresentation() : ModuleLibraryTable.MODULE_LIBRARY_TABLE_PRESENTATION;
return presentation.getDisplayName(false);
}
use of com.intellij.openapi.roots.libraries.LibraryTablePresentation in project intellij-community by JetBrains.
the class ClasspathPanelImpl method addChangeLibraryLevelAction.
private void addChangeLibraryLevelAction(DefaultActionGroup actionGroup, String tableLevel) {
final LibraryTablePresentation presentation = LibraryEditingUtil.getLibraryTablePresentation(getProject(), tableLevel);
actionGroup.add(new ChangeLibraryLevelInClasspathAction(this, presentation.getDisplayName(true), tableLevel));
}
use of com.intellij.openapi.roots.libraries.LibraryTablePresentation in project intellij-community by JetBrains.
the class ClasspathPanelImpl method doEdit.
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();
}
Aggregations