IDEA-52048: "Could not set package name for jsp files" message when creating an XHTML...
authorDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Thu, 8 Apr 2010 06:04:37 +0000 (10:04 +0400)
committerDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Thu, 8 Apr 2010 06:04:37 +0000 (10:04 +0400)
java/java-impl/src/com/intellij/psi/impl/file/JavaUpdateAddedFileProcessor.java

index 30d1020decd3af786b14f6ce5d731877ff72c0ba..fab56bf414059e4ff3b5bf2411451687c10c2cda 100644 (file)
@@ -16,6 +16,7 @@
 package com.intellij.psi.impl.file;
 
 import com.intellij.psi.*;
+import com.intellij.psi.templateLanguages.TemplateLanguageFileViewProvider;
 import com.intellij.util.IncorrectOperationException;
 
 /**
@@ -29,7 +30,7 @@ public class JavaUpdateAddedFileProcessor extends UpdateAddedFileProcessor {
   }
 
   public void update(final PsiFile element, PsiFile originalElement) throws IncorrectOperationException {
-    if (element.getViewProvider().getLanguages().size() > 1) return;
+    if (element.getViewProvider() instanceof TemplateLanguageFileViewProvider) return;
 
     PsiDirectory dir = element.getContainingDirectory();
     if (dir == null) return;