Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Link direction as semantic attribute
Link direction as semantic attribute [message #643599] Tue, 07 December 2010 15:48 Go to next message
Eclipse UserFriend
Originally posted by: marius.groeger.googlemail.com

Hello,

I want to use the generator flags "Incoming/Outgoging Creation Allowed".
This does work on the graphical level. But is there a possiblity to
reflect that direction in the related semantic (EMF) object as an attribute?

Thanks
Marius
Re: Link direction as semantic attribute [message #643648 is a reply to message #643599] Tue, 07 December 2010 18:20 Go to previous messageGo to next message
Michael Golubev is currently offline Michael GolubevFriend
Messages: 383
Registered: July 2009
Senior Member
Hello,

You already have all the required information in your generated command class, e.g, look at the code below:

/**
* @generated
*/
public RhombRightCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
	super(request.getLabel(), null, request);
	this.source = source;
	this.target = target;
	if (source != null && target != null){
		System.out.println("req.source: " + request.getSource());
		System.out.println("req.target: " + request.getTarget());
		System.out.println("my source : " + source);
		System.out.println("my target: " + target);
		System.out.println("reversed: " + (request.getSource() == target));
	}
}


so you can tweak semantic command to respect the invert-ness in whatever way.

Regards,
Michael
Re: Link direction as semantic attribute [message #643774 is a reply to message #643648] Wed, 08 December 2010 09:11 Go to previous message
Eclipse UserFriend
Originally posted by: marius.groeger.googlemail.com

Hi Michael,

On 07.12.2010 19:20, Michael Golubev wrote:
> Hello,
> You already have all the required information in your generated command
> class, e.g, look at the code below:

Thanks for this hint. In fact I'm using now a custom edit policy to
generate the relevant change in the semantic model - so no need to alter
the generated code.

Regards
Marius
Previous Topic:Move and Create Request
Next Topic:Display association in diagram
Goto Forum:
  


Current Time: Fri Apr 26 01:11:53 GMT 2024

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

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

Back to the top