Package org.eclipse.emf.common.util

Examples of org.eclipse.emf.common.util.URI.segmentCount()


        throw new IllegalArgumentException("Only 'color' scheme is recognized " + colorURI);

      if (!"rgb".equals(colorURI.authority()))
        throw new IllegalArgumentException("Only 'rgb' authority is recognized " + colorURI);

      if (colorURI.segmentCount() != 3)
        throw new IllegalArgumentException("Color must have 3 segments (r, g, b) " + colorURI);

      return colorURI;
    }
View Full Code Here


        Bundle b = org.eclipse.core.runtime.Platform.getBundle(uri.segment(1));
        if (b != null) {
          try {
            StringBuilder sb = new StringBuilder();
            for (int i = 2; i < uri.segmentCount(); i++) {
              if (sb.length() != 0) {
                sb.append("/");
              }
              sb.append(uri.segment(i));
            }
View Full Code Here

    } else {
      URI uri = model.eResource().getURI();
      IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(uri.segment(1));
     
      IPath path = null;
      for( int i = 2; i < uri.segmentCount() - 1; i++ ) {
        if( path == null ) {
          path = new Path(uri.segment(i));
        } else {
          path = path.append(uri.segment(i));
        }
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.