Package org.eclipse.core.runtime

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


          // 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


        }
      } else {
        user = userManager.getSingleUser();
      }
      int removecount = 0;
      if (ipath.segment(0).equals(".review")) {
        removecount = 4;
      } else {
        removecount = user.getResource(ipath.segment(0)+"/.project") == null ? 1 : 2;
      }
      ILibInfo[] projectLibs = user.getLibs(ipath.segment(0));
View Full Code Here

      }
      int removecount = 0;
      if (ipath.segment(0).equals(".review")) {
        removecount = 4;
      } else {
        removecount = user.getResource(ipath.segment(0)+"/.project") == null ? 1 : 2;
      }
      ILibInfo[] projectLibs = user.getLibs(ipath.segment(0));
      url = scanSrcLibs(ipath, removecount, projectLibs);
      if (url != null) {
        return url;
View Full Code Here

      if (ipath.segment(0).equals(".review")) {
        removecount = 4;
      } else {
        removecount = user.getResource(ipath.segment(0)+"/.project") == null ? 1 : 2;
      }
      ILibInfo[] projectLibs = user.getLibs(ipath.segment(0));
      url = scanSrcLibs(ipath, removecount, projectLibs);
      if (url != null) {
        return url;
      }
    }
View Full Code Here

       
        if(path==null) return false;
       
        for (int i = 0; i < this.filterDirs.length; i++) {
            for(int k=0;k<path.segmentCount();k++){
              String seg = path.segment(k);
              if(seg!=null && seg.equalsIgnoreCase(filterDirs[i])) return true;
            }
           
           
        }
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

        // TODO try to preselect the current file
        dialog.open();
        Object[] results = dialog.getResult();
        if (results != null && results.length > 0 && results[0] instanceof IResource) {
            IPath path = ((IResource) results[0]).getFullPath();
            if (project != null && path.segment(0).equals(project.getProject().getName())) {
                setProjectLoc(path.removeFirstSegments(1).makeRelative().toString());
            } else {
                String containerName = path.makeRelative().toString();
                setWorkspaceLoc("${workspace_loc:" + containerName + "}");
            }
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

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