Home » Modeling » EMF » Duplicate UUID's from EcoreUtil.UUID im my GMF diagram
Duplicate UUID's from EcoreUtil.UUID im my GMF diagram [message #428594] |
Tue, 24 March 2009 23:21 |
Brian Jakubik Messages: 140 Registered: July 2009 |
Senior Member |
|
|
In my GMF diagram wizard, we go and initialize the contents of a the
diagram with some default nodes, connections and values, and randomly, I
get a diagram with a duplicate UUID. It just so happens that the UUID
in question is the target for my connection so it does not show, and
Ironically enough, its appears to always be on the same element and same
connection. If I debug it, it does not happen, so I'm pulling out my
hair trying to figure this out.
Ive looked at the EcoreUtil UUID generate(), and from what I can tell,
it looks like it always should return something unique, is that not
always the case?
Any ideas?
Thanks
Brian Jakubik
|
|
|
Re: Duplicate UUID's from EcoreUtil.UUID im my GMF diagram [message #428597 is a reply to message #428594] |
Wed, 25 March 2009 00:48 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Brian,
Comments below.
Brian Jakubik wrote:
> In my GMF diagram wizard, we go and initialize the contents of a the
> diagram with some default nodes, connections and values, and randomly,
> I get a diagram with a duplicate UUID. It just so happens that the
> UUID in question is the target for my connection so it does not show,
> and Ironically enough, its appears to always be on the same element
> and same connection.
That hardly sounds random, does it?
> If I debug it, it does not happen, so I'm pulling out my hair trying
> to figure this out.
That sounds painful. Hopefully you're still young and the hairs will
grow back.
>
> Ive looked at the EcoreUtil UUID generate(), and from what I can tell,
> it looks like it always should return something unique, is that not
> always the case?
I'll bet you'd be hard pressed to write a test case that shows
otherwise. The code will actually make your test case wait for it to get
a unique one.
>
> Any ideas?
Not a clue. Probably there's something interesting and relevant missing
from the description...
>
> Thanks
> Brian Jakubik
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| | |
Re: Duplicate UUID's from EcoreUtil.UUID im my GMF diagram [message #428611 is a reply to message #428594] |
Wed, 25 March 2009 12:34 |
Eclipse User |
|
|
|
Originally posted by: give.a.damus.gmail.com
--=-xtXBijSuCXiTOBRizMl5
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi, Brian,
There's nothing to prevent an application from assigning the same ID to
two objects in the same resource (regardless of how the ID is
generated). The eObjectToIdMap will have two occurrences of the same
ID, but the idToEObjectMap can only have one, mapping to one of your
objects. The other is "shadowed." This could definitely cause the
diagram to become confused when a reference resolves to the wrong
object.
This sounds like some kind of duplication or copy/paste operation was a
little too zealous in dealing with IDs?
HTH,
Christian
On Tue, 2009-03-24 at 18:21 -0500, Brian Jakubik wrote:
> In my GMF diagram wizard, we go and initialize the contents of a the
> diagram with some default nodes, connections and values, and randomly, I
> get a diagram with a duplicate UUID. It just so happens that the UUID
> in question is the target for my connection so it does not show, and
> Ironically enough, its appears to always be on the same element and same
> connection. If I debug it, it does not happen, so I'm pulling out my
> hair trying to figure this out.
>
> Ive looked at the EcoreUtil UUID generate(), and from what I can tell,
> it looks like it always should return something unique, is that not
> always the case?
>
> Any ideas?
>
> Thanks
> Brian Jakubik
--=-xtXBijSuCXiTOBRizMl5
Content-Type: text/html; charset="utf-8"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Brian,<BR>
<BR>
There's nothing to prevent an application from assigning the same ID to two objects in the same resource (regardless of how the ID is generated). The eObjectToIdMap will have two occurrences of the same ID, but the idToEObjectMap can only have one, mapping to one of your objects. The other is "shadowed." This could definitely cause the diagram to become confused when a reference resolves to the wrong object.<BR>
<BR>
This sounds like some kind of duplication or copy/paste operation was a little too zealous in dealing with IDs?<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Tue, 2009-03-24 at 18:21 -0500, Brian Jakubik wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
In my GMF diagram wizard, we go and initialize the contents of a the
diagram with some default nodes, connections and values, and randomly, I
get a diagram with a duplicate UUID. It just so happens that the UUID
in question is the target for my connection so it does not show, and
Ironically enough, its appears to always be on the same element and same
connection. If I debug it, it does not happen, so I'm pulling out my
hair trying to figure this out.
Ive looked at the EcoreUtil UUID generate(), and from what I can tell,
it looks like it always should return something unique, is that not
always the case?
Any ideas?
Thanks
Brian Jakubik
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>
--=-xtXBijSuCXiTOBRizMl5--
|
|
| |
Re: Duplicate UUID's from EcoreUtil.UUID im my GMF diagram [message #428628 is a reply to message #428611] |
Wed, 25 March 2009 14:45 |
Brian Jakubik Messages: 140 Registered: July 2009 |
Senior Member |
|
|
Sounds exactly what is happening here, Ill look into it more, and
hopefully try to come to a resolution.
Christian W. Damus wrote:
> Hi, Brian,
>
> There's nothing to prevent an application from assigning the same ID to
> two objects in the same resource (regardless of how the ID is
> generated). The eObjectToIdMap will have two occurrences of the same
> ID, but the idToEObjectMap can only have one, mapping to one of your
> objects. The other is "shadowed." This could definitely cause the
> diagram to become confused when a reference resolves to the wrong object.
>
> This sounds like some kind of duplication or copy/paste operation was a
> little too zealous in dealing with IDs?
>
> HTH,
>
> Christian
>
>
> On Tue, 2009-03-24 at 18:21 -0500, Brian Jakubik wrote:
>> In my GMF diagram wizard, we go and initialize the contents of a the
>> diagram with some default nodes, connections and values, and randomly, I
>> get a diagram with a duplicate UUID. It just so happens that the UUID
>> in question is the target for my connection so it does not show, and
>> Ironically enough, its appears to always be on the same element and same
>> connection. If I debug it, it does not happen, so I'm pulling out my
>> hair trying to figure this out.
>>
>> Ive looked at the EcoreUtil UUID generate(), and from what I can tell,
>> it looks like it always should return something unique, is that not
>> always the case?
>>
>> Any ideas?
>>
>> Thanks
>> Brian Jakubik
|
|
|
Goto Forum:
Current Time: Fri Apr 26 12:46:05 GMT 2024
Powered by FUDForum. Page generated in 0.03700 seconds
|