Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (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 LFriend
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 DahyabhaiFriend
Messages: 4435
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 Web Tools Platform
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: Fri Apr 26 05:52:24 GMT 2024

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

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

Back to the top