Main Menu
Login
SSL SecureMode
Username:
Password:  
Lost Password?
Register now!
ChangeVision Members Map
Search
Forum Index   -   Topic Index
   How to use of Astah (Pro/SysML/GSN/Com)
     How to have association name show as attribute

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
dbronk
Posted on: 2011/8/4 6:09
Just popping in
Joined: 2011/8/4
From:
Posts: 1
How to have association name show as attribute
I'm new to Astah as well as this forum. I did search, but did not find the answer. I've imported my java classes and drag them into a class diagram and was pleased to see it worked quite well. I'd like to know if the following two things are possible to do:

1. On my associations, it shows {ordered} as a constraint name. I'd like to know how to not have those show in the diagram.

2. The diagram correctly shows my association names on the association line. ie: List<MyClass> myList will show on the line as "myList". But, I'd like "myClass" to show in the attribute section of the class in the class diagram as well. If I have my Class1 on a diagram and I don't have Class2, then I can see that Class1 has a list of Class2 classes.

Hope I explained it well enough.
Joba
Posted on: 2011/8/4 10:48
Developer
Joined: 2006/6/6
From:
Posts: 969
Re: How to have association name show as attribute
Hello dbronk,

Quote:
1. On my associations, it shows {ordered} as a constraint name. I'd like to know how to not have those show in the diagram.
There are two ways:

1) Using Pop-up menu
Right-click on the Association line to show its Pop-up menu and then check off [Constraint Visibility]












2) Using [System Properties]
Go to [Tool] - [System Properties] from Main menu. [System Properties] dialog opens, select [Visibility1 (initial)] and check off [Association Constraint] and then click [Apply] - [OK]. Please note that this does not apply for existing diagrams. So you need to have this setting done first, and then create a new Class Diagram and drag the imported classes onto it.










Quote:
2. The diagram correctly shows my association names on the association line. ie: List<MyClass> myList will show on the line as "myList". But, I'd like "myClass" to show in the attribute section of the class in the class diagram as well. If I have my Class1 on a diagram and I don't have Class2, then I can see that Class1 has a list of Class2 classes.
When you import .Java files, [Java Parse Chooser] dialog should appear as the figure below. Take check off for the items you want to import as attributes and then click [OK]. The checked-off items would appear as Attributes in the Classes as you wish. If you want to change them after you imported all the classes, you will have to do all by hand.






Hope this helps,
SJ
Threaded | Newest First Previous Topic | Next Topic | Top