Package com.intellij.openapi.roots

Examples of com.intellij.openapi.roots.ContentIterator


    }

    private static List<String> getAllFiles(Module module, final Path except) {
        ModuleFileIndex index = ModuleRootManager.getInstance(module).getFileIndex();
        final List<String> files = new ArrayList<String>();
        index.iterateContent(new ContentIterator() {
            public boolean processFile(VirtualFile fileOrDir) {
                if (!fileOrDir.isDirectory()) {
                    FileType fileType = fileOrDir.getFileType();
                    String path = fileOrDir.getPath();
                    if (HaskellFileType.INSTANCE.equals(fileType) && !Paths.get(path).equals(except)) {
View Full Code Here


            "--line-number", String.valueOf(coord.line), "--column-number", String.valueOf(coord.column),
            "-f", file.getPath()
        );
        final List<String> srcFiles = new ArrayList<String>();
        ProjectFileIndex fileIndex = ProjectRootManager.getInstance(module.getProject()).getFileIndex();
        fileIndex.iterateContent(new ContentIterator() {
            public boolean processFile(VirtualFile virtualFile) {
                if (HaskellCompiler.isCompilableFile(virtualFile)) {
                    srcFiles.add(virtualFile.getPath());
                }
                return true;
View Full Code Here

                "-s", GHCUtil.rootsAsString(module, false),
                "--line-number", String.valueOf(coord.line), "--column-number", String.valueOf(coord.column),
                "-f", virtualFile.getPath()
            );
            final List<String> srcFiles = new ArrayList<String>();
            fileIndex.iterateContent(new ContentIterator() {
                public boolean processFile(VirtualFile virtualFile) {
                    if (HaskellCompiler.isCompilableFile(virtualFile)) {
                        srcFiles.add(virtualFile.getPath());
                    }
                    return true;
View Full Code Here

    Task.Backgroundable task = new Task.Backgroundable(project, HaxeBundle.message("haxe.project.reparsing"), false) {
      public void run(@NotNull ProgressIndicator indicator) {
        final Collection<VirtualFile> haxeFiles = new ArrayList<VirtualFile>();
        final VirtualFile baseDir = project.getBaseDir();
        if (baseDir != null) {
          FileBasedIndex.getInstance().iterateIndexableFiles(new ContentIterator() {
            public boolean processFile(VirtualFile file) {
              if (HaxeFileType.HAXE_FILE_TYPE == file.getFileType()) {
                haxeFiles.add(file);
              }
              return true;
View Full Code Here

        // get all fileMatchers
        final List<AlternateFileMatcher> fileMatchers = getFileMatchers(configuration, currentFilename);
        if (!fileMatchers.isEmpty()) {
            // iterate thru files
            final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex();
            projectFileIndex.iterateContent(new ContentIterator() {
                private PsiManager psiManager = PsiManager.getInstance(project);
                public boolean processFile(VirtualFile fileOrDir) {
                    // if not a directory
                    if (!fileOrDir.isDirectory()) {
                        // and not currentFile...
View Full Code Here

    Task.Backgroundable task = new Task.Backgroundable(project, CfmlBundle.message("applying.new.language.version.task.name"), false) {
      public void run(@NotNull ProgressIndicator indicator) {
        final Collection<VirtualFile> cfmlFiles = new ArrayList<VirtualFile>();
        final VirtualFile baseDir = project.getBaseDir();
        if (baseDir != null) {
          FileBasedIndex.getInstance().iterateIndexableFiles(new ContentIterator() {
            public boolean processFile(VirtualFile file) {
              if (CfmlFileType.INSTANCE == file.getFileType()) {
                cfmlFiles.add(file);
              }
              return true;
View Full Code Here

        final ArrayList<String> filePaths = new ArrayList<String>();
        if (!vFile.isDirectory()) {
            filePaths.add(vFile.getPath());
            return filePaths;
        }
        VfsUtil.iterateChildrenRecursively(vFile, null, new ContentIterator() {
            @Override
            public boolean processFile(VirtualFile file) {
                if (!file.isDirectory()) {
                    filePaths.add(file.getPath());
                }
View Full Code Here

        if (!fileImpl.isDirectory()) {
            if (fileImpl.isValid() && !context.isIgnored(fileImpl)) virtualFiles.add(fileImpl);
            return virtualFiles;
        }

        VfsUtil.iterateChildrenRecursively(vFile, null, new ContentIterator() {
            @Override
            public boolean processFile(VirtualFile file) {
                FileImpl fileImpl = new FileImpl(file);
                if (!context.isIgnored(fileImpl) && !fileImpl.isDirectory() && fileImpl.isValid()) {
                    virtualFiles.add(fileImpl);
View Full Code Here

TOP

Related Classes of com.intellij.openapi.roots.ContentIterator

Copyright © 2018 www.massapicom. 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.