Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Integate GEF in RCP application
Integate GEF in RCP application [message #240285] Fri, 14 December 2007 17:46 Go to next message
Eclipse UserFriend
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 #240287 is a reply to message #240285] Fri, 14 December 2007 19:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Gerhard.Hinterndorfer.pedrics.at

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 #240306 is a reply to message #240287] Mon, 17 December 2007 14:05 Go to previous messageGo to next message
Eclipse UserFriend
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 15:24 Go to previous message
Richard Adams is currently offline Richard AdamsFriend
Messages: 77
Registered: July 2009
Location: Edinburgh
Member
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


Previous Topic:Is draw2d for me?
Next Topic:children figures outside parent?
Goto Forum:
  


Current Time: Thu Apr 25 04:37:38 GMT 2024

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

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

Back to the top