Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IPath.addTrailingSeparator()


   */
  public static String getDirName(String path)
  {
    IPath p = Path.fromOSString(path);
    p = p.uptoSegment(p.segmentCount() - 1);
    return p.addTrailingSeparator().toOSString();
  }

  /**
   * Gets the file name minus the extension from the supplied path.
   * <pre>
 
View Full Code Here


  private String getHome()
    throws IOException
  {
    Bundle bundle = Platform.getBundle(BASE);
    IPath p = Path.fromOSString(FileLocator.getBundleFile(bundle).getPath());
    return p.addTrailingSeparator().toOSString();
  }

  private int getPort()
  {
    String portString = Services.getPluginResources("org.eclim")
View Full Code Here

    if (externalPath.getDevice() == null) {
      result = result.setDevice(null);
    }
    // keep trailing separator only if it was specified (this is because File.getCanonicalPath() converts 'd:/lib/classes/' to 'd:/lib/classes')
    if (externalPath.hasTrailingSeparator()) {
      result = result.addTrailingSeparator();
    }
    return result;
  }

  /**
 
View Full Code Here

          System.arraycopy(patterns, 0, newPatterns, 0, i);
          newPatternsIndex = i;
        }
        IPath newPattern = this.destination.removeFirstSegments(1);
        if (pattern.hasTrailingSeparator())
          newPattern = newPattern.addTrailingSeparator();
        newPatterns[newPatternsIndex++] = newPattern;
      }
    }
    return newPatterns;
  }
View Full Code Here

    try{
      IPath out = javaProject.getOutputLocation();
      paths.add(
          ProjectUtils.getFilePath(
            javaProject.getProject(),
            out.addTrailingSeparator().toOSString()));
    }catch(JavaModelException ignore){
      // ignore... just signals that no output dir was configured.
    }

    IProject project = javaProject.getProject();
View Full Code Here

          IPath out = entry.getOutputLocation();
          if (out != null){
            paths.add(
                ProjectUtils.getFilePath(
                  javaProject.getProject(),
                  out.addTrailingSeparator().toOSString()));
          }
          break;
      }
    }
    // depth second
View Full Code Here

    IPath folders = path.removeLastSegments(1).removeFirstSegments(1);
    IPath checkPath = Path.ROOT;
    int segmentCount = folders.segmentCount();
    for(int i = 0; i < segmentCount; i++) {
      checkPath = checkPath.addTrailingSeparator().append(folders.segment(i));
      IFolder folder = project.getFolder(checkPath);
      if(!folder.exists())
        folder.create(true, true, null);
    }
    linkFile.createLink(uri, IResource.ALLOW_MISSING_LOCAL, null);
View Full Code Here

            if (javaProject != null) {
                List<URL> entries = new ArrayList<URL>();
                IPath path = javaProject.getOutputLocation();
                IResource iResource = root.findMember(path);
                path = iResource.getLocation();
                path = path.addTrailingSeparator();
                entries.add(path.toFile().toURL());
               
                IClasspathEntry[] cpEntries = javaProject.getRawClasspath();
                for (IClasspathEntry cpEntry : cpEntries) {
                    switch (cpEntry.getEntryKind()) {
View Full Code Here

                    case IClasspathEntry.CPE_SOURCE:
                        path = cpEntry.getOutputLocation();
                        if (path != null) {
                            iResource = root.findMember(path);
                            path = iResource.getLocation();
                            path = path.addTrailingSeparator();
                            entries.add(path.toFile().toURL());
                        }
                        break;
                   
                    case IClasspathEntry.CPE_LIBRARY:
View Full Code Here

            if (javaProject != null) {
                List<URL> entries = new ArrayList<URL>();
                IPath path = javaProject.getOutputLocation();
                IResource iResource = root.findMember(path);
                path = iResource.getLocation();
                path = path.addTrailingSeparator();
                entries.add(path.toFile().toURI().toURL());
               
                IClasspathEntry[] cpEntries = javaProject.getRawClasspath();
                for (IClasspathEntry cpEntry : cpEntries) {
                    switch (cpEntry.getEntryKind()) {
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.