Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] EAnnotation(Using CDO with Dawn gives a problem with EAnnotation)
[CDO] EAnnotation [message #642188] Tue, 30 November 2010 10:13 Go to next message
iwad_gmf is currently offline iwad_gmfFriend
Messages: 3
Registered: August 2010
Junior Member
Hi,

We are developing a tool for creating diagrams. We have the need to create Shortcuts and integrated the Dawn code into our latest editor code.

When a Shortcut is created, seems like the EAnnotation cannot be saved in CDO. This used to work when we were handling xml files.

The stack error is:

java.lang.NullPointerException
at org.eclipse.emf.internal.cdo.CDOStateMachine.getState(CDOSta teMachine.java:505)
at org.eclipse.emf.internal.cdo.CDOStateMachine.getState(CDOSta teMachine.java:1)
at org.eclipse.net4j.util.fsm.FiniteStateMachine.process(Finite StateMachine.java:143)
at org.eclipse.emf.internal.cdo.CDOStateMachine.prepare(CDOStat eMachine.java:236)
at org.eclipse.emf.internal.cdo.CDOStateMachine.attach(CDOState Machine.java:193)
at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.attached( CDOResourceImpl.java:827)
at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.attached( CDOResourceImpl.java:818)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eBasicSetContain er(BasicEObjectImpl.java:1342)
at org.eclipse.emf.ecore.impl.EAnnotationImpl.basicSetEModelEle ment(EAnnotationImpl.java:216)
at org.eclipse.emf.ecore.impl.EAnnotationImpl.eInverseAdd(EAnno tationImpl.java:287)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eInverseAdd(Basi cEObjectImpl.java:1415)
at org.eclipse.emf.ecore.util.EcoreEList.inverseAdd(EcoreEList. java:282)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:292)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList. java:307)
at es.ua.dlsi.ooh.conceptualView.diagram.edit.commands.Conceptu alViewCreateShortcutDecorationsCommand.doExecuteWithResult(C onceptualViewCreateShortcutDecorationsCommand.java:65)
at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:247)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:150)
at org.eclipse.emf.workspace.CompositeEMFOperation.doExecute(Co mpositeEMFOperation.java:217)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:150)
at org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:511)
... 35 more


We noticed that any other object has an attribute (visible when debugging) that seems the responsible of saving it. In case of the EAnnotation "shortcut" seems like these attributes are not populated.

Hope we can fix this because CDO (and Dawn) is incredible. Thanks in advanced!

[Updated on: Tue, 30 November 2010 10:14]

Report message to a moderator

Re: [CDO] EAnnotation [message #642203 is a reply to message #642188] Tue, 30 November 2010 11:31 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 30.11.2010 11:13, schrieb iwad_gmf:
> Hi,
>
> We are developing a tool for creating diagrams. We have the need to create Shortcuts and integrated the Dawn code into our latest editor code.
>
> When a Shortcut is created, seems like the EAnnotation cannot be saved in CDO. This used to work when we were handling xml files.
I've cc'ed Martin for Dawn and CDO Legacy Mode questions. I'm sure we can sort this out. I guess Martin will need an ecore file from you that can reproduce the issue. Please submit a bugzilla and attach it there. Also mention the exact version you're using.


>
> The stack error is:
>
> java.lang.NullPointerException
> at org.eclipse.emf.internal.cdo.CDOStateMachine.getState(CDOSta teMachine.java:505)
> at org.eclipse.emf.internal.cdo.CDOStateMachine.getState(CDOSta teMachine.java:1)
> at org.eclipse.net4j.util.fsm.FiniteStateMachine.process(Finite StateMachine.java:143)
> at org.eclipse.emf.internal.cdo.CDOStateMachine.prepare(CDOStat eMachine.java:236)
> at org.eclipse.emf.internal.cdo.CDOStateMachine.attach(CDOState Machine.java:193)
> at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.attached( CDOResourceImpl.java:827)
> at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.attached( CDOResourceImpl.java:818)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eBasicSetContain er(BasicEObjectImpl.java:1342)
> at org.eclipse.emf.ecore.impl.EAnnotationImpl.basicSetEModelEle ment(EAnnotationImpl.java:216)
> at org.eclipse.emf.ecore.impl.EAnnotationImpl.eInverseAdd(EAnno tationImpl.java:287)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eInverseAdd(Basi cEObjectImpl.java:1415)
> at org.eclipse.emf.ecore.util.EcoreEList.inverseAdd(EcoreEList. java:282)
> at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:292)
> at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList. java:307)
> at es.ua.dlsi.ooh.conceptualView.diagram.edit.commands.Conceptu alViewCreateShortcutDecorationsCommand.doExecuteWithResult(C onceptualViewCreateShortcutDecorationsCommand.java:65)
> at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:247)
> at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:150)
> at org.eclipse.emf.workspace.CompositeEMFOperation.doExecute(Co mpositeEMFOperation.java:217)
> at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:150)
> at org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:511)
> ... 35 more
>
>
> We noticed that any other object has an attribute (visible when Debuggin) that seems the responsible of saving it. In case of the EAnnotation "shortcut" seems like these attributes are not populated.
>
> Hope we can fix this because CDO (and Dawn) is incredible.
Thanks ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


