Java 类com.intellij.psi.ServerPageFile 实例源码

项目:intellij-ce-playground    文件:NonJavaFileGroupingRule.java   
@Override
public UsageGroup groupUsage(@NotNull Usage usage) {
  final FileUsageGroup usageGroup = (FileUsageGroup)super.groupUsage(usage);
  if (usageGroup != null) {
    final PsiFile psiFile = usageGroup.getPsiFile();
    if (psiFile instanceof PsiJavaFile && !(psiFile instanceof ServerPageFile)) {
      return null;
    }
  }
  return usageGroup;
}
项目:consulo-java    文件:JavadocGeneratorRunProfile.java   
@Override
public void visitFile(PsiFile file)
{
    final VirtualFile fileOrDir = file.getVirtualFile();
    if(fileOrDir == null)
    {
        return;
    }
    if(!fileOrDir.isInLocalFileSystem())
    {
        return;
    }
    final Module module = ModuleUtilCore.findModuleForFile(fileOrDir, myPsiManager.getProject());
    if(module != null)
    {
        myModules.add(module);
    }
    if(file instanceof PsiJavaFile)
    {
        final PsiJavaFile javaFile = (PsiJavaFile) file;
        final String packageName = javaFile.getPackageName();
        if(containsPackagePrefix(module, packageName) || (packageName.length() == 0 && !(javaFile instanceof ServerPageFile)) || !myUsePackageNotation)
        {
            mySourceFiles.add(FileUtil.toSystemIndependentName(fileOrDir.getPath()));
        }
        else
        {
            myPackages.add(packageName);
        }
    }
}
项目:intellij-ce-playground    文件:FileTypeUtils.java   
public static boolean isInServerPageFile(PsiElement file) {
  return PsiUtilCore.getTemplateLanguageFile(file) instanceof ServerPageFile;
}
项目:tools-idea    文件:FileTypeUtils.java   
public static boolean isInJsp(PsiElement file) {
  return PsiUtilCore.getTemplateLanguageFile(file) instanceof ServerPageFile;
}
项目:consulo-java    文件:FileTypeUtils.java   
public static boolean isInServerPageFile(PsiElement file)
{
    return PsiUtilCore.getTemplateLanguageFile(file) instanceof ServerPageFile;
}