"Copy as Diagnostic Test" is visible only in internal mode.
This commit is contained in:
@@ -55,9 +55,11 @@ public class CopyAsDiagnosticTestAction extends AnAction {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(AnActionEvent e) {
|
public void update(AnActionEvent e) {
|
||||||
|
e.getPresentation().setVisible(ApplicationManager.getApplication().isInternal());
|
||||||
|
|
||||||
Editor editor = e.getData(CommonDataKeys.EDITOR);
|
Editor editor = e.getData(CommonDataKeys.EDITOR);
|
||||||
PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE);
|
PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE);
|
||||||
e.getPresentation().setEnabled(editor != null && psiFile instanceof JetFile && ApplicationManager.getApplication().isInternal());
|
e.getPresentation().setEnabled(editor != null && psiFile instanceof JetFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user