Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Opening a specific editor
Opening a specific editor [message #436162] Wed, 31 August 2005 21:43 Go to next message
Eclipse UserFriend
Originally posted by: jan.roehrich.iao.fraunhofer.de

Hello,

at the moment I try to learn Eclipse/RCP/GEF. I wrote a very simple editor
which inherits from EditorPart.
I know how to programmatically open a view but I found no way how to open
a specific editor without supplying a certain file suffix and open this
kind of file. I want to open my editor with a model located in memory.

Are there any documents which explain how to manage editors. I only found
http://devresource.hp.com/drc/technical_white_papers/ecliped itor/index.jsp
but this articel doesn't solve my problem.

Thanks in advance

Regards Jan
Re: Opening a specific editor [message #436163 is a reply to message #436162] Thu, 01 September 2005 01:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mail4zlq.gmail.com

At first,you must create "IEditorInput" use your "model located in
memeory",then use can just invoke "IDE.openEditor" to open your editor.

good lucky!


Jan Roehrich 写道:
> Hello,
>
> at the moment I try to learn Eclipse/RCP/GEF. I wrote a very simple editor
> which inherits from EditorPart.
> I know how to programmatically open a view but I found no way how to open
> a specific editor without supplying a certain file suffix and open this
> kind of file. I want to open my editor with a model located in memory.
>
> Are there any documents which explain how to manage editors. I only found
> http://devresource.hp.com/drc/technical_white_papers/ecliped itor/index.jsp
> but this articel doesn't solve my problem.
>
> Thanks in advance
>
> Regards Jan
>
>
Re: Opening a specific editor [message #436169 is a reply to message #436162] Thu, 01 September 2005 12:41 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Jan Roehrich wrote:
> Hello,
>
> at the moment I try to learn Eclipse/RCP/GEF. I wrote a very simple editor
> which inherits from EditorPart.
> I know how to programmatically open a view but I found no way how to open
> a specific editor without supplying a certain file suffix and open this
> kind of file. I want to open my editor with a model located in memory.
>

If you haven't used the IDE in your RCP app, check out
IWorkbenchPage#openEditor(...) which takes an IEditorInput and your
editor ID.

Later,
PW


Re: Opening a specific editor [message #436275 is a reply to message #436169] Mon, 05 September 2005 11:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jan.roehrich.iao.fraunhofer.de

> If you haven't used the IDE in your RCP app, check out
> IWorkbenchPage#openEditor(...) which takes an IEditorInput and your
> editor ID.

Thanks for this answer. I read a lot and now it's much more clearer. But
now the point is where to open the editor. I want this editor to open
when my RCP application starts. Therefor I tried to use
WorkbenchAdvisor#postWindowOpen but it seems that this method is never
called in my app.

Jan
Re: Opening a specific editor [message #436336 is a reply to message #436275] Tue, 06 September 2005 13:05 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Jan Roehrich wrote:
> Thanks for this answer. I read a lot and now it's much more clearer. But
> now the point is where to open the editor. I want this editor to open
> when my RCP application starts. Therefor I tried to use
> WorkbenchAdvisor#postWindowOpen but it seems that this method is never
> called in my app.

That I'm not to familiar with. Maybe your WorkbenchAdvisor isn't set up
quite right, or your RCP app isn't doing a full Workbench initialization?

Another option might be to schedule a UIJob ... it'll run after the UI
thread has done most startup work.

Later,
PW


Previous Topic:org.eclipse.ui.forms not included in Plug-In dependencies
Next Topic:Access control on actions and views
Goto Forum:
  


Current Time: Thu Dec 26 15:29:58 GMT 2024

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

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

Back to the top