mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
hide rename file for files outside project (EA-69745 - assert: RenameFileAction.actionPerformed)
This commit is contained in:
@@ -43,7 +43,9 @@ public class RenameFileAction extends AnAction implements DumbAware {
|
||||
PsiFile file = e.getData(CommonDataKeys.PSI_FILE);
|
||||
Presentation presentation = e.getPresentation();
|
||||
String place = e.getPlace();
|
||||
boolean enabled = (file instanceof PsiClassOwner || ActionPlaces.EDITOR_TAB_POPUP.equals(place)) && place != ActionPlaces.EDITOR_POPUP && e.getData(CommonDataKeys.PROJECT) != null;
|
||||
boolean enabled = file != null &&
|
||||
(file instanceof PsiClassOwner || ActionPlaces.EDITOR_TAB_POPUP.equals(place)) &&
|
||||
place != ActionPlaces.EDITOR_POPUP && e.getData(CommonDataKeys.PROJECT) != null;
|
||||
presentation.setEnabled(enabled);
|
||||
presentation.setVisible(enabled);
|
||||
if (enabled) {
|
||||
|
||||
Reference in New Issue
Block a user