Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] custom EDataTypes
[CDO] custom EDataTypes [message #515302] Thu, 18 February 2010 12:46 Go to next message
Rolf Kistler is currently offline Rolf KistlerFriend
Messages: 4
Registered: February 2010
Junior Member
Hi all,

our model contains a Polygon object which holds a list of Point objects, which are
custom EDataType.
When I make a copy of the Point list with
List<Point> points= new ArrayList<Point>(polygon.getPoints()); 

ArrayList calls the collection's toArray() method and EMF/CDO returns list of Strings instead of a list of Point objects.

The strings are the result of convertPointToString() serializer method.

This causes some problems, e.g. because EMF EDIT's RemoveCommand also uses ArrayList to create a copy of the to be removed objects.

Thanks in advance

Rolf
Re: [CDO] custom EDataTypes [message #515404 is a reply to message #515302] Thu, 18 February 2010 16:41 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Rolf,

I think there's a bug in CDOStore's toArray() implementations. Please
file a bugzilla.

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 18.02.2010 13:46, schrieb Rolf Kistler:
> Hi all,
>
> our model contains a Polygon object which holds a list of Point
> objects, which are
> custom EDataType.
> When I make a copy of the Point list with
>
> List<Point> points= new ArrayList<Point>(polygon.getPoints());
> ArrayList calls the collection's toArray() method and EMF/CDO returns
> list of Strings instead of a list of Point objects.
>
> The strings are the result of convertPointToString() serializer method.
>
> This causes some problems, e.g. because EMF EDIT's RemoveCommand also
> uses ArrayList to create a copy of the to be removed objects.
>
> Thanks in advance
>
> Rolf
>


Re: [CDO] custom EDataTypes [message #515540 is a reply to message #515302] Fri, 19 February 2010 10:26 Go to previous messageGo to next message
Rolf Kistler is currently offline Rolf KistlerFriend
Messages: 4
Registered: February 2010
Junior Member
I filed a bugzilla:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=303279

Rolf
Re: [CDO] custom EDataTypes [message #515561 is a reply to message #515540] Fri, 19 February 2010 10:57 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 19.02.2010 11:26, schrieb Rolf Kistler:
> I filed a bugzilla:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=303279
I fixed it ;-)

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] custom EDataTypes [message #515965 is a reply to message #515302] Mon, 22 February 2010 11:27 Go to previous messageGo to next message
Rolf Kistler is currently offline Rolf KistlerFriend
Messages: 4
Registered: February 2010
Junior Member
I still have problems with custom EData Types when an EMF EDIT RemoveCommand
is invoked on a custom EDataType collection:
	at  org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.getList(BaseCDORevision.java:564)
	at  org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.contains(BaseCDORevision.java:428)
	at  org.eclipse.emf.internal.cdo.CDOStore.contains(CDOStore.java :247)
	at  org.eclipse.emf.ecore.impl.EStoreEObjectImpl$BasicEStoreEList.delegateContains(EStoreEObjectImpl.java:205)
	at  org.eclipse.emf.ecore.impl.EStoreEObjectImpl$BasicEStoreEList.delegateContainsAll(EStoreEObjectImpl.java:213)
	at  org.eclipse.emf.common.util.DelegatingEList.containsAll(DelegatingEList.java:125)
	at  org.eclipse.emf.edit.command.RemoveCommand.prepare(RemoveCommand.java:248)

getList() returns list of Strings instead of list of custom EDataType, thus containsAll returns false and the objects are not removed.

I use CDO 3.0 HEAD (fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=303279 included)

Rolf

[Updated on: Mon, 22 February 2010 11:38]

Report message to a moderator

Re: [CDO] custom EDataTypes [message #516046 is a reply to message #515965] Mon, 22 February 2010 15:26 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Rolf,

If you feel there's a bug somewhere in CDO, please just file a bugzilla.
You don't necessarily have to go through the newsgroup. I can not start
fixing something without a bugzilla.

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 22.02.2010 12:27, schrieb Rolf Kistler:
> I still have problems with custom EData Types when an EMF EDIT
> RemoveCommand
> is invoked on a custom EDataType collection:
>
> at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.getL
> ist(BaseCDORevision.java:564)
> at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.cont
> ains(BaseCDORevision.java:428)
> at org.eclipse.emf.internal.cdo.CDOStore.contains(CDOStore.java
> :247)
> at org.eclipse.emf.ecore.impl.EStoreEObjectImpl$BasicEStoreELis
> t.delegateContains(EStoreEObjectImpl.java:205)
> at org.eclipse.emf.ecore.impl.EStoreEObjectImpl$BasicEStoreELis
> t.delegateContainsAll(EStoreEObjectImpl.java:213)
> at org.eclipse.emf.common.util.DelegatingEList.containsAll(Dele
> gatingEList.java:125)
> at org.eclipse.emf.edit.command.RemoveCommand.prepare(RemoveCom
> mand.java:248)
>
> getList() returns list of Strings instead of list of custom EDataType,
> thus containsAll returns false and the objects are not removed.
>
> I use CDO 3.0 HEAD (fix for
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=303279 included)
>
> Rolf


Re: [CDO] custom EDataTypes [message #516061 is a reply to message #515302] Mon, 22 February 2010 16:03 Go to previous message
Rolf Kistler is currently offline Rolf KistlerFriend
Messages: 4
Registered: February 2010
Junior Member
I filed a bugzilla:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=303502

Rolf
Previous Topic:bidirectional cross references
Next Topic:Navigating on UML metamodel
Goto Forum:
  


Current Time: Sat Apr 27 03:11:31 GMT 2024

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

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

Back to the top