Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Open file outside project-Eclipse File System (EFS)
Open file outside project-Eclipse File System (EFS) [message #876477] Thu, 24 May 2012 17:30 Go to next message
Slawek L is currently offline Slawek L
Messages: 21
Registered: May 2012
Junior Member
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.
Re: Open file outside project-Eclipse File System (EFS) [message #876495 is a reply to message #876477] Thu, 24 May 2012 18:12 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2310
Registered: July 2009
Senior Member
You might want to ask that in the eclipse.platform newsgroup, http://www.eclipse.org/forums/eclipse.platform .

---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:is using html tags in upper case bad
Next Topic:JSDT question - how can I recognize an optional function parameter ?
Goto Forum:
  


Current Time: Sat Oct 25 03:40:45 GMT 2014

Powered by FUDForum. Page generated in 0.04359 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software