Examples of findFile()


Examples of com.intellij.psi.PsiManager.findFile()

    public BasePsiElement getObjectNavigationElement(DBSchemaObject parentObject, DBContentType contentType, DBObjectType objectType, CharSequence objectName) {
        DatabaseEditableObjectFile databaseFile = parentObject.getVirtualFile();
        PsiManager psiManager = PsiManager.getInstance(parentObject.getProject());
        DatabaseContentFile contentFile = databaseFile.getContentFile(contentType);
        if (contentFile != null) {
            PSQLFile file = (PSQLFile) psiManager.findFile(contentFile);
            if (file != null) {
                return
                    contentType == DBContentType.CODE_BODY ? file.lookupObjectDeclaration(objectType, objectName) :
                    contentType == DBContentType.CODE_SPEC ? file.lookupObjectSpecification(objectType, objectName) : null;
            }
View Full Code Here

Examples of com.intellij.psi.PsiManager.findFile()

        Set<String> fullPathsForName = names.get(name);
        if (fullPathsForName != null) {
            for (String s : fullPathsForName) {
                VirtualFile vfile = localFileSystem.findFileByPath(s);
                if (vfile != null) {
                    result.add(psiManager.findFile(vfile));
                }
            }
        }
        return result.toArray(new NavigationItem[result.size()]);
View Full Code Here

Examples of com.intellij.psi.PsiManager.findFile()

        }
        List<PsiFile> result = new ArrayList<PsiFile>();
        PsiManager manager = PsiManager.getInstance(psiClass.getProject());
        for (VirtualFile file : files) {
            if (file.isValid()) {
                PsiFile psiFile = manager.findFile(file);
                if (psiFile != null) {
                    result.add(psiFile);
                }
            }
        }
View Full Code Here

Examples of com.intellij.psi.PsiManager.findFile()

    if (project == null || files == null) return Collections.emptyList();
    final PsiManager manager = PsiManager.getInstance(project);
    return ContainerUtil.mapNotNull(files, new Function<VirtualFile, BnfFile>() {
      @Override
      public BnfFile fun(VirtualFile file) {
        PsiFile psiFile = manager.findFile(file);
        return psiFile instanceof BnfFile ? (BnfFile)psiFile : null;
      }
    });
  }
View Full Code Here

Examples of com.intellij.psi.PsiManager.findFile()

  public static void insertImport(@NotNull PsiFile context, @Nls String componentName, @NotNull String urlToImport) {
    final PsiManager psiManager = context.getManager();
    libraryRootLoop:
    for (VirtualFile libraryRoot : DartResolveUtil.findLibrary(context)) {
      final PsiFile file = psiManager.findFile(libraryRoot);
      if (file == null) {
        continue;
      }
      final DartImportStatement[] importStatements = PsiTreeUtil.getChildrenOfType(file, DartImportStatement.class);
      if (importStatements != null) {
View Full Code Here

Examples of com.intellij.psi.PsiManager.findFile()

      path = LocalFileSystem.getInstance().findFileByPath(directoryName);
    }
    if (path != null) {
      PsiManager psiManager = PsiManager.getInstance(project);
      if (!path.isDirectory()) {
        return psiManager.findFile(path);
      }
    }
    return null;
  }
View Full Code Here

Examples of com.intellij.psi.PsiManager.findFile()

    final Set<VirtualFile> files = new THashSet<VirtualFile>();
    for (final VirtualFile file : context.getCompileScope().getFiles(StdFileTypes.XML, false)) {
      final Module module = context.getModuleByFile(file);
      if (module != null &&
          enabledForModule.get(module)) {
        final PsiFile psiFile = psiManager.findFile(file);
        if (psiFile instanceof XmlFile) {
          final StrutsModel model = strutsManager.getModelByFile((XmlFile) psiFile);
          if (model != null) {
            for (final XmlFile configFile : model.getConfigFiles()) {
              ContainerUtil.addIfNotNull(configFile.getVirtualFile(), files);
View Full Code Here

Examples of com.intellij.psi.PsiManager.findFile()

    // collect all validation.xml files located in sources of S2-modules
    final Set<VirtualFile> files = new THashSet<VirtualFile>();
    for (final VirtualFile file : context.getProjectCompileScope().getFiles(StdFileTypes.XML, true)) {
      if (StringUtil.endsWith(file.getName(), FILENAME_EXTENSION_VALIDATION_XML)) {
        final PsiFile psiFile = psiManager.findFile(file);
        if (psiFile instanceof XmlFile &&
            validatorManager.isValidatorsFile((XmlFile) psiFile)) {
          final Module module = ModuleUtilCore.findModuleForFile(file, project);
          if (module != null &&
              enabledForModule.get(module)) {
View Full Code Here

Examples of com.intellij.psi.PsiManager.findFile()

    final PsiManager psiManager = PsiManager.getInstance(context.getProject());
    final List<VirtualFilePointer> list = fileSet.getFiles();
    for (VirtualFilePointer pointer : list) {
      final VirtualFile file = pointer.getFile();
      if (file != null) {
        final PsiFile psiFile = psiManager.findFile(file);
        if (psiFile != null && psiFiles.contains(psiFile)) {
          continue;
        }
        builder.addFile(file);
      }
View Full Code Here

Examples of com.intellij.psi.PsiManager.findFile()

      for (final VirtualFilePointer filePointer : set.getFiles()) {
        final VirtualFile file = filePointer.getFile();
        if (file == null) {
          continue;
        }
        final PsiFile psiFile = psiManager.findFile(file);
        if (psiFile instanceof XmlFile) {
          final StrutsRoot strutsRootDom = getDom((XmlFile) psiFile);
          if (strutsRootDom != null) {
            files.add((XmlFile) psiFile);
// TODO           addIncludes(files, strutsRootDom);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.