diff --git a/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/inject/InjectLanguageAction.java b/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/inject/InjectLanguageAction.java index 070cb2d36e25..6ff3d9856996 100644 --- a/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/inject/InjectLanguageAction.java +++ b/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/inject/InjectLanguageAction.java @@ -128,10 +128,9 @@ public class InjectLanguageAction implements IntentionAction { try { Language language = injectable.toLanguage(); for (LanguageInjectionSupport support : InjectorUtils.getActiveInjectionSupports()) { - if (!support.isApplicableTo(host)) continue; - if (!support.addInjectionInPlace(language, host)) continue; - ((PsiModificationTrackerImpl)PsiManager.getInstance(project).getModificationTracker()).incCounter(); - return; + if (support.isApplicableTo(host) && support.addInjectionInPlace(language, host)) { + return; + } } if (TemporaryPlacesRegistry.getInstance(project).getLanguageInjectionSupport().addInjectionInPlace(language, host)) { HintManager.getInstance().showInformationHint(editor, StringUtil.escapeXml(language.getDisplayName()) + " was temporarily injected"); @@ -142,6 +141,7 @@ public class InjectLanguageAction implements IntentionAction { FileContentUtil.reparseFiles(project, Collections.emptyList(), true); } else { + ((PsiModificationTrackerImpl)PsiManager.getInstance(project).getModificationTracker()).incCounter(); DaemonCodeAnalyzer.getInstance(project).restart(); } }