Skip to main content



      Home
Home » Eclipse Projects » GEF » Building RCP Application with GEF Editor
Building RCP Application with GEF Editor [message #223547] Thu, 28 September 2006 14:08 Go to next message
Eclipse UserFriend
Originally posted by: daniel.g.baxter.gmail.com

Hi, I am trying to build a simple RCP application that will contain a GEF
editor in it. I am not quite sure how to go about adding the GEF editor I
made (followed the shapes example) into the RCP workbench in the default
RCP Application with a View template. Or if using the blank "Hello World"
RCP App template would be easier let me know and what I have to do to make
this editor appear.
Re: Building RCP Application with GEF Editor [message #223599 is a reply to message #223547] Mon, 02 October 2006 10:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cbrown.optusnet.com.au

I'm currently trying to do the same thing. I've found the following
reference: http://www.eclipse.org/articles/Article-GEF-EMF/gef-emf.html -
see the section titled "Bonus: Shapes Example goes RCP!". I'm still looking
at it, but I'm hopeful it's a good start

"Daniel Baxter" <daniel.g.baxter@xxxxxxxxxxxx> wrote in message
news:4d4a44d96fd90be14df39720b38f8d0a$1@www.eclipse.org...
> Hi, I am trying to build a simple RCP application that will contain a GEF
> editor in it. I am not quite sure how to go about adding the GEF editor I
> made (followed the shapes example) into the RCP workbench in the default
> RCP Application with a View template. Or if using the blank "Hello World"
> RCP App template would be easier let me know and what I have to do to make
> this editor appear.
>
Re: Building RCP Application with GEF Editor [message #223607 is a reply to message #223599] Mon, 02 October 2006 13:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.g.baxter.gmail.com

I used that tutorial to figure out how to add the editor in, but it
explodes every time I try to open an editor. The sample does not load
the editor either. I tried uninstalling and reinstalling eclipse
entirely and cleaning out the .meta files and folders from my workspace.
I even tried to rewrite the code by following the example here
http://www.eclipsecon.org/2006/Sub.do?id=71 just to get a very simple
stripped down GEF editor and this blows up too. The stack trace on this
newer explosion is below. What am I missing here?

Dan


java.lang.NullPointerException
at org.eclipse.draw2d.Figure.add(Figure.java:146)
at org.eclipse.draw2d.FreeformLayer.add(FreeformLayer.java:31)
at org.eclipse.draw2d.Figure.add(Figure.java:179)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addChild Visual(AbstractGraphicalEditPart.java:198)
at
org.eclipse.gef.editparts.AbstractEditPart.addChild(Abstract EditPart.java:197)
at
org.eclipse.gef.editparts.SimpleRootEditPart.setContents(Sim pleRootEditPart.java:101)
at
org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents( AbstractEditPartViewer.java:583)
at
org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents( AbstractEditPartViewer.java:592)
at vbvlight.editor.CallFlowEditor.createPartControl(CallFlowEdi tor.java:34)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:596)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:372)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:566)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 0)
at
org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:140)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:268)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:394)
at
org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1144)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1097)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:13 11)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:455)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:102 )
at org.eclipse.ui.internal.PartStack.add(PartStack.java:441)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:111 )
at
org.eclipse.ui.internal.EditorSashContainer.addEditor(Editor SashContainer.java:60)
at
org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.java:217)
at
org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:207)
at
org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:820)
at
org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:719)
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:680)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2593)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2528)
at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPag e.java:2520)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.ja va:2505)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2500)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2485)
at vbvlight.actions.NewAction.run(NewAction.java:30)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at vbvlight.Application.run(Application.java:18)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)


