mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
hide "put and link via manifest" action if there are no suitable items selected
This commit is contained in:
+3
@@ -56,12 +56,15 @@ public class PutSourceItemIntoParentAndLinkViaManifestAction extends PutIntoDefa
|
||||
}
|
||||
|
||||
boolean enable = parentInfo != null;
|
||||
boolean isProvideElements = false;
|
||||
for (PackagingSourceItem item : mySourceItemsTree.getSelectedItems()) {
|
||||
isProvideElements |= item.isProvideElements();
|
||||
if (!item.getKindOfProducedElements().containsJarFiles()) {
|
||||
enable = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
enable &= isProvideElements;
|
||||
presentation.setVisible(enable);
|
||||
presentation.setEnabled(enable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user