reformat and optimize imports available in modal context [IDEA-127612]

This commit is contained in:
Yaroslav Lepenkin
2017-05-10 14:21:19 +03:00
parent 0ae2783e76
commit a0ea71a505
2 changed files with 8 additions and 0 deletions
@@ -42,6 +42,9 @@ public class OptimizeImportsAction extends AnAction {
private static final String NO_IMPORTS_OPTIMIZED = "Unused imports not found";
private static boolean myProcessVcsChangedFilesInTests;
public OptimizeImportsAction() {
setEnabledInModalContext(true);
}
@Override
public void actionPerformed(AnActionEvent event) {
@@ -51,6 +51,9 @@ public class ReformatCodeAction extends AnAction implements DumbAware {
private static final @NonNls String HELP_ID = "editing.codeReformatting";
protected static ReformatFilesOptions myTestOptions;
public ReformatCodeAction() {
setEnabledInModalContext(true);
}
@Override
public void actionPerformed(AnActionEvent event) {
@@ -257,6 +260,8 @@ public class ReformatCodeAction extends AnAction implements DumbAware {
return PsiUtilCore.toPsiFileArray(result);
}
@Override
public void update(AnActionEvent event){
Presentation presentation = event.getPresentation();