def generate_getCreateConnectionFeatures (Diagram diagram) '''
«overrideHeader»
public ICreateConnectionFeature[] getCreateConnectionFeatures() {
return new ICreateConnectionFeature[] {
«FOR cls : diagram.metaClasses.filter(e|e.representedBy instanceof Connection) SEPARATOR ","»
new «cls.createFeatureClassName.shortName»(this)
«ENDFOR»
«IF ! diagram.metaClasses.filter(e|e.representedBy instanceof Connection).isEmpty »
,
«ENDIF»
«FOR metaClass : diagram.metaClasses»
«FOR reference : metaClass.references.filter(ref|ref.representedBy != null) SEPARATOR ","»
new «reference.createReferenceAsConnectionFeatureClassName.shortName»(this)
«ENDFOR»
«ENDFOR»
};
}
'''
When there are multiple references of the same kind there is no comma generated
in the code.
Original issue reported on code.google.com by de.abg.r...@gmail.com on 11 Jan 2012 at 9:40
Original issue reported on code.google.com by
de.abg.r...@gmail.com
on 11 Jan 2012 at 9:40