Package org.eclipse.core.runtime

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


    for(Version version : user.getVersions()){
      if(!version.getTime().equals(timeStamp)) continue;
      for(String res : version.resources){
        IPath resPath = new Path(res);
        while(resPath.segment(0).equals(".")) resPath = resPath.removeFirstSegments(1);
        if(dir.getName().equals(resPath.segment(0))){
          return true;
        }
      }
    }
    return false;
View Full Code Here


        List<File> files)
    {
        IPath p = cp.getPath();

        IProject project = sigil.getProject().getWorkspace().getRoot().getProject(
            p.segment(0));
        if (project.exists())
        {
            p = project.getLocation().append(p.removeFirstSegments(1));
        }
View Full Code Here

                            } else {
                                return 1;
                            }
                        }

                        return p1.segment(p1.segmentCount() - 1).compareTo(p2.segment(p2.segmentCount() - 1));
                    }

                    // find the first different segment path and return that
                    for (int i = 0; i < p1.segmentCount(); i++) {
                        String s1 = p1.segment(i);
View Full Code Here

                    }

                    // find the first different segment path and return that
                    for (int i = 0; i < p1.segmentCount(); i++) {
                        String s1 = p1.segment(i);
                        String s2 = p2.segment(i);

                        int res = s1.compareTo(s2);

                        if (res != 0) {
                            return res;
View Full Code Here

  @Override
  public boolean visit(IResourceDelta delta) throws CoreException {
    IResource res = delta.getResource();
    IPath ppath = res.getProjectRelativePath();
    int segmentCount = ppath.segmentCount();
    if (segmentCount == 1 && !"app".equals(ppath.segment(0))) {
      return false;
    } else if (segmentCount >= 2) {
      if ("japidviews".equals(ppath.segment(1))) {
         handleJapidviewsChange(delta, res);
      }
View Full Code Here

    IPath ppath = res.getProjectRelativePath();
    int segmentCount = ppath.segmentCount();
    if (segmentCount == 1 && !"app".equals(ppath.segment(0))) {
      return false;
    } else if (segmentCount >= 2) {
      if ("japidviews".equals(ppath.segment(1))) {
         handleJapidviewsChange(delta, res);
      }
      else if ("controllers".equals(ppath.segment(1))) {
        handleControllersChange(delta, res);
      }
View Full Code Here

      return false;
    } else if (segmentCount >= 2) {
      if ("japidviews".equals(ppath.segment(1))) {
         handleJapidviewsChange(delta, res);
      }
      else if ("controllers".equals(ppath.segment(1))) {
        handleControllersChange(delta, res);
      }
      else {
        return false;
      }
View Full Code Here

    return textEditor.getTitle();
  }

  public String enclosingDirectory() {
    IPath path = getFilePath();
    return path.segment(path.segmentCount() - 2);
  }

  /**
   *
   * @return the path of the file currently edited in the editor
View Full Code Here

    throw new RuntimeException("Not implemented");
  }
  public Collection findFiles(IStorage f1, String pathStr, boolean ignoreCase) {
    IOFileFilter filter;
    IPath path = new Path(pathStr);
    if (path.segment(0).equals("*")) {
      IOCase ioCase = ignoreCase ? IOCase.INSENSITIVE    : IOCase.SENSITIVE;
      filter = new NameFileFilter(path.lastSegment(), ioCase);
    } else {
      String lastSegment = path.lastSegment();
      if (lastSegment.startsWith("*")) {
View Full Code Here

      if (file == null) {
        continue;
      }
      IPath path = new Path(defaultRoot);
      for (int k = 0; k < path.segmentCount(); k++) {
        String segment = path.segment(k);
        IVResource v = root.get(segment);
        if (v == null) {
          /* creating virtual directory structure, so READ ONLY */
          v = new VDirectory( root, segment,true);
          root.add(v);
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.