|
Re: FileLink in console with a external file [message #328401 is a reply to message #328359] |
Fri, 23 May 2008 18:48  |
Eclipse User |
|
|
|
Julien,
Look at the class OpenLocalFileAction (the code for File->Open File...) in
the org.eclipse.ui.ide plugin and search for the following.
IFileStore fileStore = EFS.getLocalFileSystem().getStore(new
Path(filterPath));
A bit of magic turns the IFileStore into a FileStoreEditorInput which is
used by your editor. If your editor, like ours, needs to open a plan old
file you can turn the FileStoreEditorInput into an IPath in your
IAdapterFactory. It would look something like this:
URI uri = ((FileStoreEditorInput) adaptableObject).getURI();
IPath path = URIUtil.toPath(uri);
File file = new File(path.toString());
David Kyle
http://richclientplatform.blogspot.com/
|
|
|
Powered by
FUDForum. Page generated in 0.06286 seconds