Package org.eclipse.ui

Examples of org.eclipse.ui.IURIEditorInput


            return new File(input.getPath().toOSString());
        }

        try {
            if (o instanceof IURIEditorInput) {
                IURIEditorInput iuriEditorInput = (IURIEditorInput) o;
                return new File(iuriEditorInput.getURI());
            }
        } catch (Throwable e) {
            //IURIEditorInput not added until eclipse 3.3
        }
        return null;
View Full Code Here


        return fFile;
    }

    public URI getURI(Object element) {
        if (element instanceof IURIEditorInput) {
            IURIEditorInput editorInput = (IURIEditorInput) element;
            return editorInput.getURI();
        }
        return null;
    }
View Full Code Here

            }
        }
        if (path == null) {
            try {
                if (otherInput instanceof IURIEditorInput) {
                    IURIEditorInput iuriEditorInput = (IURIEditorInput) otherInput;
                    path = Path.fromOSString(new File(iuriEditorInput.getURI()).toString());
                }
            } catch (Throwable e) {
                //Ignore (IURIEditorInput not available on 3.2)
            }
        }
View Full Code Here

      return new FileStoreEditorInput(fileOnLocalDisk);
    }
  }
 
  public static Path getFilePathFromEditorInput(IEditorInput editorInput) {
    IURIEditorInput uriEditorInput;
    if(editorInput instanceof IURIEditorInput) {
      uriEditorInput = (IURIEditorInput) editorInput;
    } else {
      uriEditorInput = (IURIEditorInput) editorInput.getAdapter(IURIEditorInput.class);
    }
    if(uriEditorInput != null) {
      try {
        return Paths.get(uriEditorInput.getURI());
      } catch (Exception e) {
      }
    }
    if(editorInput instanceof IStorageEditorInput) {
      IStorageEditorInput storageEditorInput = (IStorageEditorInput) editorInput;
View Full Code Here

      final FileEditorInput fei = (FileEditorInput) input;

      return fei.getFile();
    } else if (input instanceof IURIEditorInput) {
      // opened externally to Eclipse
      final IURIEditorInput uei = (IURIEditorInput) input;
      final java.net.URI uri = uei.getURI();
      final String path = uri.getPath();

      try {
        final IProject importProject = root.getProject("import");
        if (!importProject.exists()) {
View Full Code Here

      IFile file = getWorkspaceFile(fileStore);
      if(file != null)
        newInput = new FileEditorInput(file);
      else {
        IURIEditorInput uriInput = new FileStoreEditorInput(fileStore);
        java.net.URI uri = uriInput.getURI();
        IFile linkedFile = linkedFileHelper.obtainLink(uri, false);

        newInput = new FileEditorInput(linkedFile);
      }
View Full Code Here

      IFile file = getWorkspaceFile(fileStore);
      if(file != null)
        newInput = new FileEditorInput(file);
      else {
        IURIEditorInput uriInput = new FileStoreEditorInput(fileStore);
        java.net.URI uri = uriInput.getURI();
        IFile linkedFile = ExtLinkedFileHelper.obtainLink(uri, false);

        newInput = new FileEditorInput(linkedFile);
      }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IURIEditorInput

Copyright © 2018 www.massapicom. 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.