Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Extend BaseItemSemanticEditPolicy.xpt to support multiple links to same element
Extend BaseItemSemanticEditPolicy.xpt to support multiple links to same element [message #650984] Thu, 27 January 2011 06:35
Eclipse UserFriend
Hi all,

I have a model element that has links to other model elements. It can happen that it has two links to the same element. This is currently not supported by GMF as the create link policy prohibts this.

«DEFINE canCreate FOR gmfgen::GenLink»
«EXPAND xpt::Common::generatedMemberComment»
public boolean canCreate«getUniqueIdentifier()»(«EXPAND canCreateParameters FOR modelFacet») {
	«EXPAND checkEMFConstraints FOR modelFacet-»
	return canExist«getUniqueIdentifier()»(«EXPAND canCreateValues FOR modelFacet»);
}

«ENDDEFINE»


I think ist would be useful to look up the unique feature through the genmodel before executing this line:

«EXPAND checkEMFConstraints FOR modelFacet-»


Leaving out this line enabeled me to have multiple links between two model elements. What do you think?

Ralph

[Updated on: Thu, 27 January 2011 06:35] by Moderator

Previous Topic:React on changes of otherside of a connection
Next Topic:Project explorer view in rcp application for the mindmap example
Goto Forum:
  


Current Time: Sun Aug 17 10:09:36 EDT 2025

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

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

Back to the top