From 5a47ef87514bfbda815e636b851fade5b006d102 Mon Sep 17 00:00:00 2001 From: nik Date: Wed, 6 Nov 2013 21:12:40 +0400 Subject: [PATCH] app server editor: don't show 'change version' button for app server library --- .../libraryEditor/ExistingLibraryEditor.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/ExistingLibraryEditor.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/ExistingLibraryEditor.java index 7e4b7721619e..d33dbb50f2d1 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/ExistingLibraryEditor.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/ExistingLibraryEditor.java @@ -71,10 +71,13 @@ public class ExistingLibraryEditor extends LibraryEditorBase implements Disposab private LibraryType detectType() { if (!myDetectedTypeComputed) { - final Pair,LibraryProperties> pair = LibraryDetectionManager.getInstance().detectType(Arrays.asList(getFiles(OrderRootType.CLASSES))); - if (pair != null) { - myDetectedType = pair.getFirst(); - myDetectedLibraryProperties = pair.getSecond(); + LibraryTable libraryTable = myLibrary.getTable(); + if (libraryTable == null || libraryTable.isEditable()) { + final Pair,LibraryProperties> pair = LibraryDetectionManager.getInstance().detectType(Arrays.asList(getFiles(OrderRootType.CLASSES))); + if (pair != null) { + myDetectedType = pair.getFirst(); + myDetectedLibraryProperties = pair.getSecond(); + } } myDetectedTypeComputed = true; }