Open a GMF Editor inside a SWT Composite [message #191857] |
Tue, 10 June 2008 10:26 |
Eclipse User |
|
|
|
Originally posted by: javier.roca.planningforce.com
Hello Community!
This is my first time in this newsgroup.
I would like to know if somebody has tried to use the GMF-generated
editor inside a SWT Composite.
It happens that we have a "custom" application written in RCP and we
don't use the standard IWorkbenchPages to add the editor. As we can find
in the code kindly generated by GMF, it includes the editor in your RCP
app in this way:
/* Get the current available page in the workbench*/
IWorkbenchPage page = PlatformUI.getWorkbench()
..getActiveWorkbenchWindow().getActivePage();
/* open the editor in this page, where XXXEditor is the GMF-generated
editor*/
page.openEditor(new URIEditorInput(diagram.getURI()),
XXXEditor.ID);
I would like to know if the following could be possible as well:
/* Get a preivously created parent composite */
Composite parentComposite = ANY_SWT_COMPOSITE_YOU_PREVIOUSLY_CREATED;
/* Create a function to open the XXXEditor inside this parent composite*/
openGMFEditor(XXXEditor.ID, parentComposite);
As GMF comes from GEF, I googled and I found somebody
(http://www.eclipsezone.com/eclipse/forums/t110619.html) who was able to
tweak the GraphicalViewer in order to display it inside a SWT Composite,
however, is this also possible for a GMF Editor?
Thanks to everyone for the continuous support and shared knowledge!!
Javier
|
|
|
Powered by
FUDForum. Page generated in 0.03331 seconds