Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Krzysztof Swiatkowski on March 20, 2008, 12:48:55 pm

Title: Extending object properties
Post by: Krzysztof Swiatkowski on March 20, 2008, 12:48:55 pm
Hi, is it possible to extend standard element and relationship properties window? Either by adding a button to call my window or by adding a new tab to it (it would be the best solution :) ). I need to add properties to elements from my MDG technology and using Tagged values seems too awkward.

Regards
Kris
Title: Re: Extending object properties
Post by: Eve on March 20, 2008, 02:45:48 pm
No, it's not possible.

Even the Sparx Systems addins use tagged values.
Title: Re: Extending object properties
Post by: Krzysztof Swiatkowski on March 21, 2008, 04:05:52 am
Then it is definitely something worth adding to make life of addin makers easier  :^) and allow for even greater extensibility of EA
This is especially true for BPMN where using Tagged values is cumbersome and for many business users unacceptable.
Think about it.

Regards
Kris
Title: Re: Extending object properties
Post by: Thomas Mercer-Hursh on March 21, 2008, 06:33:40 am
While one might hope for a way to include tagged values in the primary dialog, other than that, you have an issue of not having schema underneath these new values.  Only by having Sparx create N user-defined fields in each table that one might want to extend ... any you know they would end up being the wrong datatype ... would one have anywhere to put these value.  Tagged values is what it is exactly because it is an open-ended way of doing this.
Title: Re: Extending object properties
Post by: thomas.kilian on March 21, 2008, 10:57:45 am
Yeah. Question: why did Sparx put some of these in fixed locations (e.g. complexity, status, etc.) whilst the rest is placed in this Tagged Values window. I'd expect all of them somewhere in the properties like most other UML tools do it. That would open the path to configuring your own view.
Title: Re: Extending object properties
Post by: Krzysztof Swiatkowski on March 22, 2008, 03:48:53 am
Thomas, I don't have a problem with storing the data in tagged values because thats the way UML does it. My problem is that I want a bit more customized way of entering them.
If there was a way to implement custom property pages I could create my own window and for example allow for entering them in different way and locking access to some of them based on the value of others.
Using tagged values I have to publish all fields always regardless of whether it makes sense or not.
"abcde" also has a point because having tagged values tab would make propoerty window single place for element property editing. Think about it Sparxians :) this shouldn't be complicated you have the tagged values code already.
Title: Re: Extending object properties
Post by: Thomas Mercer-Hursh on March 22, 2008, 04:32:56 am
In fact, they do this already with some of their "magic" stereotypes like «table» and «column».  What is needed is for them to open up this interface so that we can use it ... and also to normalize those magic stereotypes so that we can override them and retain the magic behavior.
Title: Re: Extending object properties
Post by: «Midnight» on March 22, 2008, 06:53:02 am
Quote
In fact, they do this already with some of their "magic" stereotypes like «table» and «column».  What is needed is for them to open up this interface so that we can use it ... and also to normalize those magic stereotypes so that we can override them and retain the magic behavior.
I think you've nicely captured and crystallized the issue Thomas.
Title: Re: Extending object properties
Post by: KP on March 25, 2008, 09:21:00 am
Maybe you can do something in an add-in by intercepting the EA_OnContextItemDoubleClicked broadcast?
Title: Re: Extending object properties
Post by: Eve on March 25, 2008, 09:27:25 am
Thanks,

You beat me to looking up and suggesting that.
Title: Re: Extending object properties
Post by: Matt on April 17, 2008, 05:16:31 am
Kris,

you also need to use the EA_OnPostNewElement event if you want to pop up the custom screen when the new element is dragged onto a diagram.

The EA_OnContextItemDoubleClicked is needed to allow you to edit the element afterwards.

We are using this functionality in Time Architect to pop up the TA risk dialog screen.  (We then populate tags in the background).  If you want to see it in action, why not download a free 30 day evaluation copy of TA.  Open up the TA profile (or the TA example model)

If you want any further help on how we did it, then drop me a PM and I'll be happy to help.

Best regards,

Matt
Title: Re: Extending object properties
Post by: Martin Terreni on April 21, 2008, 10:30:04 pm
All very nice, yet I have seen other tools including the general attributes\tagged values\whatever in the properties dialog. I see no reason why it wouldn't be added also in EA. Use the same tagged values form, just in a new tab in the properties dialog.
Is it that hard or revolutionary?
Title: Re: Extending object properties
Post by: «Midnight» on April 21, 2008, 10:45:28 pm
There used to be a Tagged Values tab in most (if not all) properties dialogs. This disappeared when the Tagged Values pane came into being.

Merely a history lesson here; I'm certainly not trying to explain or justify the change.
Title: Re: Extending object properties
Post by: thomas.kilian on April 21, 2008, 10:53:05 pm
Eat it or die with another tool. You don't have a choice. Take it!
Title: Re: Extending object properties
Post by: Martin Terreni on April 21, 2008, 11:58:26 pm
Yammi Yammi ;)