Book a Demo

Author Topic: Code Template Framework: Attribute Constraints  (Read 5515 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Code Template Framework: Attribute Constraints
« on: August 13, 2009, 04:40:47 pm »
Hi!


The Code Template Framework allows access to Class constraints only, but Attributes, Connectors and Packages can all have constraints too.

I suggest the following:
  • Rename the macros constraint* -> classConstraint*
  • Add attConstraint*
  • Add connectorConstraint*
  • Add packageConstraint*
  • Remove connectorSourceConstraint and connectorDestConstraint (connectorSourceElem* and connectorDestElem* should take care of those)
To me personally, the attConstraint* ones are the highest priority.

Cheers,


/Uffe
My theories are always correct, just apply them to the right reality.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Code Template Framework: Attribute Constraints
« Reply #1 on: August 13, 2009, 09:28:14 pm »
[edit]Changes with emphasis added in response to Frank's point.[/edit]

I agree, with the exception of the priority ranking. IMHO they are all equally important. Nor do I see this as an all-or-nothing scenario. The 'nothing' option is just plain unworkable, and since we can access class constraints we're beyond that point now.

IMHO this is a bug. It could be interpreted as a side effect of how EA implements items such as constraints and attributes; such a side effect is still a flaw. We have seen similar wrinkles in how (for example) tagged values are handled differently for elements, connectors, attributes and such. But in the case of tagged values we can usually get at the various objects and collections. We need access in the case of all constraint types as well. There are a few exceptions; these are clearly bugs in how the paradigm is implemented.
« Last Edit: August 14, 2009, 09:44:28 pm by Midnight »
No, you can't have it!

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Code Template Framework: Attribute Constraints
« Reply #2 on: August 13, 2009, 10:43:56 pm »
Quote
But in the case of tagged values we can get at the various objects and collections.

Can we? What about tagged values on parameters?

twilliamson32

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Code Template Framework: Attribute Constraints
« Reply #3 on: August 14, 2009, 01:25:18 am »
I concur with this request!