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