Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
General Board / Re: EA 15.1 - Stereotype-Handling -Deletion and avoiding Orphans
« Last post by Eve on May 29, 2020, 08:54:24 am »
It's not quite automated, but my starting point would be a (custom sql) search like this.

Code: [Select]
select t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE, t_object.Name, t_object.Object_Type as BaseType, t_object.Stereotype, t_xref.Description
from t_object, t_xref
where t_object.ea_guid = t_xref.Client and t_xref.Name='Stereotypes'

That will return every stereotyped object in the model. It can be extended to return attributes/operations/connectors as well if needed.

If you drag the Description column to the group area, you can collapse the groups for stereotypes you actually want, then do something with the elements using stereotypes you don't want. Alternatively, you can use the filter bar to search for particular stereotyped objects. eg. filter the description column for 'GUID=', to find all of the stereotypes that don't come from a profile. Or filter the same column for Name=MyStereotype to find all usages of that stereotype to make sure they all come from the same profile.

You can even use Repository.CurrentSelection in a script to bulk process your selection within the search.
22
Uml Process / Re: Multiple stereotypes
« Last post by Eve on May 29, 2020, 08:33:18 am »
But of course you would treat a stererotype for one metaclass different to that for another one.
A big if/else condition at the top level of your stereotype.

What happens if multiple stereotypes have the properties with the same name? Will they appear as duplicates? Will one dominate the other?
Very easy to see, even in old versions there was an option to see the fully qualified names. In recent versions they are grouped by the stereotype.

Which shape script will take effect?
EA only allows one, it prioritizes stereotypes that define a metaclass, then uses the first one it finds.
23
I would think they are related to the multi-language capability in 15.1. No idea why they aren't documented.
24
Automation Interface, Add-Ins and Tools / Re: Debugging a diagram script
« Last post by Paolo F Cantoni on May 29, 2020, 08:18:16 am »
Hi Arnoud,

We use a "trick".  We have a global variable.  If the value is zero it uses the current diagram else it opens the diagram specified by the variable.  It DOES mean you need to know either the GUID or the ID of the diagram, but...

Paolo
25
Automation Interface, Add-Ins and Tools / Re: Debugging a diagram script
« Last post by qwerty on May 29, 2020, 05:21:36 am »
Use an IDE from outside EA.

q.
26
Automation Interface, Add-Ins and Tools / Debugging a diagram script
« Last post by Arnoud_B on May 29, 2020, 03:58:47 am »
Hi, I am very new to scripting in EA so it is most probably an obvious thing. I already found a lot of answers to things that I did not get working initially but this one I (till now) did not succeed to solve on my own.

I am creating some POC scripts to see what is possible in EA scripting and I started to create a diagram script. However it contains an error (and will contain more in the future) and I wanted to debug it. However if I start the debugger from the script window there is no diagram selected and my script fails. But if I start the script from the diagram window then I cannot start it in debugging mode.
O yes I am using JavaScript but that won't change anything I think.
27
Hi Klaus,

I'm afraid you're going to need a bit of scripting to get these things cleaned up.

Also I think you should avoid using stereotype defined in the model. The better approach is to define stereotypes in a profile and deploy them with an MDG

Geert
28
Uml Process / Re: Multiple stereotypes
« Last post by qwerty on May 29, 2020, 12:34:04 am »
A little addendum. I was thinking about both, multiple stereotypes and stereotypes extending multiple metaclasses. The problem that came to me was the 2nd class citizenship of connectors. When you extend multiple metaclasses EA stores everything in the stereotype which should have gone to the connector (or they should have uses association classes). If you have shape scripts of other individual properties you can only put them in the stereotype. But of course you would treat a stererotype for one metaclass different to that for another one. So now you get a bad blend (good for the sink but not to create meta models). Same goes for assignement of multiple stereotypes (which might as well be an UML design issue). What happens if multiple stereotypes have the properties with the same name? Will they appear as duplicates? Will one dominate the other? Which shape script will take effect?

q.
29
General Board / EA 15.1 - Stereotype-Handling -Deletion and avoiding Orphans
« Last post by kl_seeger on May 29, 2020, 12:33:07 am »
Hello and a good day, one of our projects is struggling with the usage and cleanup of stereotypes. They are suffering from wrongly added stereotypes from older EA-versions.
I understood from these two threads
- https://www.sparxsystems.com/forums/smf/index.php/topic,43282.msg256670.html#msg256670
- https://www.sparxsystems.com/forums/smf/index.php/topic,42491.msg252682.html#msg252682

that this can be handled in a better way with EA 15.1.

Nevertheless the maintenance raises still some questions.
The UML-type-maintenance dialog is fine and the deletion of stereotypes works, but I miss the possibility to check and/or to reset/ disassociate unwanted stereotypes that are marked as "to be deleted".
As also watched here
- https://www.sparxsystems.com/forums/smf/index.php/topic,42824.msg254135.html#msg254135 (last post)
the stereotype is deleted and can not be assigned again to other objects but the value is still assigned to the objects which have used the stereotype so far. This deleted stereotype will not be replaced by a new associated one... the new one will just be added too.
Knowing that behaviour I can run a simple model-search, sort the list by stereotypes and disassociate the stereotypes-"to be deleted" one after each other before I delete it... so far so good...

Wouldn't it be good feature to integrate such a (optional) "reset" in the delete-function or is that  possible and I'm not aware of this possibility?

Is there a way to identify "orphan"-stereotypes and to remove them from the object-properties?

Thanks a lot
Klaus
30
Bugs and Issues / V15 Document Generation PDF: content is scaled down
« Last post by PeterHeintz on May 29, 2020, 12:19:17 am »
In V15 versions the content of my generated documents is scaled down. What looks fine in any former EA version is somehow scaled down round about to 75% (75% usage of my page size).
Pages: 1 2 [3] 4 5 ... 10