Package com.intellij.openapi.vfs

Examples of com.intellij.openapi.vfs.VirtualFile.findChild()


      isAtPluginRoot = LivePluginAppComponent.pluginIdToPathMap().containsValue(parentFile.getCanonicalPath());
    }

    boolean fileDoesNotExist = false;
    if (isAtPluginRoot) {
      fileDoesNotExist = (parentFile.findChild(newFileName) == null);
    }

    Presentation presentation = e.getPresentation();
    presentation.setVisible(isAtPluginRoot && fileDoesNotExist);
    presentation.setEnabled(isAtPluginRoot && fileDoesNotExist);
View Full Code Here


      if (dir == null || !dir.isDirectory()) {
        continue;
      }

      final VirtualFile parentDir = dir.getParent();
      if (parentDir != null && parentDir.findChild(PubspecYamlUtil.PUBSPEC_YAML) != null) {
        if ("build".equals(dir.getName())) {
          return null; // contents of "build" folder should be served by the IDE internal web server directly, i.e. without pub serve
        }

        servedDir = dir;
View Full Code Here

    List<String> paths = ContainerUtil.newArrayList();
    if (project == null) return paths;
    VirtualFile baseDir = project.getBaseDir();
    if (baseDir == null) return paths;

    if (baseDir.findChild(FOLDER_PLATFORMS) != null ||
        baseDir.findChild(FOLDER_WWW) != null ||
        baseDir.findChild(FOLDER_CORDOVA) != null) {

      ContainerUtil.addIfNotNull(paths, project.getBasePath());
    }
View Full Code Here

    if (project == null) return paths;
    VirtualFile baseDir = project.getBaseDir();
    if (baseDir == null) return paths;

    if (baseDir.findChild(FOLDER_PLATFORMS) != null ||
        baseDir.findChild(FOLDER_WWW) != null ||
        baseDir.findChild(FOLDER_CORDOVA) != null) {

      ContainerUtil.addIfNotNull(paths, project.getBasePath());
    }
    else {
View Full Code Here

    VirtualFile baseDir = project.getBaseDir();
    if (baseDir == null) return paths;

    if (baseDir.findChild(FOLDER_PLATFORMS) != null ||
        baseDir.findChild(FOLDER_WWW) != null ||
        baseDir.findChild(FOLDER_CORDOVA) != null) {

      ContainerUtil.addIfNotNull(paths, project.getBasePath());
    }
    else {
      addPaths(paths, getFolders(project));
View Full Code Here

    final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(module.getProject()).getFileIndex();
    final VirtualFile root = pubspecYamlFile.getParent();

    // java.io.File is used here because exclusion is done before FS refresh (in order not to trigger indexing of files that are going to be excluded)
    final File pubFolder = new File(root.getPath() + "/.pub");
    if (pubFolder.isDirectory() || ApplicationManager.getApplication().isUnitTestMode() && root.findChild(".pub") != null) {
      newExcludedPackagesUrls.add(root.getUrl() + "/.pub");
    }

    final File buildFolder = new File(root.getPath() + "/build");
    if (buildFolder.isDirectory() || ApplicationManager.getApplication().isUnitTestMode() && root.findChild("build") != null) {
View Full Code Here

    if (pubFolder.isDirectory() || ApplicationManager.getApplication().isUnitTestMode() && root.findChild(".pub") != null) {
      newExcludedPackagesUrls.add(root.getUrl() + "/.pub");
    }

    final File buildFolder = new File(root.getPath() + "/build");
    if (buildFolder.isDirectory() || ApplicationManager.getApplication().isUnitTestMode() && root.findChild("build") != null) {
      newExcludedPackagesUrls.add(root.getUrl() + "/build");
    }

    final VirtualFile binFolder = root.findChild("bin");
    if (binFolder != null && binFolder.isDirectory() && fileIndex.isInContent(binFolder)) {
View Full Code Here

                // ignore
              }
            }
          }
          LOG.debug("Cleaning temporary files");
          deleteFile(project, directory.findChild(launcherFileName));
          deleteFile(project, directory.findChild(resultsFileName));
          if (!processHandler.isProcessTerminated() && !processHandler.isProcessTerminating()) {
            processHandler.destroyProcess();
          }
        }
View Full Code Here

              }
            }
          }
          LOG.debug("Cleaning temporary files");
          deleteFile(project, directory.findChild(launcherFileName));
          deleteFile(project, directory.findChild(resultsFileName));
          if (!processHandler.isProcessTerminated() && !processHandler.isProcessTerminating()) {
            processHandler.destroyProcess();
          }
        }
        catch (ExecutionException e) {
View Full Code Here

            LocalFileSystem.getInstance().refreshAndFindFileByPath(moduleFileName);
            Module module = ModuleManager.getInstance(project).loadModule(moduleFileName);
            VirtualFile file = LocalFileSystem.getInstance().findFileByPath(moduleDirPath);
            assertNotNull(moduleDirPath, file);
            PsiTestUtil.addContentRoot(module, file);
            PsiTestUtil.addSourceRoot(module, file.findChild("src"));
          }
        }
      }
    }.execute().throwException();
  }
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.