Examples of toPlatformString()


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

              try {
                URI cpUri = URI.createURI(path);
                if (cpUri.isPlatformResource()) {
                  if (cpUri.lastSegment().equals("*")) {
                    cpUri = cpUri.trimSegments(1);
                    Path cpPath = new Path(cpUri.toPlatformString(true));
                    IWorkspaceRoot root = jp.getProject().getWorkspace().getRoot();
                    IFolder f = root.getFolder(cpPath);
                    if (f.exists()) {
                      for (IResource r : f.members()) {
                        IFile jarFile = (IFile) r;
View Full Code Here

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

                          }
                        }
                      }
                    }
                  } else {
                    Path cpPath = new Path(cpUri.toPlatformString(true));
                    IWorkspaceRoot root = jp.getProject().getWorkspace().getRoot();
                    IFile jarFile = root.getFile(cpPath);
                    if (jarFile.exists()) {
                      try {
                        extraPaths.add(jarFile.getLocation().toFile().toURI().toURL());
View Full Code Here

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

    return editor.getDocument().readOnly(new IUnitOfWork<IFile, XtextResource>() {

      @Override
      public IFile exec(XtextResource resource) throws Exception {
        URI uri = resource.getURI();
        Path structureFilePath = new Path(uri.toPlatformString(true));
        IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(structureFilePath);
        if( f.exists() ) {
          return f;
        }
        return null;
View Full Code Here

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

      } catch (Exception e) {
        // TODO: handle exception
      }
     
      if( fileUri != null && fileUri.isPlatformResource() ) {
        Path path = new Path(fileUri.toPlatformString(true));
        IWorkspaceRoot root = jp.getProject().getWorkspace().getRoot();
        IFile file = root.getFile(path);
        if( file.exists() ) {
          return file.getLocation().toFile().getAbsoluteFile();
        }
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.