Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Link Mapping issue
Link Mapping issue [message #220740] Mon, 09 March 2009 08:26 Go to next message
govind Ra is currently offline govind RaFriend
Messages: 95
Registered: July 2009
Member
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 15:59 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
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: Fri Apr 26 12:00:40 GMT 2024

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

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

Back to the top