Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Connection happens only for first linking mapping
Connection happens only for first linking mapping [message #220196] Fri, 27 February 2009 10:37 Go to next message
govind Ra is currently offline govind RaFriend
Messages: 95
Registered: July 2009
Member
Hello All.

This is the same problem as my previous post of link mapping

I have some figures of different types and I like to connect them with one
ConnectionLine. I have certain sources and targets for each figure in
link element,

And I create pairs of LinkMappings, like this:
linkMapping{
source:link.sourceNode1;
target:link.targetNode2;
}
linkMapping{
source:link.sourceNode1;
target:link.targetNode3;
}
linkMapping{
source:link.sourceNode2;
target:link.targetNode3;

}
linkMapping{
source:link.sourceNode2;
target:link.targetNode1;
}
and on.

For each mapping I specify the same tool creation and diagram link.
When I try to create link all works good for first link mapping, but for
others only record in model file is created but graphical line isn't drawn.

I used the same model files of previous version 1.0
now i have gmf version 2.13

Its gives the same execution exception

Regards
Govind R
Re: Connection happens only for first linking mapping [message #220219 is a reply to message #220196] Fri, 27 February 2009 14:50 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello govind,

Looks like all LinkMappings has same DomainMetaElement associated with them,
right?
In this case you can try adding some constraints helping GMF to recognize
using domain model element (link) wich particular LinkMapping should be applicable
to it.

-----------------
Alex Shatalin
Re: Connection happens only for first linking mapping [message #220235 is a reply to message #220219] Fri, 27 February 2009 15:31 Go to previous messageGo to next message
govind Ra is currently offline govind RaFriend
Messages: 95
Registered: July 2009
Member
Hello Alex,

Can u tell me what constraint i have to add ?? whether it has to be to
NodeMapping or LinkMapping. And this constraint has to be added to all the
link mapping.

One Strange this is that i dont know why it should work in older version!!

Regards
Govind R
Re: Connection happens only for first linking mapping [message #220366 is a reply to message #220235] Mon, 02 March 2009 13:05 Go to previous messageGo to next message
govind Ra is currently offline govind RaFriend
Messages: 95
Registered: July 2009
Member
Hi Alex.,

I added a constraint to all the link mapping self.oclIsTypeOf(AND) where
AND is link between the figures.
i am bit poor in OCl

And i use the same Link tool for all the links.

Thanks in advance

Regards
Govind R
Re: Connection happens only for first linking mapping [message #220708 is a reply to message #220366] Fri, 06 March 2009 13:33 Go to previous messageGo to next message
govind Ra is currently offline govind RaFriend
Messages: 95
Registered: July 2009
Member
Hi All,

I found a change in getEdgeViewClass(IAdaptable semanticAdapter,
View containerView, String semanticHint) method of xxxViewProvider
where

semanticHint conditions are checked which are not in previous version.


Previous version:-

EClass semanticType = getSemanticEClass(semanticAdapter);
if (semanticType == null) {
return null;
}
EObject semanticElement = getSemanticElement(semanticAdapter);
int linkVID = XXXVisualIDRegistry
.getLinkWithClassVisualID(semanticElement, semanticType);


New Version:-

EObject domainElement = getSemanticElement(semanticAdapter);
if (domainElement != null
&& visualID != SignaturebuilderVisualIDRegistry
.getLinkWithClassVisualID(domainElement)) {

System.out.println("It come here for next links :::;");
return null; // visual id for link EClass should match visual id from
element type
}
return getEdgeViewClass(visualID);




Regards
Govind
Re: [Solved]Connection happens only for first linking mapping [message #220965 is a reply to message #220708] Tue, 10 March 2009 14:35 Go to previous messageGo to next message
govind Ra is currently offline govind RaFriend
Messages: 95
Registered: July 2009
Member
I added some extra checks
Thanks
Solved
Re: [SOLVED]Connection happens only for first linking mapping [message #220975 is a reply to message #220708] Tue, 10 March 2009 14:37 Go to previous message
govind Ra is currently offline govind RaFriend
Messages: 95
Registered: July 2009
Member
I added extra checks

Its working

Thanks & Regards
Govind
Previous Topic:Label based on referenced Nodes
Next Topic:Link Mapping problem in eclipse 3.4
Goto Forum:
  


Current Time: Fri Apr 19 02:25:25 GMT 2024

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

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

Back to the top