Examples of findFile()


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

    VirtualFile vFile = e.getData(CommonDataKeys.VIRTUAL_FILE);
    Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());

    if (project != null && vFile != null) {
      final PsiManager psiManager = PsiManager.getInstance(project);
      PsiFileSystemItem fsItem = vFile.isDirectory() ? psiManager.findDirectory(vFile) : psiManager.findFile(vFile);
      if (fsItem instanceof PyFile) {
        return (PyFile)fsItem;
      }
    }
View Full Code Here

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

  }

  private void processFile(Project project, VirtualFile file) {
    if (StdFileTypes.JAVA.equals(file.getFileType())) {
      final PsiManager psiManager = PsiManager.getInstance(project);
      PsiJavaFile psiFile = (PsiJavaFile) psiManager.findFile(file);
      if (psiFile != null) {
        process(project, psiFile);
      }
    }
  }
View Full Code Here

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

          //directory is valid
          isValid = true;
          break;
        }
        if (StdFileTypes.JAVA.equals(file.getFileType())) {
          PsiJavaFile psiFile = (PsiJavaFile) psiManager.findFile(file);
          if (psiFile != null) {
            for (PsiClass psiClass : psiFile.getClasses()) {
              if (isValidForClass(psiClass)) {
                isValid = true;
                break;
View Full Code Here

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

        CommonProcessors.CollectUniquesProcessor<String> localPackages = new CommonProcessors.CollectUniquesProcessor<String>();

        Function<VirtualFile, String> convertor = new Function<VirtualFile, String>() {
            public String fun(VirtualFile virtualFile) {

                GoFile goFile = (GoFile) psiManager.findFile(virtualFile);
                if (goFile == null) {
                    return "";
                }

                String packageName = goFile.getPackage().getPackageName();
View Full Code Here

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

        Processor<VirtualFile> processor = new AdapterProcessor<VirtualFile, String>(localPackages, convertor) {
            @Override
            public boolean process(VirtualFile file) {
                if (file.getFileType() == GoFileType.INSTANCE) {
                    GoFile goFile = (GoFile) psiManager.findFile(file);

                    if (goFile != null && !goFile.getPackage().isMainPackage()) {
                        super.process(file);
                    }
View Full Code Here

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

    if (selectedFiles == null) return Collections.emptyList();

    List<ErlangFile> testFiles = new ArrayList<ErlangFile>(selectedFiles.length);
    PsiManager psiManager = PsiManager.getInstance(project);
    for (VirtualFile file : selectedFiles) {
      ContainerUtil.addIfNotNull(testFiles, getFileTestElement(psiManager.findFile(file)));
      PsiDirectory directory = psiManager.findDirectory(file);
      if (directory != null) {
        addTestFilesFromDirectory(testFiles, directory);
      }
    }
View Full Code Here

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

    List<VirtualFile> virtualFiles = getVirtualFilesByName(project, name, searchScope);
    return ContainerUtil.mapNotNull(virtualFiles, new Function<VirtualFile, T>() {
      @Nullable
      @Override
      public T fun(@NotNull VirtualFile virtualFile) {
        PsiFile psiFile = psiManager.findFile(virtualFile);
        return psiFile instanceof ErlangFile ? psiMapper.fun((ErlangFile)psiFile) : null;
      }
    });
  }
View Full Code Here

Examples of org.apache.commons.vfs.provider.FileProvider.findFile()

        {
// An absolute URI - locate the provider
            final FileProvider provider = (FileProvider) providers.get(scheme);
            if (provider != null)
            {
                return provider.findFile(realBaseFile, uri, fileSystemOptions);
            }
// Otherwise, assume a local file
        }

// Handle absolute file names
View Full Code Here

Examples of org.apache.commons.vfs.provider.FileProvider.findFile()

    {
      // An absolute URI - locate the provider
      final FileProvider provider = (FileProvider) providers.get(scheme);
      if (provider != null)
      {
        return provider.findFile(realBaseFile, uri, fileSystemOptions);
      }
      // Otherwise, assume a local file
    }

    // Handle absolute file names
View Full Code Here

Examples of org.apache.commons.vfs2.provider.FileProvider.findFile()

        {
            // An absolute URI - locate the provider
            final FileProvider provider = providers.get(scheme);
            if (provider != null)
            {
                return provider.findFile(realBaseFile, uri, fileSystemOptions);
            }
            // Otherwise, assume a local file
        }

        // Handle absolute file names
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.