Package org.eclipse.emf.common.util

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


   
    // uri can be platform-specific or not ...
    if (oFileURI.isPlatform()) {
      // leaving out the first ("resource") and the last (the file name)
      StringBuffer sLocalDirectory = new StringBuffer();
      for (int i = 1; i < oFileURI.segmentCount() - 1; ++i) {
        sLocalDirectory.append(oFileURI.segment(i) + "/");
      }

      Configuration.setLocalSourceDirectory(sLocalDirectory.toString());
      Configuration.setWorkspacePath(ResourcesPlugin.getWorkspace()
View Full Code Here


      if (oFileURI.device() == null) {
        sLocalDirectory.append("/");
      } else {
        sLocalDirectory.append(oFileURI.device() + "/");
      }
      for (int i = 0; i < oFileURI.segmentCount() - 1; ++i) {
        sLocalDirectory.append(oFileURI.segment(i) + "/");
      }
      // replace placeholder with empty space
      while (true) {
        int i = sLocalDirectory.indexOf("%20");
View Full Code Here

       
        if (type2 != null && type2.eIsProxy())
        {
            URI proxyURI = type2.eProxyURI();

            String fullModelName = proxyURI.segments()[proxyURI.segmentCount()-1];
            modelName = fullModelName.substring( 0, fullModelName.lastIndexOf( '.' ) );
           
        }

        return modelName;
View Full Code Here

       
        if (type2 != null && type2.eIsProxy())
        {
            URI proxyURI = type2.eProxyURI();

            String fullModelName = proxyURI.segments()[proxyURI.segmentCount()-1];
            modelName = fullModelName.substring( 0, fullModelName.lastIndexOf( '.' ) );
           
        }

        return modelName;
View Full Code Here

       
        if (type2 != null && type2.eIsProxy())
        {
            URI proxyURI = type2.eProxyURI();

            String fullModelName = proxyURI.segments()[proxyURI.segmentCount()-1];
            modelName = fullModelName.substring( 0, fullModelName.lastIndexOf( '.' ) );
           
        }

        return modelName;
View Full Code Here

    if (resource == null)
      return null;

    URI uri = resource.getURI();

    if (uri.segmentCount() != 3)
      return null;

    return uri.segment(2);
  }
View Full Code Here

    if (resource == null)
      return null;

    URI uri = resource.getURI();

    if (uri.segmentCount() != 3)
      return null;

    return uri.segment(2);
  }
View Full Code Here

  private static final String EXCLUDES = "excludes"; //$NON-NLS-1$

  @Override
public boolean canResolve(IVirtualComponent component, ReferencedComponent referencedComponent) {
    URI uri = referencedComponent.getHandle();
    return uri != null && (uri.segmentCount() > 2) && (uri.segment(0).equals("overlay")); //$NON-NLS-1$
  }

  @Override
public IVirtualReference resolve(IVirtualComponent component, ReferencedComponent referencedComponent) {
  String type = referencedComponent.getHandle().segment(1);
View Full Code Here

      String _path = imgRef.getPath();
      final URI relativeImageURI = URI.createFileURI(_path);
      URI _resolve = relativeImageURI.resolve(uri);
      final URI inPath = _resolve.deresolve(absoluteLocalPath);
      List<String> _segmentsList = inPath.segmentsList();
      int _segmentCount = inPath.segmentCount();
      final List<String> inSegments = _segmentsList.subList(1, _segmentCount);
      final String pathInDocument = IterableExtensions.join(inSegments, "/");
      Object _get = this.config.get(Config.outletPath);
      String _string = _get.toString();
      String _plus_1 = (_string + "/");
View Full Code Here

    if (object instanceof URI) {
      URI fontURI = (URI) object;
      if (!"font".equals(fontURI.scheme()))
        throw new IllegalArgumentException("Only 'font' scheme is recognized" + fontURI);

      if (fontURI.segmentCount() != 2)
        throw new IllegalArgumentException("The URI must have an authority and two segments");

      // font name
      String fontNameSpecification = fontURI.authority();
      if ("".equals(fontNameSpecification))
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.