Search in sources :

Example 1 with LibraryTablePresentation

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);
}
Also used : LibraryTablePresentation(com.intellij.openapi.roots.libraries.LibraryTablePresentation) ModuleLibraryTable(com.intellij.openapi.roots.impl.ModuleLibraryTable) LibraryTable(com.intellij.openapi.roots.libraries.LibraryTable)

Example 2 with LibraryTablePresentation

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));
}
Also used : LibraryTablePresentation(com.intellij.openapi.roots.libraries.LibraryTablePresentation)

Example 3 with LibraryTablePresentation

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();
}
Also used : LibraryTablePresentation(com.intellij.openapi.roots.libraries.LibraryTablePresentation) LibraryTable(com.intellij.openapi.roots.libraries.LibraryTable) EditExistingLibraryDialog(com.intellij.openapi.roots.ui.configuration.libraryEditor.EditExistingLibraryDialog) Library(com.intellij.openapi.roots.libraries.Library) LibraryTableModifiableModelProvider(com.intellij.openapi.roots.ui.configuration.LibraryTableModifiableModelProvider)

Aggregations

LibraryTablePresentation (com.intellij.openapi.roots.libraries.LibraryTablePresentation)3 LibraryTable (com.intellij.openapi.roots.libraries.LibraryTable)2 ModuleLibraryTable (com.intellij.openapi.roots.impl.ModuleLibraryTable)1 Library (com.intellij.openapi.roots.libraries.Library)1 LibraryTableModifiableModelProvider (com.intellij.openapi.roots.ui.configuration.LibraryTableModifiableModelProvider)1 EditExistingLibraryDialog (com.intellij.openapi.roots.ui.configuration.libraryEditor.EditExistingLibraryDialog)1