Package org.eclipse.core.runtime

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


    SourceIndexerRequestor requestor = new SourceIndexerRequestor(this);
    String documentPath = this.document.getPath();
    SourceElementParser parser = ((InternalSearchDocument) this.document).parser;
    if (parser == null) {
      IPath path = new Path(documentPath);
      IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
      parser = JavaModelManager.getJavaModelManager().indexManager.getSourceElementParser(JavaCore.create(project), requestor);
    } else {
      parser.requestor = requestor;
    }
   
View Full Code Here


      projects = new IJavaProject[length];
      int index = 0;
      for (int i = 0; i < length; i++) {
        IPath path = enclosingProjectsAndJars[i];
        if (!org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.isArchiveFileName(path.lastSegment())) {
          projects[index++] = this.javaModel.getJavaProject(path.segment(0));
        }
      }
      if (index < length) {
        System.arraycopy(projects, 0, projects = new IJavaProject[index], 0, index);
      }
View Full Code Here

  int resourceSegmentCount = fullPath.segmentCount();
  int sourceFolderSegmentCount = this.sourceLocation.sourceFolder.getFullPath().segmentCount();
  int charCount = (resourceSegmentCount - sourceFolderSegmentCount - 1);
  resourceSegmentCount--; // deal with the last segment separately
  for (int i = sourceFolderSegmentCount; i < resourceSegmentCount; i++)
    charCount += fullPath.segment(i).length();
  String lastSegment = fullPath.segment(resourceSegmentCount);
  int extensionIndex = Util.indexOfJavaLikeExtension(lastSegment);
  charCount += extensionIndex;

  char[] result = new char[charCount];
View Full Code Here

  int sourceFolderSegmentCount = this.sourceLocation.sourceFolder.getFullPath().segmentCount();
  int charCount = (resourceSegmentCount - sourceFolderSegmentCount - 1);
  resourceSegmentCount--; // deal with the last segment separately
  for (int i = sourceFolderSegmentCount; i < resourceSegmentCount; i++)
    charCount += fullPath.segment(i).length();
  String lastSegment = fullPath.segment(resourceSegmentCount);
  int extensionIndex = Util.indexOfJavaLikeExtension(lastSegment);
  charCount += extensionIndex;

  char[] result = new char[charCount];
  int offset = 0;
View Full Code Here

  charCount += extensionIndex;

  char[] result = new char[charCount];
  int offset = 0;
  for (int i = sourceFolderSegmentCount; i < resourceSegmentCount; i++) {
    String segment = fullPath.segment(i);
    int size = segment.length();
    segment.getChars(0, size, result, offset);
    offset += size;
    result[offset++] = '/';
  }
View Full Code Here

          if (!entry.isDirectory() && org.aspectj.org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(entryName = entry.getName())) {
            IPath path = new Path(entryName);
            int segmentCount = path.segmentCount();
            if (segmentCount > 1) {
              for (int i = 0, max = path.segmentCount() - 1; i < max; i++) {
                if (firstLevelPackageNames.contains(path.segment(i))) {
                  tempRoots.add(path.uptoSegment(i));
                  // don't break here as this path could contain other first level package names (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=74014)
                }
                if (i == max - 1 && containsADefaultPackage) {
                  tempRoots.add(path.uptoSegment(max));
View Full Code Here

                                        continue;

                                    IPath packagePath = new Path(entry.getKey());
                                    if (packagePath.segmentCount() < 1)
                                        continue;
                                    if ("META-INF".equalsIgnoreCase(packagePath.segment(0)))
                                        continue;

                                    availablePackages.add(packagePath);
                                }
                            } catch (Exception e) {} finally {
View Full Code Here

    if (parent == null)
      parent = this;

    IPath path = new Path(name);
    for (int i = 0; i < path.segmentCount(); i++) {
      parent = (VOrionStorage) parent.create(path.segment(i));
    }

    return parent;
  }
View Full Code Here

    IPath path = new Path(name);
    VOrionStorage result = this;
    for (int i = 0, len = path.segmentCount(); i < len; i++) {
      // getChild() is a handle-only method; a child is provided regardless of whether this
      // store or the child store exists, or whether this store represents a directory or not.
      IFileStore childStore = result.store.getChild(path.segment(i));
      result = new VOrionStorage(path.segment(i), childStore, result);
    }
    return result;
  }
View Full Code Here

    VOrionStorage result = this;
    for (int i = 0, len = path.segmentCount(); i < len; i++) {
      // getChild() is a handle-only method; a child is provided regardless of whether this
      // store or the child store exists, or whether this store represents a directory or not.
      IFileStore childStore = result.store.getChild(path.segment(i));
      result = new VOrionStorage(path.segment(i), childStore, result);
    }
    return result;
  }

  public Collection<IStorage> findFiles(IStorage parentFolder, String pathStr, boolean ignoreCase) {
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.