Package java.nio.file

Examples of java.nio.file.Path


 
 
  // ------------  syntax and semantic operations util ------------
 
  public static Module getParsedModule_NoWaitInUI(IModuleSource input) {
    Path filePath = DToolClient.getPathHandleForModuleSource(input);
    if(filePath == null) {
      return null;
    }
   
    if(Display.getCurrent() == null) {
View Full Code Here


   
    List<FindDefinitionResultEntry> results = new ArrayList<>();
    for (INamedElement namedElement : defElements) {
      final DefUnit defUnit = namedElement.resolveDefUnit();
     
      Path compilationUnitPath = null;
      SourceRange sourceRange = null;
     
      if(defUnit != null) { // This can happen with intrinsic elements
       
        compilationUnitPath = defUnit.getModuleNode().compilationUnitPath;
View Full Code Here

   
    return null;
  }
 
  protected CompilerInstall detectDMDInstall(Path commandPath) {
    Path cmdDir = commandPath.getParent();
   
    if(cmdDir.resolve("../../src/druntime").toFile().exists()) {
      return new CompilerInstall(commandPath, ECompilerType.DMD,
        cmdDir.resolve("../../src/druntime/import"),
        cmdDir.resolve("../../src/phobos"));
    }
    // a MacOSX layout:
    if(cmdDir.resolve("../src/druntime").toFile().exists()) {
      return new CompilerInstall(commandPath, ECompilerType.DMD,
        cmdDir.resolve("../src/druntime/import"),
        cmdDir.resolve("../src/phobos"));
    }
    // another MacOSX layout
    Path resolvedCmdPath = cmdDir.resolve("../share/dmd/bin/dmd");
    if(resolvedCmdPath.toFile().exists()) {
      Path resolvedCmdDir = resolvedCmdPath.getParent();
      if(resolvedCmdDir.resolve("../src/druntime").toFile().exists()) {
        return new CompilerInstall(resolvedCmdPath, ECompilerType.DMD,
          resolvedCmdDir.resolve("../src/druntime/import"),
          resolvedCmdDir.resolve("../src/phobos"));
      }
    }
   
    if(cmdDir.resolve("../include/dlang/dmd").toFile().exists()) {
      return new CompilerInstall(commandPath, ECompilerType.DMD,
View Full Code Here

    }
    return null;
  }
 
  protected CompilerInstall detectLDCInstall(Path commandPath) {
    Path cmdDir = commandPath.getParent();
   
    if(cmdDir.resolve("../include/dlang/ldc").toFile().exists()) {
      return new CompilerInstall(commandPath, ECompilerType.LDC,
        cmdDir.resolve("../include/dlang/ldc"));
    }
   
    if(cmdDir.resolve("../import/core").toFile().exists()) {
      return new CompilerInstall(commandPath, ECompilerType.LDC,
        cmdDir.resolve("../import/ldc"),
        cmdDir.resolve("../import"));
    }
    return null;
  }
View Full Code Here

    }
    return null;
  }
 
  protected CompilerInstall detectGDCInstall(Path commandPath) {
    Path cmdDir = commandPath.getParent();
   
    if(cmdDir.resolve("../include/dlang/gdc").toFile().exists()) {
      return new CompilerInstall(commandPath, ECompilerType.GDC,
        cmdDir.resolve("../include/dlang/gdc"));
    }
   
    CompilerInstall install = checkGDCLibrariesAt(cmdDir.resolve("../include/d"), commandPath);
    if(install != null)
      return install;
   
    return checkGDCLibrariesAt(cmdDir.resolve("../include/d2"), commandPath);
  }
View Full Code Here

    return this;
  }
 
  @Override
  protected void searchPathEntry(Path pathEntry) {
    Path exePath;
    if((exePath = executableExists(pathEntry, "dmd")) != null) {
      addPossibleInstall(detector.detectDMDInstall(exePath));
    }
    if((exePath = executableExists(pathEntry, "gdc")) != null) {
      addPossibleInstall(detector.detectGDCInstall(exePath));
View Full Code Here

      foundInstalls.add(install);
    }
  }
 
  protected Path executableExists(Path pathEntry, String executableFileName) {
    Path exePath;
    if((exePath = pathEntry.resolve(executableFileName)).toFile().exists()) {
      return exePath;
    }
    if((exePath = pathEntry.resolve(executableFileName + ".exe")).toFile().exists()) {
      return exePath;
View Full Code Here

 
  public synchronized boolean checkIsModuleContentsStale() {
    ModuleParseCache parseCache = manager.parseCache;
   
    for (Entry<Path, ResolvedModule> entry : resolvedModules.entrySet()) {
      Path path = entry.getKey();
      ResolvedModule currentModule = entry.getValue();
     
      ParsedModule parsedModule = parseCache.getEntry(path).getParsedModuleIfNotStale(true);
      if(parsedModule == null) {
        return true;
View Full Code Here

  protected ResolvedModule getBundleResolvedModule(String moduleFullName) throws ParseSourceException {
    return getBundleResolvedModule(new ModuleFullName(moduleFullName));
  }
 
  protected ResolvedModule getBundleResolvedModule(ModuleFullName moduleFullName) throws ParseSourceException {
    Path modulePath = getBundleModulePath(moduleFullName);
    return modulePath == null ? null : getBundleResolvedModule(modulePath);
  }
View Full Code Here

    // directory should end with "/"
    if (!base_dir.endsWith("/") && !base_dir.endsWith("\\")) {
      base_dir += "/";
    }
    directory = base_dir + port + "/";
    final Path dP = Paths.get(directory);
    if (!Files.isDirectory(dP)) {
      try {
        /*
         * create index on first run!
         */
        Files.createDirectories(dP);
        // Fast RDF3X IndexConstructu
        RDF3XEmptyIndexConstruction
            .main(new String[] { dP.toString() });
      } catch (final IOException e) {
      }
    }

    /*
     * set parameters
     */
    LiteralFactory
        .setTypeWithoutInitializing(MapType.LAZYLITERALWITHOUTINITIALPREFIXCODEMAP);
    LiteralFactory.setType(MapType.LAZYLITERALWITHOUTINITIALPREFIXCODEMAP);

    // create the evaluatr
    this.dir = dP.toString();
    this.evaluator = Endpoint.createQueryEvaluator(directory);

    // evaluate context for SPARQL query processing...
    // this endpoint-handler is only used for adding / removing, not for
    // querying!!
View Full Code Here

TOP

Related Classes of java.nio.file.Path

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.