Author Topic: A few more about profiles and MDG's  (Read 4772 times)

Sygnus

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
A few more about profiles and MDG's
« on: October 27, 2008, 01:42:04 pm »
The toolbox problem went away, but a few more questions came up right after:

- Is Altering the XML file directly the only way to alter the order of toolbox pages?

- Is there a way to create labels for stereotyped connectors? How can I access and change the text of existing labels?

- Is it possible to suppress/change the <<stereotype>> label on connectors?

- How can I define which element stereotypes accept which connector stereotypes? Can this be done thorugh profiles? Through an add-in?

- Using the tagged value connector, on the profile diagram, is it possible to create a property that allows me to pick more than one object? I mean, like the activity picker on the effects dialog?

- Is it possible to create custom dialogs for custom object types through add-ins? If so, is there a sample available for download or online browsing?

By the way, is there anyway I could have the actual diagrams for some of the Profiles and MDG's on the resources page, or some other with complex scripting and relatioships? I would really like to study EA profiles a little better, to understand how far can I push them.

Sorry for the long list and thanks in advance.

Sygnus
« Last Edit: October 27, 2008, 01:52:44 pm by Sygnus »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: A few more about profiles and MDG's
« Reply #1 on: October 27, 2008, 03:09:00 pm »
Quote
- Is Altering the XML file directly the only way to alter the order of toolbox pages?
No, don't do that. Assuming you are creating your profile by right-clicking the diagram (not the package it's in), you can change the Z-order of the «stereotype» elements. The bottom-most «stereotype» appears first.

Quote
- Is there a way to create labels for stereotyped connectors? How can I access and change the text of existing labels?
Create a shape named one of LeftTopLabel, MiddleTopLabel, RightTopLabel, LeftBottomLabel, MiddleBottomLabel, RightBottomLabel.

Quote
- Is it possible to suppress/change the <<stereotype>> label on connectors?
Either add the command hidelabel("MiddleBottomLabel"); to your shape main, or create a shape MiddleBottomLabel { print(""); }

Quote
- How can I define which element stereotypes accept which connector stereotypes? Can this be done thorugh profiles? Through an add-in?
You will need to write an add-in to intercept the "Project > Model Validation > Validate Selected" command. There is some sample code here.

Quote
- Using the tagged value connector, on the profile diagram, is it possible to create a property that allows me to pick more than one object? I mean, like the activity picker on the effects dialog?
Create a RefGUIDList tagged value (Settings > UML > Tagged Value Types, then press Help for details) and give your stereotype an attribute with the same name as your tagged value type.

Quote
- Is it possible to create custom dialogs for custom object types through add-ins? If so, is there a sample available for download or online browsing?
In an add-in, you can intercept the EA_OnContextItemDoubleClicked
broadcast and implement your own dialog.
The Sparx Team
[email protected]

Sygnus

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: A few more about profiles and MDG's
« Reply #2 on: October 27, 2008, 10:24:33 pm »
Thank you, Thank you, Thank you, Thank you!!!!!

EA is a fantastic tool, with a fantastic team behind it!

Thank you!!!!!

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: A few more about profiles and MDG's
« Reply #3 on: October 28, 2008, 12:49:08 am »
Quote
Quote
Quote
- How can I define which element stereotypes accept which connector stereotypes? Can this be done thorugh profiles? Through an add-in?
You will need to write an add-in to intercept the "Project > Model Validation > Validate Selected" command. There is some sample code here.
broadcast and implement your own dialog.

Not sure whether I got the intention of the question right but maybe you want to take a look at the QuickLink feature also.
QuickLink definitions let you define what is available as a connector between certain elements based on stereotypes.
This is no validation and limited to the quicklinker only (the small arrow on the upper right elements which pops up a context menu) but maybe this is enough for the purpose.

Oliver

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: A few more about profiles and MDG's
« Reply #4 on: October 28, 2008, 08:34:49 am »
Quote
Not sure whether I got the intention of the question right but maybe you want to take a look at the QuickLink feature also.
Yes, good call: have a look at defining some quicklinker rules before writing a validation add-in, you may find you don't need the add-in...
The Sparx Team
[email protected]

Sygnus

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: A few more about profiles and MDG's
« Reply #5 on: October 28, 2008, 11:00:51 pm »
How and where do I find/write/modify quick link rules?

I'd like to look into them, for certain!

As for the intention behind the validation rules plugin, well... I am extending the Activity and State Machine diagrams to be able to generate code from them.

It is coming along fine, even though I'm working directly with the EAP file right now, instead of using an addin (for a number of reasons), but some of the linkis I require are reported by EA as "not UML compliant" and, of course, EA is right about it.

Still I need them just the same, specially when linking elements from different diagrams, like having a Trigger element, generated by the state machine, to participate in an activity diagram in order to have an activity to flow into this trigger and, thus, to actually "trigger" it.

So far, my alternative has been to extend the dependency connector and use it for any unorthodox link I need, but it would be great to be able to just override some of the validation rules and use the "correct" connectors, with guards and stuff.

Thanks for your attention.

Sygnus
« Last Edit: October 28, 2008, 11:03:19 pm by Sygnus »

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: A few more about profiles and MDG's
« Reply #6 on: October 29, 2008, 02:11:46 am »
Quote
How and where do I find/write/modify quick link rules?

In your stereotypes diagram (of the UML profile) you have to create a document artefact which includes the quicklinking rules for the elements in CSV format.
It takes some time to become comfortable with it but it is not that of an issue.

Basically you define a source element and stereotype and associate it with a target element and stereotype, then you can define what relations(s) are available for this combination from the quicklinker menu. More can be read from the online help.

There is btw a good reason why some relations are not allowed by EA and this is called "consistency". If everything is available to be related anything else without rules then you will soon come to a point of confusion.

HTH.

Oliver

Sygnus

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: A few more about profiles and MDG's
« Reply #7 on: October 29, 2008, 03:37:53 am »
Quote
There is btw a good reason why some relations are not allowed by EA and this is called "consistency". If everything is available to be related anything else without rules then you will soon come to a point of confusion.

Agreed! That's why I want to edit the rules, not disable them! And even if I do this, it would not be a global change, but only in a very specific scenario, where I need to use elements from more than one diagram type in a customized diagram.

I honestly don't understand why the statemachine generates trigger objects that can't be linked to anything, except thorugh dependencies.

The basic use I have for triggers in my process is to show, in an activity diagram, where the events that cause state transitions are actually triggered.

I'd be happy to use regular events from the activity toolbox, but they cannot be selected on the transition event drop-down.