> Thanks in advanced!


Re: [CDO] EAnnotation [message #642204 is a reply to message #642188] Tue, 30 November 2010 11:50 Go to previous message
Martin Fluegge is currently offline Martin FlueggeFriend
Messages: 141
Registered: July 2009
Senior Member
Hi,

comments below...

Am 30.11.2010 11:13, schrieb iwad_gmf:
> Hi,
>
> We are developing a tool for creating diagrams. We have the need to
> create Shortcuts and integrated the Dawn code into our latest editor code.

Just out of curiosity: What das 'integrate' mean? Did you used the
framgment or did you move the generated code to your editor plugin?

>
> When a Shortcut is created, seems like the EAnnotation cannot be saved
> in CDO. This used to work when we were handling xml files.
>
> The stack error is:
>
> java.lang.NullPointerException
> at org.eclipse.emf.internal.cdo.CDOStateMachine.getState(CDOSta
> teMachine.java:505)
> at org.eclipse.emf.internal.cdo.CDOStateMachine.getState(CDOSta
> teMachine.java:1)
> at org.eclipse.net4j.util.fsm.FiniteStateMachine.process(Finite
> StateMachine.java:143)
> at org.eclipse.emf.internal.cdo.CDOStateMachine.prepare(CDOStat
> eMachine.java:236)
> at org.eclipse.emf.internal.cdo.CDOStateMachine.attach(CDOState
> Machine.java:193)
> at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.attached(
> CDOResourceImpl.java:827)
> at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.attached(
> CDOResourceImpl.java:818)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eBasicSetContain
> er(BasicEObjectImpl.java:1342)
> at org.eclipse.emf.ecore.impl.EAnnotationImpl.basicSetEModelEle
> ment(EAnnotationImpl.java:216)
> at org.eclipse.emf.ecore.impl.EAnnotationImpl.eInverseAdd(EAnno
> tationImpl.java:287)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eInverseAdd(Basi
> cEObjectImpl.java:1415)
> at org.eclipse.emf.ecore.util.EcoreEList.inverseAdd(EcoreEList.
> java:282)
> at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq
> ue(NotifyingListImpl.java:292)
> at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.
> java:307)
> at es.ua.dlsi.ooh.conceptualView.diagram.edit.commands.Conceptu
> alViewCreateShortcutDecorationsCommand.doExecuteWithResult(C
> onceptualViewCreateShortcutDecorationsCommand.java:65)
> at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr
> ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:247)
> at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr
> actEMFOperation.java:150)
> at org.eclipse.emf.workspace.CompositeEMFOperation.doExecute(Co
> mpositeEMFOperation.java:217)
> at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr
> actEMFOperation.java:150)
> at org.eclipse.core.commands.operations.DefaultOperationHistory
> .execute(DefaultOperationHistory.java:511)
> ... 35 more
>
>
> We noticed that any other object has an attribute (visible when
> Debuggin) that seems the responsible of saving it. In case of the
> EAnnotation "shortcut" seems like these attributes are not populated.
>
> Hope we can fix this because
There is nothing we can't fix ;)

But I need a closer look to it to figure out what happens.

As Eike mentioned, please file a bugzilla and attach the exception and
your model (if possible) plus a version of CDO you are using. (It's not
HEAD, so far I can see from the stack trace ;))

CDO (and Dawn) is incredible.

Thanks for the flowers :)


Cheers,

Martin
Thanks in
> advanced!
Previous Topic:[EMF Databinding] Editing objects in a dialog
Next Topic:Incremental Validation Builder
Goto Forum:
  


Current Time: Fri Apr 26 19:09:02 GMT 2024

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

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

Back to the top