don't set package for template PsiClassOwners (IDEA-52048)
authorpeter <peter.gromov@jetbrains.com>
Tue, 9 Mar 2010 10:27:36 +0000 (10:27 +0000)
committerpeter <peter.gromov@jetbrains.com>
Tue, 9 Mar 2010 12:54:14 +0000 (12:54 +0000)
java/java-impl/src/com/intellij/psi/impl/file/JavaUpdateAddedFileProcessor.java

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