Examples of segments()


Examples of com.foundationdb.ais.model.HKey.segments()

    {
        // Key traversal
        int keySize = key.getDepth();
        // HKey traversal
        HKey hKey = rowDef.table().hKey();
        List<HKeySegment> hKeySegments = hKey.segments();
        int k = 0;
        // Traverse key, guided by hKey, populating result
        Object[] keyArray = new Object[keySize];
        int h = 0;
        key.indexTo(0);
View Full Code Here

Examples of com.foundationdb.qp.row.HKey.segments()

       row.copyFrom(pkKey, null);
      
       assertTrue (!row.keyEmpty());
       HKey hKey = row.ancestorHKey(customers);
       assertNotNull (hKey);
       assertTrue(hKey.segments() == 1);
       assertTrue(hKey.value(0).getInt64() == 1);
    }
   
    @Test
    public void testCopyFromItem() {
View Full Code Here

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

          Iterator elements = folders.iterator();
          int segments = path.segmentCount();
          while (elements.hasNext()) {
            IFolder f = (IFolder) elements.next();
            IPath relativePath = f.getFullPath().removeFirstSegments(segments);
            String[] pkgName = relativePath.segments();
            IPackageFragment pkg = root.getPackageFragment(pkgName);
            if (!Util.isExcluded(pkg))
              fragments.add(pkg);
          }
        }
View Full Code Here

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

        }

        IPath a = new Path(this.file.getAbsolutePath()).append(path);
        boolean directory = path.charAt(path.length()-1)=='/';
       
        String[] segments = a.segments();
        IPath me = new Path(this.file.getAbsolutePath());
        IVResource parent = this;
        for (int i = me.matchingFirstSegments(a); i < segments.length; i++) {
            int segsToEnd = segments.length - i - 1;
            IStorage f = file.newInstance(a.removeLastSegments(segsToEnd).toString());
View Full Code Here

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

              IPath myPath = new Path(this.resourcePointer.getPath());
              IPath itemPath = new Path(files[i].getPath());
              IPath newPath = itemPath.removeFirstSegments(myPath.matchingFirstSegments(itemPath));
              IVResource item = null;
             
              String[] pathSplit = newPath.segments();
             
              IVResource parent = this;
              IVResource lastParent = null;
              for(int k=0;k<pathSplit.length-1;k++){
                lastParent = parent;
View Full Code Here

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

        if (rsrc == null) {
            return null;
        }
        final IPath path = rsrc.getFullPath();
        IErlElement p = this;
        for (final String segment : path.segments()) {
            IErlElement c = p.getChildWithResource(rsrc);
            if (c != null) {
                return c;
            }
            c = p.getChildNamed(segment);
View Full Code Here

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

          Iterator elements = folders.iterator();
          int segments = path.segmentCount();
          while (elements.hasNext()) {
            IFolder f = (IFolder) elements.next();
            IPath relativePath = f.getFullPath().removeFirstSegments(segments);
            String[] pkgName = relativePath.segments();
            IPackageFragment pkg = root.getPackageFragment(pkgName);
            if (!Util.isExcluded(pkg))
              fragments.add(pkg);
          }
        }
View Full Code Here

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

        if (projectProvider == null) {
            throw new IllegalStateException("ProjectProvider must not be null");
        }

        IPath path = ((IFile) getFirstResult()).getFullPath().makeRelative();
        String segments[] = path.segments();

        // The 1st segment is the project. Subsequent segments for the number
        // of segments in the policy source are the policy source. All these
        // segments need to be stripped.
View Full Code Here

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

        if (projectProvider == null) {
            throw new IllegalStateException("ProjectProvider must not be null");
        }

        IPath path = ((IFile) getFirstResult()).getFullPath().makeRelative();
        String segments[] = path.segments();

        // The 1st segment is the project. Subsequent segments for the number
        // of segments in the policy source are the policy source. All these
        // segments need to be stripped.
View Full Code Here

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

    IPath fullPath = folder.getFullPath();
    IPath relativeTo = path.makeRelativeTo(fullPath);
    if(!relativeTo.isEmpty()) {
    sb.append("PACKAGE ");
    String pathString = "";
    for (int i = 0; i < relativeTo.segments().length; i++) {
      pathString += relativeTo.segments()[i];
      if (i < relativeTo.segments().length - 1) {
        pathString += ".";
      }
    }
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.