Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Link Mapping issue
Link Mapping issue [message #220740] Mon, 09 March 2009 04:26 Go to next message
Eclipse UserFriend
Hi All.

Link Mapping happens only for first link specified in mapping
file.
Same problem as early post.
I found some thing .
When i try to connect other links only the first if block excecutes which
means that even the second link is superType of domainElement.eClass() but
it should use the second if block.

if (XXXPackage.eINSTANCE.getLINK().isSuperTypeOf(
domainElement.eClass())) {
System.out.println("In the AndEditpArt"); //// for connecting A-A
return LINKEditPart.VISUAL_ID;
}

if (XXXPackage.eINSTANCE.getLINK().isSuperTypeOf(
domainElement.eClass())) {
System.out.println("In the And@EditpArt");//// for connecting B-B
return LINK2EditPart.VISUAL_ID;
}
if (XXXPackage.eINSTANCE.getLINK().isSuperTypeOf(
domainElement.eClass())) {
return LINK3EditPart.VISUAL_ID; //// for connecting A-B
}
if (XXXPackage.eINSTANCE.getLINK().isSuperTypeOf(
domainElement.eClass())) {
return LINK4EditPart.VISUAL_ID; //// for connecting B-A
}

Regards
Govind R Ashrit
Re: Link Mapping issue [message #221050 is a reply to message #220740] Tue, 10 March 2009 11:59 Go to previous message
Eclipse UserFriend
Hello govind,

> When i try to connect other links only the first if block excecutes
> which means that even the second link is superType of
> domainElement.eClass() but it should use the second if block.
So, you have to add a constraint to the link mapping. As a result generated
code will be changed a bit (you can compare it with the original one), so
you can modify a logic of these if-elseif-... sequence.

-----------------
Alex Shatalin
Previous Topic:Get default line Color?
Next Topic:Ecore diagram code
Goto Forum:
  


Current Time: Thu Jul 03 16:54:12 EDT 2025

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

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

Back to the top