paletteDefinition in Neon? [message #1730382] |
Mon, 25 April 2016 11:20 |
Patrik Nandorf Messages: 195 Registered: January 2013 Location: Sweden |
Senior Member |
|
|
Hi,
I try to port my DSML and particularly my palette to Neon from Mars but I get problems.
I've migrated the elementTypesconfigurations to the new format and I managed to get the NewChild extension to work with it.
However, when I'm using the org.eclipse.papyrus.uml.diagram.common.paletteDefinition extension point (as I did in Mars and it worked) to register a paletteDefintion it shows up in the palette but when I drag an element from the tool to the diagram I get the following NPE:
Also, looking at the Papyrus-RT tooling, I can't find any use of the org.eclipse.papyrus.uml.diagram.common.paletteDefinition extension. Has it be replaced somehow in Neon?
!ENTRY org.eclipse.ui 4 0 2016-04-25 13:08:40.279
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
at org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy.getCreateCommand(DefaultSemanticEditPolicy.java:124)
at org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy.getSemanticCommandSwitch(DefaultSemanticEditPolicy.java:89)
at org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy.getSemanticCommand(DefaultSemanticEditPolicy.java:76)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy.getCommand(SemanticEditPolicy.java:69)
at org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy.getCommand(DefaultSemanticEditPolicy.java:70)
at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:502)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$1(GraphicalEditPart.java:1)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$1.run(GraphicalEditPart.java:482)
at org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomain.runExclusive(PapyrusROTransactionalEditingDomain.java:271)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:477)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy.getCreateElementAndViewCommand(CreationEditPolicy.java:340)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy.getCommand(CreationEditPolicy.java:87)
at org.eclipse.papyrus.infra.gmfdiag.dnd.policy.CustomizableDropEditPolicy.getCommand(CustomizableDropEditPolicy.java:117)
at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:502)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$1(GraphicalEditPart.java:1)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$1.run(GraphicalEditPart.java:482)
at org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomain.runExclusive(PapyrusROTransactionalEditingDomain.java:271)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:477)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy.getUnspecifiedTypeCreateCommand(CreationEditPolicy.java:395)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy.getCommand(CreationEditPolicy.java:85)
at org.eclipse.papyrus.infra.gmfdiag.dnd.policy.CustomizableDropEditPolicy.getCommand(CustomizableDropEditPolicy.java:117)
at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:502)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$1(GraphicalEditPart.java:1)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$1.run(GraphicalEditPart.java:482)
at org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomain.runExclusive(PapyrusROTransactionalEditingDomain.java:271)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:477)
at org.eclipse.gef.tools.TargetingTool.getCommand(TargetingTool.java:123)
at org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool.getCommand(CreationTool.java:277)
at org.eclipse.gef.tools.CreationTool.handleMove(CreationTool.java:253)
at org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool.handleMove(CreationTool.java:258)
at org.eclipse.gef.tools.AbstractTool.mouseMove(AbstractTool.java:1182)
at org.eclipse.gef.EditDomain.mouseMove(EditDomain.java:287)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseMoved(DomainEventDispatcher.java:365)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseMove(LightweightSystem.java:543)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:213)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4629)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1339)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3967)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3578)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1119)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1020)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:692)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:605)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:670)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:609)
at org.eclipse.equinox.launcher.Main.run(Main.java:1516)
at org.eclipse.equinox.launcher.Main.main(Main.java:1489)
[Updated on: Mon, 25 April 2016 11:23] Report message to a moderator
|
|
|
|
|
Re: paletteDefinition in Neon? [message #1730412 is a reply to message #1730408] |
Mon, 25 April 2016 14:41 |
|
Hi, Patrik,
You might have a look at what we did in Papyrus-RT to adapt to the
changes in the element-types in Papyrus Neon, to compare with what
you're doing:
http://git.eclipse.org/c/papyrus-rt/org.eclipse.papyrus-rt.git/commit/?id=ab0edaafca8ead04f15e5b0bad6f8cf9c5a6fa6a
HTH,
Christian
On 2016-04-25 14:26:53 +0000, Patrik Nandorf said:
> Thanks Benoit,
>
> Benoit Maggi wrote on Mon, 25 April 2016 13:36
>> Hi Patrick,
>>
>> There is probably something wrong within your elementype definition.
>> (In neon: All hint and ids change from decimal to string
>> So for example : Class_2008 becomes Class_Shape)
>
>
> That I did, thanks to Florian who helped me.
>
> Benoit Maggi wrote on Mon, 25 April 2016 13:36
>> First option:
>> You can use the "Registred Element type View" available in the
>> developer tooling (Sadly it's not present in the official release, you
>> can get the on for neon here
>> https://hudson.eclipse.org/papyrus/job/Papyrus-Master-Developer/lastSuccessfulBuild/artifact/repository/)
>>
>> to check that element type are correctly registered
>
>
> I did that also and as far as I can see the non-diagram element type
> works at least since I can use it together with NewChild framework to
> create new elements from the model explorer.
> Benoit Maggi wrote on Mon, 25 April 2016 13:36
>> Second option:
>> You can add a junit tests to ensure that all elementtypes present in
>> your palette are know.
>> (See as example :
>> https://git.eclipse.org/c/papyrus/org.eclipse.papyrus-sysml.git/tree/gui/org.eclipse.papyrus.sysml14.ui.tests/test/org/eclipse/papyrus/sysml14/ui/tests/palette/AbstractPaletteTest.java)
>>
>
>
> For the diagram element types I'll look into this. But if I understand
> correctly, the extension point hasn't changed?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03224 seconds