Integate GEF in RCP application [message #240285] |
Fri, 14 December 2007 12:46  |
Eclipse User |
|
|
|
Originally posted by: georg.moleque.com.br
Hi,
I´m quite lost how to get GEF integrated in a RCP standalone-Application.
How can I show e.g. a GraphicalEditor via Actions (to hook it in the menue bar, or to open as a result of some button
click)?
Thanks for any hints in advance,
Georg
|
|
|
|
Re: Integate GEF in RCP application [message #240306 is a reply to message #240287] |
Mon, 17 December 2007 09:05   |
Eclipse User |
|
|
|
Originally posted by: georg.moleque.com.br
Hi Gerhard,
what you proposed would be the "direct" way which I hoped I could avoid.
What I hoped I could do is to just adapt my GEF Editor, as is described here
http://www.eclipse.org/articles/Article-GEF-EMF/gef-emf.html (see Shapes Example goes RCP! near the end),
and open this editor in RCP. I succeeded opening the Editor via actions in rcp, but still have
the class-cast-problem in setEditorInput() described in the article.
Somehow I just fail to understand how to implement the proposed solution ... anyone can give me a hint?
- I´m Using Eclipse 3.2.2
Georg
> Hi Georg,
>
> I have no idea about GEF, but only some experience including draw2D into
> RCP applications:
> There you need an SWT canvas where you can add draw2D figures.
> You get access to the SWT composite of a view (where you can put on an
> SWT canvas later on) by creating a class myView which extends the class
> org.eclipse.ui.part.ViewPart. There you need to overwrite the method:
> "public void createPartControl(Composite parent)" and here you get the
> composite where you can put some Draw2D Figures(and maybe or hopefully
> also some GEF stuff).
>
> Hope that helps
> Gerhard
>
> Georg von Bülow schrieb:
>> Hi,
>>
>> I´m quite lost how to get GEF integrated in a RCP standalone-Application.
>>
>> How can I show e.g. a GraphicalEditor via Actions (to hook it in the
>> menue bar, or to open as a result of some button click)?
>>
>> Thanks for any hints in advance,
>> Georg
|
|
|
Re: Integate GEF in RCP application [message #240463 is a reply to message #240306] |
Mon, 07 January 2008 10:24  |
Eclipse User |
|
|
|
Hi ,
We are using GEF in an RCP app.
We open our editor by doubel clicking on a tree view element representing
the
diagram to be opened.:
//objroot is our root model object
IEditorInput iei = new EditorInput(objRoot);
try {
part.getSite().getWorkbenchWindow().getActivePage().openEdit or(iei,
"org.pathwayeditor.mapEditor");
}catch (Exception e){
MessageDialog.openError(part.getSite().getShell(), " Map opening
error",
new String (" The map could not be opened: \n " + e.getMessage()));
}
and we need to include the editor contribution in the plugin.xml
HTH
Richard
|
|
|
Powered by
FUDForum. Page generated in 0.03828 seconds