IDEA-193695 Quick Definition (Option+Space) writes a space character if it does not work

this reverts commit abc190b
This commit is contained in:
Dmitry Batrak
2018-07-19 12:23:27 +03:00
parent 847a72dec0
commit 004aea31e1
@@ -93,21 +93,7 @@ public class ShowImplementationsAction extends AnAction implements PopupAction {
@Override
public void update(final AnActionEvent e) {
Project project = e.getData(CommonDataKeys.PROJECT);
if (project == null) {
e.getPresentation().setEnabled(false);
return;
}
DataContext dataContext = e.getDataContext();
Editor editor = getEditor(dataContext);
PsiFile file = CommonDataKeys.PSI_FILE.getData(dataContext);
PsiElement element = CommonDataKeys.PSI_ELEMENT.getData(dataContext);
element = getElement(project, file, editor, element);
PsiFile containingFile = element != null ? element.getContainingFile() : file;
boolean enabled = !(containingFile == null || !containingFile.getViewProvider().isPhysical());
e.getPresentation().setEnabled(enabled);
e.getPresentation().setEnabled(project != null);
}