Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » IFile in RCP application
IFile in RCP application [message #453476] Mon, 31 July 2006 14:48 Go to next message
Eclipse UserFriend
Originally posted by: nagel.trium.de

Hi all,

In my standalone RCP application I want to use an editor (XML Author,
extends TextEditor) and feed it with Strings. As it seems impossible to
pass anything else than IFile instances, I thought of creating a temporary
file, adding a IFile handle and passing the IFile to the editor.
It seems that IFiles can only exist in a Workspace. So my question is: How
can I add a workspace to my RCP application? (... in order to put
temporary IFiles into it that can be read in and changed by the editor.)

Thanks in advance,
Lars
Re: IFile in RCP application [message #453477 is a reply to message #453476] Mon, 31 July 2006 15:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nagel.trium.de

As there is always a Workspace, the question is actually how to make a
dummy project so that I can put any files in it.

Lars
Re: IFile in RCP application [message #453479 is a reply to message #453477] Mon, 31 July 2006 15:21 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Lars Nagel wrote:
> As there is always a Workspace, the question is actually how to make a
> dummy project so that I can put any files in it.
>
> Lars
>

There is information on resources in the FAQ,
http://wiki.eclipse.org/index.php/The_Official_Eclipse_FAQs# Workspace_and_Resources_API

Later,
PW


Re: IFile in RCP application [message #453486 is a reply to message #453476] Mon, 31 July 2006 19:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nohtml.gmx.de

Lars Nagel schrieb:

> As it seems impossible to
> pass anything else than IFile instances,

I dont know if TextEditor is different from other editors, but
you can always pass an object of IEditorInput to an editor.
See IWorkbenchPage.openEditor(IEditorInput, String)

A temporary file seems complicated ...

regards
Karl
Re: IFile in RCP application [message #453561 is a reply to message #453476] Wed, 02 August 2006 15:24 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Lars Nagel wrote:

> Hi all,
>
> In my standalone RCP application I want to use an editor (XML Author,
> extends TextEditor) and feed it with Strings. As it seems impossible
> to pass anything else than IFile instances,

This is not true - the text editor can also operate on external files
(see File > Open File...). The bigger problem for your RCP app will be
that you drag in all the IDE stuff (menus, views, etc) when adding
org.eclipse.ui.editors.

Dani

> I thought of creating a temporary file, adding a IFile handle and
> passing the IFile to the editor.
> It seems that IFiles can only exist in a Workspace. So my question is:
> How can I add a workspace to my RCP application? (... in order to put
> temporary IFiles into it that can be read in and changed by the editor.)
>
> Thanks in advance,
> Lars
>
Previous Topic:How to init an editor (via Memento) programatically?
Next Topic:Java web start could not find framework error
Goto Forum:
  


Current Time: Thu Nov 07 06:52:41 GMT 2024

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

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

Back to the top