Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Hauke Wittern

Pages: [1]
1
Code: [Select]
var literal = (EA.Attribute)enumeration.Attributes.AddNew(name, "my::ExampleStereotype");
literal.Update();

Unfortunatelly, that does not work. StereotypeEx and FQStereotype are still empty. Many thanks, though. Your suggested workaround will do it.

2
I am using the C# interop API to create elements and apply stereotypes from my custom MDG Technology. This works fine for classes and properties but not for enumeration literals.

The following code snippets illustrates what I try to do:
Code: [Select]
private EA.Attribute CreateExampleLiteral(EA.Element enumeration, string name)
{
    Debug.Assert(enumeration.Type == "Enumeration");

    var literal = (EA.Attribute)enumeration.Attributes.AddNew(name, null /* literal has no type */);
    literal.StyleEx = "IsLiteral=1;";
    literal.StereotypeEx = "my::ExampleStereotype";
    // Now literal.StereotypeEx and literal.FQStereotype are not "my::ExampleStereotype" as I would expect.
    literal.Update();

    Repository.SynchProfile("my", "ExampleStereotype");
    return literal;
}
ExampleStereotype is a stereotype that extends meta class EnumerationLiteral.
Quite similar code for properties works as expected (i.e. add EA.Attribute owned to a class element, apply different stereotype and StyleEx not set).

Is this a bug or do I miss something?


3
OK then I'll solve this by generating dummy tagged values and reading their guids. Nevertheless it would be nice if Sparx publishes their algorithm.

4
Does anyone know how to generate the first half of a tagged value's guid without using the EA Api? I am going to write these to the ea_guid column of the t_attributetag, t_objectproperties etc. database tables. The tagged value must be mapped to the stereotype (defined in my MDG technology). Hence, I cannot just program it like "new GUID().ToString()". Apparently, the fully qualified name of  the tagged value must somehow be encoded into the first half (8 bytes) of the guid. This was discussed almost 10 years ago. There is also a topic that indicates that it can be done but the solution was unfortunatelly not shared.

5
I know how to set the return type of an operation. But how to set the multiplicity of an operation's result?
For example I want the signature displayed like "OperationName() : ReturnType [0..*]" in my class' operations.

I am aware I can set the multiplicity of the operation's parameters and set the direction of a parameter to "return" (according to the UML specification return type, lower and upper are derived from this parameter). However, that does not help: the operation signature is then displayed as "OperationName(result: ParameterType) : ReturnType". The specified multiplicity is not displayed. So another question arises here: how to display the multiplicity of parameters in the operations list of a class (no matter of the parameter direction)?

6
Thank you!

7
When I add a "Progress/Navigation bar" element to a Webpage Wireframe diagram, the element displays the steps "Pay", "Enter address", "Confirm" and "Finished".
How do I customize these steps? In the Properties tool window there is a property "Steps". However, I can only select one of the predefined steps to be the active step.

I am using v15.2.

Pages: [1]