Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to get an IFile Object
How to get an IFile Object [message #182226] Thu, 30 November 2006 00:16 Go to next message
Eclipse UserFriend
Originally posted by: stefan.teitge.web.de

Hello!

I want to open a file in the IDE using:

IDE.openEditor(IWorkbenchPage page, IFile file).

My problem is that I want to open a file which is located somewhere on
the harddrive, e.g. /home/user/somefile.xyz

All I have is the path, how can I get a IFile object from it as I don't
find any API for doing this.

Need help ;-)
Stefan Teitge
Re: How to get an IFile Object [message #182276 is a reply to message #182226] Thu, 30 November 2006 09:39 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Stefan Teitge wrote:

> Hello!
>
> I want to open a file in the IDE using:
>
> IDE.openEditor(IWorkbenchPage page, IFile file).
>
> My problem is that I want to open a file which is located somewhere on
> the harddrive, e.g. /home/user/somefile.xyz
>
> All I have is the path, how can I get a IFile object from it as I
> don't find any API for doing this.

You can't create an IFile that isn't in your workspace. Try
FileStoreEditorInput (3.3 stream).

Dani

>
> Need help ;-)
> Stefan Teitge
Previous Topic:File output from Eclipse Graphical Editor Framework
Next Topic:Serial Console Plugin - Is one available?
Goto Forum:
  


Current Time: Tue Apr 23 12:38:07 GMT 2024

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

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

Back to the top