mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
clone: restore clone in project view by shortcut even if it is invisible ?! (IDEA-94828)
This commit is contained in:
@@ -39,13 +39,12 @@ public class CloneElementAction extends CopyElementAction {
|
||||
}
|
||||
|
||||
protected void updateForToolWindow(String id, DataContext dataContext,Presentation presentation) {
|
||||
if (!ToolWindowId.COMMANDER.equals(id)) {
|
||||
presentation.setVisible(false);
|
||||
return;
|
||||
}
|
||||
// work only with single selection
|
||||
PsiElement[] elements = LangDataKeys.PSI_ELEMENT_ARRAY.getData(dataContext);
|
||||
presentation.setEnabled(elements != null && elements.length == 1 && CopyHandler.canClone(elements));
|
||||
presentation.setVisible(true);
|
||||
if (!ToolWindowId.COMMANDER.equals(id)) {
|
||||
presentation.setVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user