disable rename fle for project view popup if not class owner, so extension could be changed (IDEA-160876)

This commit is contained in:
Anna Kozlova
2016-09-19 17:43:56 +03:00
parent b8f0e626b9
commit 2bfa7d048c
@@ -44,7 +44,7 @@ public class RenameFileAction extends AnAction implements DumbAware {
Presentation presentation = e.getPresentation();
String place = e.getPlace();
boolean enabled = file != null &&
(file instanceof PsiClassOwner || ActionPlaces.EDITOR_TAB_POPUP.equals(place)) &&
(file instanceof PsiClassOwner || !ActionPlaces.PROJECT_VIEW_POPUP.equals(place)) &&
place != ActionPlaces.EDITOR_POPUP && e.getData(CommonDataKeys.PROJECT) != null;
presentation.setEnabled(enabled);
presentation.setVisible(enabled);