From 0f738e77a43aa215faa7938276c1d323b6293af5 Mon Sep 17 00:00:00 2001 From: Anton Makeev Date: Fri, 3 Apr 2009 13:47:41 +0400 Subject: [PATCH] Module Structure: disable editing of non-editable entries --- source/com/intellij/openapi/roots/ui/configuration/ClasspathPanel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/com/intellij/openapi/roots/ui/configuration/ClasspathPanel.java b/source/com/intellij/openapi/roots/ui/configuration/ClasspathPanel.java index d72748af2b..3e959613a2 100644 --- a/source/com/intellij/openapi/roots/ui/configuration/ClasspathPanel.java +++ b/source/com/intellij/openapi/roots/ui/configuration/ClasspathPanel.java @@ -267,7 +267,8 @@ public class ClasspathPanel extends JPanel { upButton.setEnabled(minRow > 0 && minRow < myEntryTable.getRowCount()); downButton.setEnabled(maxRow >= 0 && maxRow < myEntryTable.getRowCount() - 1); removeButton.setEnabled(removeButtonEnabled); - myEditButton.setEnabled(selectedRows.length == 1 && myModel.getItemAt(selectedRows[0]) instanceof LibItem); + TableItem selectedItem = selectedRows.length == 1 ? myModel.getItemAt(selectedRows[0]) : null; + myEditButton.setEnabled(selectedItem instanceof LibItem && selectedItem.isEditable()); } }); -- 2.11.4.GIT