Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.Path.removeFirstSegments()


      return new ILibInfo[0];
   
    String version = dojoProps.getProperty("dojo-version-attribute-name");
    String path = dojoProps.getProperty("dojo-root");
    IPath fullPath = new Path(path);
    String simplePath = fullPath.removeFirstSegments(1).toString();
   
    for(int i=0;i<simpleVersion.length;i++){
      if(version.indexOf(simpleVersion[i]) > -1){
        version = simpleVersion[i];
        break;
View Full Code Here


      return url;
    }
    IUser user = null;
    IPath ipath = new Path(path);
    if (ipath.segment(0).equals(contextPathSegment)) {
       ipath = ipath.removeFirstSegments(1);
    }
    if (ipath.segment(0).equals("maqetta")) {
      if (ipath.segment(1).equals("user")) {
         ipath = ipath.removeFirstSegments(2);
        String userName = ipath.segment(0);
View Full Code Here

    if (ipath.segment(0).equals(contextPathSegment)) {
       ipath = ipath.removeFirstSegments(1);
    }
    if (ipath.segment(0).equals("maqetta")) {
      if (ipath.segment(1).equals("user")) {
         ipath = ipath.removeFirstSegments(2);
        String userName = ipath.segment(0);
        try {
          user = userManager.getUser(userName);
        } catch (UserException e) {
          // TODO surface error up the stack
View Full Code Here

        } catch (IOException e) {
          // TODO surface error up the stack
          e.printStackTrace();
          return null;
        }
        ipath = ipath.removeFirstSegments(1);
        if (ipath.segment(0).equals("ws") && ipath.segment(1).equals("workspace")) {
          ipath = ipath.removeFirstSegments(2);
        }
      } else {
        user = userManager.getSingleUser();
View Full Code Here

          e.printStackTrace();
          return null;
        }
        ipath = ipath.removeFirstSegments(1);
        if (ipath.segment(0).equals("ws") && ipath.segment(1).equals("workspace")) {
          ipath = ipath.removeFirstSegments(2);
        }
      } else {
        user = userManager.getSingleUser();
      }
      int removecount = 0;
View Full Code Here

        for (final OtpErlangObject ebeam : list) {
            final OtpErlangString beam = (OtpErlangString) ebeam;
            final String sbeam = beam.stringValue();
            IPath p = new Path(sbeam);
            p = p.removeLastSegments(1);
            p = p.removeFirstSegments(project.getLocation().segmentCount());
            p = p.setDevice(null);
            paths.put(p, sbeam);
        }
        for (final Entry<IPath, String> p : paths.entrySet()) {
            final IPath pp = p.getKey();
View Full Code Here

            }
            if(!includeLibs && files[i] instanceof VLibraryResource)
              continue;

          IPath filePath = new Path(files[i].getPath());
            String pathString = filePath.removeFirstSegments(filePath.matchingFirstSegments(root)).toString();
           
            if(pathString==null) return;
           
            /* remove leading characters that confuse and anger windows built in archive util */
            if(pathString.length() > 1 && pathString.indexOf("./")==0)
View Full Code Here

   * @return the image descriptor
   */
  public static ImageDescriptor findImageDescriptor(String path) {
    final IPath p = new Path(path);
    if (p.isAbsolute() && p.segmentCount() > 1) {
      return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p
          .removeFirstSegments(1).makeAbsolute().toString());
    } else {
      return getBundledImageDescriptor(p.makeAbsolute().toString());
    }
  }
View Full Code Here

    final IPath p = new Path(path);
   
    if (p.isAbsolute() && p.segmentCount() > 1)
    {
      return AbstractUIPlugin.imageDescriptorFromPlugin(
        p.segment(0), p.removeFirstSegments(1).makeAbsolute().toString());
    }
    else
    {
      return getBundledImageDescriptor(p.makeAbsolute().toString());
    }
View Full Code Here

    final IPath p = new Path(path);
   
    if (p.isAbsolute() && p.segmentCount() > 1)
    {
      return AbstractUIPlugin.imageDescriptorFromPlugin(
        p.segment(0), p.removeFirstSegments(1).makeAbsolute().toString());
    }
    else
    {
      return getBundledImageDescriptor(p.makeAbsolute().toString());
    }
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.