Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Name DiffElement
Name DiffElement [message #514326] Sun, 14 February 2010 12:23 Go to next message
Randi  is currently offline Randi Friend
Messages: 31
Registered: November 2009
Member
Hello All,

I have some trouble with getting the name attribute from a DiffElement as a result of standalone usage of EMFCompare.

What I want to do: I made two models (uml) and compare those via EMFCompare in standalone. So I get a DiffModel where I can get all the DiffElements. From those DiffEelements I want to access the attributes eg
org.eclipse.uml2.uml.internal.impl.BehaviorExecutionSpecific ationImpl @867fc9 (name: BehaviorExecutionSpecification3, visibility: <unset>) has been added en is van Type :Addition


So I want to get the name from the DiffElement. How can I do this ?

Many thanks

Regards,
Randi
Re: Name DiffElement [message #514428 is a reply to message #514326] Mon, 15 February 2010 10:09 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090605020609090900000000
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Randi,

DiffElements have no name of their own ; and the elements they represent
a difference on can have changed names (thus left and right elements
have different names).

You'll have to access the element of which you want to retrieve the name
yourself : ((CastObject)diff.getLeftElement()).getName() or
((CastObject)diff.getRightElement()).getName().

Laurent Goubet
Obeo

Randi wrote:
> Hello All,
>
> I have some trouble with getting the name attribute from a DiffElement
> as a result of standalone usage of EMFCompare.
> What I want to do: I made two models (uml) and compare those via
> EMFCompare in standalone. So I get a DiffModel where I can get all the
> DiffElements. From those DiffEelements I want to access the attributes
> eg
> mailto: org.eclipse.uml2.uml.internal.impl.BehaviorExecutionSpecific ationImpl @867fc9
> (name: BehaviorExecutionSpecification3, visibility: <unset>) has been
> added en is van Type :Addition
>
>
> So I want to get the name from the DiffElement. How can I do this ?
>
> Many thanks
>
> Regards,
> Randi


--------------090605020609090900000000
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------090605020609090900000000--
Previous Topic:Re: [EEF] Forms vs. property editing
Next Topic:Name DiffElement
Goto Forum:
  


Current Time: Tue Apr 23 12:19:25 GMT 2024

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

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

Back to the top