This commit is contained in:
Dmitry Avdeev
2013-08-07 11:50:29 +04:00
parent 9ebd7e0df0
commit 1f3e1c4946
@@ -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.<VirtualFile>emptyList(), true);
}
else {
((PsiModificationTrackerImpl)PsiManager.getInstance(project).getModificationTracker()).incCounter();
DaemonCodeAnalyzer.getInstance(project).restart();
}
}