Author Topic: Shape script for non stereotyped classifiers  (Read 3090 times)

Robert de Wolff

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Shape script for non stereotyped classifiers
« on: October 17, 2008, 01:59:52 am »
I want to have a shape script for all use cases in my model independant of the stereotype. Is there a way to do that?

I can imagine that when I have a * as stereotype and base class as use case the shape script will occur for every use case.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Shape script for non stereotyped classifiers
« Reply #1 on: October 17, 2008, 07:01:33 am »
Hi Robert,

If I understand you correctly, this would be sort of like using the classifier shape as your 'script' and then working from there with other scripting elements.

You can use the classifier shape, but once you do so EA simply takes over, and your script cannot tweak the shape from there. Control is handed over to the default EA rendering engine and never returned to the script.

I've asked Sparx to modify this so that we could massage the shape, but received no answer.

Perhaps you'd care to start another feature request. If enough people ask for this perhaps it will work its way up in the priority queue for future builds.

You can send in a request - versus posting here, which is merely a "suggestion" on a user forum - by clicking the Feature Request link below the Support link near the bottom of any forum page.

David
No, you can't have it!

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: Shape script for non stereotyped classifiers
« Reply #2 on: October 21, 2008, 08:24:46 am »
I don't know if this helps.

As a workaround - have you thought of defining your own stereotype to use for all your usecases?  Add this to a profile and get your analysts to use this new stereotyped usecase from the toolbox (rather than the UML default one).

The other option is an add-in on a use case add - that will default the stereotype (I don't know if the scripting engine will then fire on the new element if the stereotype is changed on diagram add / element create).

Lastly, you could try multi-level inheritance in a profile if you have a common script you need to fire for different stereotyped use cases.

For example - you start with a use case metaclass in your profile, then extend that with a stereotype class called "foo" which contains your common script.  You might be able to extend this stereotype with all the other use case types you need and their own script (or not) as the case might be.  I don't know if EA will chain script calls where multi-level stereotype inheritance is used in a UML profile.

Cheers,
David.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"