retrieve file using file language
authorpeter <peter@jetbrains.com>
Wed, 25 Jan 2012 11:34:33 +0000 (12:34 +0100)
committerpeter <peter@jetbrains.com>
Wed, 25 Jan 2012 11:35:17 +0000 (12:35 +0100)
platform/lang-impl/src/com/intellij/psi/PsiAnchor.java

index 042dbf6bd1fc87f3dc4928803d195244f6112e47..6529269590fd9b962505a8a8cace97748e8c8aba 100644 (file)
@@ -182,7 +182,7 @@ public abstract class PsiAnchor {
     @Override
     @Nullable
     public PsiFile getFile() {
-      return SelfElementInfo.restoreFileFromVirtual(myVirtualFile, myProject, myLanguage);
+      return SelfElementInfo.restoreFileFromVirtual(myVirtualFile, myProject, myFileLanguage);
     }
 
     @Override
@@ -274,6 +274,7 @@ public abstract class PsiAnchor {
     }
 
     @Override
+    @Nullable
     public PsiFile getFile() {
       return SelfElementInfo.restoreFileFromVirtual(myFile, myProject);
     }
@@ -323,6 +324,7 @@ public abstract class PsiAnchor {
     }
   }
 
+  @Nullable
   public static PsiElement restoreFromStubIndex(PsiFileWithStubSupport fileImpl,
                                                 int index,
                                                 IStubElementType elementType) {