Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: Remco on January 09, 2006, 04:32:09 am
-
I cannot create a tagged value by creating a "Tagged value" link to a screen stereotype.
The tagged value holds the following information:
Type=Classifier;Stereotypes=View;
(View is a screen stereotype).
The created tagged value does not work, because the list shown (when clicking the ... button from the tagged values window) to select a View is always empty.
What is wrong?
-
What do you mean by
creating a "Tagged value" link to a screen stereotype.
Tags are created using the Tagged Values window (from the View menu). You can predefine Tags using Settings/UML/Tagged Value Types...
If you want to limit the Tags to a certain element type - hmmm. I remember having read this recently but can't find it. Will have to dig in the documentation.
-
Thanx for the reaction and I hope you can find it in the documentation since I cannot.
-
Bad luck :-[ I couldn't find it too.
Sparx, can you help out?
-
It looks like the documentation is missing, but you can do it.
1. Open the Tag Definitions dialog (Configuration | UML | Tagged Values)
2. Click "New" and enter a Tag Name and Description
3. Under "Detail", type the following:
AppliesTo=Screen,GUIElement;
(I've added GUIElement to show how to make it apply to multiple types)
Sorry that it hasn't been documented yet.
-
When I do this I have to type the value of the tagged value instead of selecting it from a selection dialog like I would like to.
-
Read the documentation carefully, if you need to define drop downs for tags. This is explained for sure.
-
FYI:
Just write it in the Details Memo box while defining tagged value:
---------------------------------------
Type=Enum;
Values=Value1,Value2,Value3;
Default=Value1;
---------------------------------------
This will make it a dropdown list with predefined values.
-
Remco, what exactly are you trying to do?
What elements should it apply to? (and can then be selected in the tag name combo)
What possible values do you want it to have?
-
I want to do the following:
1. I create 2 stereotypes:
- View which extends the Screen metaclass.
- Controller which extends the class metaclass.
2. I create a tagged value for the Controller stereotype. This tagged value is connected to the View and its name is View.
3. I create a classdiagram and create two classes:
- TestController (stereotype = Controller)
- TestView (stereotype = View)
4. I want to fill in the tagged value Screen for the TestController by selecting a View from all available views.
I cannot select a View for the tagged value.
It works when I create a View stereotype that extends the class metaclass, but that is not what I want.
I hope this clears up my problem.
-
That makes things clearer and I'd like you to point to EA's profile mechanism. You can define stereotyped classes as you wish. Once you have imported such a profile, you can make it appear in the view for further use.
-
I just entered a bug report on what happens when you try to use the profile mechanism for this. Using a TaggedValue connector to a stereotype of the Screen metaclass doesn't work properly.
John Saunders
-
It should look like this.
AppliesTo=Class;
BaseStereotype=Control;
Type=Classifier;
Stereotypes=View;
Except that I don't think the Classifier Type looks at Screens.
-
So it will not work because the Classifier type does not look at screens. Does it only look to classes?
-
Currently it looks at Class, Interface, Component, Actor, Node, UseCase and Requirement.
Although specifying Values with the Classifier type can further restrict this.
eg.
Type=Classifier;
Values=Class,Interface;
This would restrict it to just Class and Interface. I believe this may be a bug though and have changed the behaviour for the next build so that the Values option overrides the previous list I gave.
From 786 you should be able to define a tag with the following to get what you want.
AppliesTo=Class;
BaseStereotype=Control;
Type=Classifier;
Stereotypes=View;
Values=Screen;