Open file outside project-Eclipse File System (EFS) [message #876477] |
Thu, 24 May 2012 13:30  |
Eclipse User |
|
|
|
hello,
How can i receive IFileEditorInput or FileEditorInput from java.io.file?
I have java.io.file then i can receive org.eclipse.core.resources.IFile but my rcp application doesn't see this file. I heard about Eclipse File System (EFS) but i am not sure how use it?code looks like:
IPath location = new Path(file.getAbsolutePath());
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IFile iFile = root.getFile(location);
try {
iFile.createLink(location, IResource.NONE, null);
} catch (CoreException e) {
e.printStackTrace();
}
FileEditorInput fileEditorInput = new FileEditorInput(iFile);
org.eclipse.core.internal.resources.ResourceException: Cannot create linked resource '/.../*.xhtml'. The parent resource is not accessible.
I would like open file outside the workspace in my own rcp editor.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03297 seconds