From 95620fd89aa1b60237923299cc071ee54564a03d Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Fri, 18 Sep 2015 20:54:57 -0300 Subject: [PATCH] Make switch code style action dumb aware --- .../ide/actions/QuickChangeCodeStyleSchemeAction.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/ide/actions/QuickChangeCodeStyleSchemeAction.java b/platform/lang-impl/src/com/intellij/ide/actions/QuickChangeCodeStyleSchemeAction.java index da3499735e35..2473f422a52d 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/QuickChangeCodeStyleSchemeAction.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/QuickChangeCodeStyleSchemeAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ package com.intellij.ide.actions; import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.editor.EditorFactory; +import com.intellij.openapi.project.DumbAwareAction; import com.intellij.openapi.project.Project; import com.intellij.psi.codeStyle.CodeStyleScheme; import com.intellij.psi.codeStyle.CodeStyleSchemes; @@ -52,8 +53,8 @@ public class QuickChangeCodeStyleSchemeAction extends QuickSwitchSchemeAction { final CodeStyleScheme currentScheme, final CodeStyleScheme scheme, final boolean addScheme) { - group.add(new AnAction(scheme.getName(), "", - scheme == currentScheme && !manager.USE_PER_PROJECT_SETTINGS ? ourCurrentAction : ourNotCurrentAction) { + group.add(new DumbAwareAction(scheme.getName(), "", + scheme == currentScheme && !manager.USE_PER_PROJECT_SETTINGS ? ourCurrentAction : ourNotCurrentAction) { @Override public void actionPerformed(@NotNull AnActionEvent e) { if (addScheme) {