Chris wrote:
> I'm currently trying to do the same thing. I've found the following
> reference: http://www.eclipse.org/articles/Article-GEF-EMF/gef-emf.html -
> see the section titled "Bonus: Shapes Example goes RCP!". I'm still looking
> at it, but I'm hopeful it's a good start
>
> "Daniel Baxter" <daniel.g.baxter@xxxxxxxxxxxx> wrote in message
> news:4d4a44d96fd90be14df39720b38f8d0a$1@www.eclipse.org...
>> Hi, I am trying to build a simple RCP application that will contain a GEF
>> editor in it. I am not quite sure how to go about adding the GEF editor I
>> made (followed the shapes example) into the RCP workbench in the default
>> RCP Application with a View template. Or if using the blank "Hello World"
>> RCP App template would be easier let me know and what I have to do to make
>> this editor appear.
>>
>
>
Re: Building RCP Application with GEF Editor [message #223620 is a reply to message #223607] Mon, 02 October 2006 16:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.g.baxter.gmail.com

Alright, solved that problem. But now I get the generic error "An error
has occurred when activating this view" . That error shows up whether I
have the Palette initialized or not. So I am sure that it has something
to do with my Editor which extends EditorPart.

Daniel Baxter wrote:
> I used that tutorial to figure out how to add the editor in, but it
> explodes every time I try to open an editor. The sample does not load
> the editor either. I tried uninstalling and reinstalling eclipse
> entirely and cleaning out the .meta files and folders from my workspace.
> I even tried to rewrite the code by following the example here
> http://www.eclipsecon.org/2006/Sub.do?id=71 just to get a very simple
> stripped down GEF editor and this blows up too. The stack trace on this
> newer explosion is below. What am I missing here?
>
> Dan
>
>
> java.lang.NullPointerException
> at org.eclipse.draw2d.Figure.add(Figure.java:146)
> at org.eclipse.draw2d.FreeformLayer.add(FreeformLayer.java:31)
> at org.eclipse.draw2d.Figure.add(Figure.java:179)
> at
> org.eclipse.gef.editparts.AbstractGraphicalEditPart.addChild Visual(AbstractGraphicalEditPart.java:198)
>
> at
> org.eclipse.gef.editparts.AbstractEditPart.addChild(Abstract EditPart.java:197)
>
> at
> org.eclipse.gef.editparts.SimpleRootEditPart.setContents(Sim pleRootEditPart.java:101)
>
> at
> org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents( AbstractEditPartViewer.java:583)
>
> at
> org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents( AbstractEditPartViewer.java:592)
>
> at
> vbvlight.editor.CallFlowEditor.createPartControl(CallFlowEdi tor.java:34)
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:596)
>
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:372)
>
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:566)
>
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 0)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:140)
>
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:268)
>
> at
> org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
>
> at
> org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:394)
>
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1144)
>
> at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1097)
> at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:13 11)
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:455)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:102 )
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:441)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:111 )
> at
> org.eclipse.ui.internal.EditorSashContainer.addEditor(Editor SashContainer.java:60)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.java:217)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:207)
>
> at
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:820)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:719)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:680)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2593)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2528)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPag e.java:2520)
> at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.ja va:2505)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2500)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2485)
> at vbvlight.actions.NewAction.run(NewAction.java:30)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at vbvlight.Application.run(Application.java:18)
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
> at org.eclipse.core.launcher.Main.run(Main.java:977)
> at org.eclipse.core.launcher.Main.main(Main.java:952)
>
>
> Chris wrote:
>> I'm currently trying to do the same thing. I've found the following
>> reference:
>> http://www.eclipse.org/articles/Article-GEF-EMF/gef-emf.html - see the
>> section titled "Bonus: Shapes Example goes RCP!". I'm still looking at
>> it, but I'm hopeful it's a good start
>>
>> "Daniel Baxter" <daniel.g.baxter@xxxxxxxxxxxx> wrote in message
>> news:4d4a44d96fd90be14df39720b38f8d0a$1@www.eclipse.org...
>>> Hi, I am trying to build a simple RCP application that will contain a
>>> GEF editor in it. I am not quite sure how to go about adding the GEF
>>> editor I made (followed the shapes example) into the RCP workbench in
>>> the default RCP Application with a View template. Or if using the
>>> blank "Hello World" RCP App template would be easier let me know and
>>> what I have to do to make this editor appear.
>>>
>>
>>
Re: Building RCP Application with GEF Editor [message #223745 is a reply to message #223547] Wed, 04 October 2006 13:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.g.baxter.gmail.com

Ok, I actually figured out all my problems and have a working (very
simple GEF editor in an RCP Application). I was thinking that sometime
in the near future I will document the code and post a walkthrough of
what I did to help people who are struggling to understand GEF or just
simply how to get it to open in an RCP context.
Re: Building RCP Application with GEF Editor [message #223777 is a reply to message #223745] Wed, 04 October 2006 17:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

The GEF wiki is a good place to share such info.
http://wiki.eclipse.org/index.php/Graphical_Editing_Framewor k

"Daniel Baxter" <daniel.g.baxter@gmail.com> wrote in message
news:eg0rtk$664$1@utils.eclipse.org...
> Ok, I actually figured out all my problems and have a working (very simple
> GEF editor in an RCP Application). I was thinking that sometime in the
> near future I will document the code and post a walkthrough of what I did
> to help people who are struggling to understand GEF or just simply how to
> get it to open in an RCP context.
Re: Building RCP Application with GEF Editor [message #226407 is a reply to message #223777] Fri, 10 November 2006 23:38 Go to previous message
Eclipse UserFriend
Originally posted by: cbrown.optusnet.com.au

Dan,

I similarly had problems with my "simple" GEF RCP editor. Never got it
working. Did you get around to writing up a walkthrough? Or can you post the
source? Would be much appreciated!

Chris

"Pratik Shah" <none@unknown.com> wrote in message
news:eg17ja$bac$1@utils.eclipse.org...
> The GEF wiki is a good place to share such info.
> http://wiki.eclipse.org/index.php/Graphical_Editing_Framewor k
>
> "Daniel Baxter" <daniel.g.baxter@gmail.com> wrote in message
> news:eg0rtk$664$1@utils.eclipse.org...
>> Ok, I actually figured out all my problems and have a working (very
>> simple GEF editor in an RCP Application). I was thinking that sometime in
>> the near future I will document the code and post a walkthrough of what I
>> did to help people who are struggling to understand GEF or just simply
>> how to get it to open in an RCP context.
>
>
Previous Topic:change BackgroundColor dynamically
Next Topic:Adding children to parent by selecting.
Goto Forum:
  


Current Time: Wed May 21 02:20:36 EDT 2025

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

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

Back to the top