eXtending EA: Shape Script Properties

[Dieser Artikel ist nur in englischer Sprache verfügbar]

The various properties of the different EA model objects (elements, connectors, diagrams) are accessible in shape scripts via so-called Shape Script Properties.

The element or connector property can be inserted in a output text or condition test using the substitution macro #{propertyname}# (where ‚{propertyname}‘ is exchange by the concrete property name).

Example: println("name: #NAME#");

Please note that the concrete notation of a property’s name – lowercase only (e.g. #actualname#), uppercase only (e.g. #ACTUALNAME#) or mixed (e.g. #ActualName#) – is not relevant and will be ignored.

Properties for Element-related Shape Scripts

  • ActualName: The same as Name except that it does ignore the current ‚Use Alias if Available‚ setting.
  • Addin: – returns a value from an invoked Add-In function; syntax:
         addin:<addin_name>, <function_name>, <parameter> [, <parameter> ...]
    Note that in the hasproperty() argument, Enterprise Architect requires the hash characters for addin values:
         if(hasproperty("#ADDIN:MyAddin,MyValue#", "TheValue")) { ...
  • Alias: –undocumented
  • Author: –undocumented
  • Cardinality: –undocumented
  • Classifier: –undocumented
  • Classifier.ActualName: Same as Classifier.Name except that it does ignore the current ‚Use Alias if Available‚ setting.
  • Classifier.Alias: –undocumented
  • Classifier.Metatype: –undocumented
  • Classifier.Name: –undocumented– (updated to match behavior of other properties that provide the alias when Use Alias if Available is enabled)
  • Classifier.Stereotype: –undocumented
  • Classifier.Type: –undocumented
  • Complexity: –undocumented
  • Concurrency: –undocumented
  • DateCreated: –undocumented
  • DateModified: –undocumented
  • Diagram.HandDrawn: –undocumented
  • Diagram.MdgType: –undocumented
  • Diagram.Name: –undocumented
  • Diagram.Stereotype: –undocumented
  • Diagram.Type: –undocumented
  • ES: Adds the End Stereotype character(s) as determined by the „Use extended << and >> characters“ option.
  • HasLinkedDocument: –undocumented
  • IncomingEdge: Returns „none“, „left“, „right“, „top“, „bottom“ or „multiple“.
  • IsAbstract: –undocumented
  • IsActive: –undocumented
  • IsComposite: –undocumented
  • IsDrawCompositeLinkIcon: –undocumented
  • IsEmbedded: –undocumented
  • IsInparent: –undocumented
  • IsLeaf: –undocumented
  • IsLocked: –undocumented
  • IsRoot: –undocumented
  • IsSpec: –undocumented
  • IsTagged: –undocumented
  • IsVisible: –undocumented
  • Keywords: –undocumented
  • Language: –undocumented
  • Metatype: –undocumented
  • Multiplicity: –undocumented
  • Name: –undocumented
  • Notes: –undocumented
  • NotesVisible: –undocumented
  • OutgoingEdge: Returns „none“, „left“, „right“, „top“, „bottom“ or „multiple“.
  • PackageName: –undocumented
  • PackagePath: –undocumented
  • Package.Stereotype: –undocumented
  • ParentEdge: Returns „right“, „left“, „top“ or „bottom“.
  • Parent.Metatype: –undocumented
  • Partition: Returns „vertical“ or „horizontal“.
  • Persistence: –undocumented
  • Phase: –undocumented
  • Priority: –undocumented
  • PropertyType: –undocumented
  • PropertyType.Alias: –undocumented
  • PropertyType.Metatype: –undocumented
  • PropertyType.Name: –undocumented
  • PropertyType.Stereotype: –undocumented
  • QualifiedName: –undocumented
  • RectangleNotation: –undocumented– (can now be provided a default value using the _UCRect metatype property in profiles; now available for additional types, including Object)
  • Scope: –undocumented
  • ShowComposedDiagram: Returns „True“ or „False„.
  • SS: Adds the Start Stereotype character(s) as determined by the „Use extended << and >> characters“ option.
  • Status: –undocumented
  • Stereotype: –undocumented
  • StereotypeHidden: –undocumented
  • Subtype: –undocumented
  • Type: –undocumented
  • Version: –undocumented
  • Visibility: –undocumented

Properties for Connector-related Shape Scripts

  • ActualName: Same as Name except that it does ignore the current ‚Use Alias if Available‚ setting.
  • Addin: Returns a value from an invoked Add-In function; syntax:
         addin:<addin_name>, <function_name>, <parameter> [, <parameter> ...]
    Note that in the hasproperty() argument, Enterprise Architect requires the hash characters for addin values:
         if(hasproperty("#ADDIN:MyAddin,MyValue#", "TheValue")) { ...
  • Alias: –undocumented
  • Diagram.ConnectorNotation: –undocumented
  • Diagram.HandDrawn: –undocumented
  • Diagram.MdgType: –undocumented
  • Diagram.Name: –undocumented
  • Diagram.Stereotype: –undocumented
  • Diagram.Type: –undocumented
  • Direction: –undocumented
  • Effect: –undocumented
  • ES: Adds the End Stereotype character(s) as determined by the „Use extended << and >> characters“ option.
  • Guard: –undocumented
  • IsRoot: –undocumented
  • IsLeaf: –undocumented
  • Name: –undocumented
  • RotationDirection: Returns „up“, „down“, „left“ or „right“.
  • Source.ActualName: The same as Source.Name except that it does ignore the current ‚Use Alias if Available‚ setting.
  • Source.Aggregation: –undocumented
  • Source.Alias: –undocumented
  • Source.Changeable: –undocumented
  • Source.Constraints: –undocumented
  • Source.Element.Name: –undocumented
  • Source.Element.Stereotype: –undocumented
  • Source.Metatype: The target element must match the exact stereotype defined at the source.
  • Source.Metatype.General: The target element can match the exact stereotype used at the source and any concrete (isAbstract=false) generalized stereotypes.
  • Source.Metatype.Specific: The target element can match the exact stereotype used at the source and any concrete (isAbstract=false) specialized stereotypes.
  • Source.Metatype.Both: The target element can match the exact stereotype used at the source and any concrete (isAbstract=false) generalized or specialized stereotypes.
  • Source.Multiplicity: –undocumented
  • Source.MultiplicityIsOrdered: –undocumented
  • Source.Name: –undocumented
  • Source.Qualifiers: –undocumented
  • Source.Stereotype: –undocumented
  • Source.TargetScope: –undocumented
  • SS: Adds the Start Stereotype character(s) as determined by the „Use extended << and >> characters“ option.
  • Stereotype: –undocumented
  • Target.ActualName: The same as Target.Name except that it does ignore the current ‚Use Alias if Available‚ setting.
  • Target.Aggregation: –undocumented
  • Target.Alias: –undocumented
  • Target.Changeable: –undocumented
  • Target.Constraints: –undocumented
  • Target.Element.Name: –undocumented
  • Target.Element.Stereotype: –undocumented
  • Target.Metatype: –undocumented
  • Target.Multiplicity: –undocumented
  • Target.MultiplicityIsOrdered: –undocumented
  • Target.Name: –undocumented
  • Target.Qualifiers: –undocumented
  • Target.Stereotype: –undocumented
  • Target.TargetScope: –undocumented
  • Triggers: –undocumented
  • Type: –undocumented
  • Weight: –undocumented

Weitere Informationen:

Veröffentlicht unter Entwicklung, MDG Technology
Schlagworte: , ,

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

*