|Need clarification of Class Diagram tutorial [message #1484901]
||Sun, 23 November 2014 21:58
| David P
Registered: November 2014
I'm looking forward to using Papyrus for sequence diagrams, but I'm having trouble getting started with a class diagram.|
I'm using Luna 4.4.1 and Papyrus 1.0.1.v201409170932, and I'm trying to follow
What's unclear is:
- How to get a typed attribute of a Class to display
- How to get an operation to display
- How to get an "implements" relation to display
Here's what I've done
- Create a UML project and import primitive types
- Drag a Class from palette and drop to model.di pane. Name it Zoo.
- Drag an Interface from palette and drop to model.di pane. Name it Animal.
- In Zoo, create a property called residents of type Animal, visibility=private, and multiplicity=0..*
- I expected this attribute to appear in the Zoo box, and that an aggregation link to Animal would appear, but neither did.
- In Animal, I would like to define a feedMe() operation, but only attributes are available.
- Drag a Class from palette and drop to model.di pane. Name it Tiger.
- Select edge type Abstraction in the palette, then click and hold in the center of Tiger, drag up to the center of Animal, and release. Label the edge "implements"
- I expected the "implements" label to remain visible, but it doesn't
|Re: Need clarification of Class Diagram tutorial [message #1486055 is a reply to message #1484901]
||Mon, 24 November 2014 19:42
| Charles Rivet
Registered: May 2014
It would be useful to know what version of Papyrus you are using for your test. I am currently running off the nightly builds, so the behaviour I observe can be a little different.
For your step (5), "I expected this attribute to appear in the Zoo box, and that an aggregation link to Animal would appear, but neither did.". For the first part, this has happened to me in the past, but not lately. The easiest way to get it to appear is to right click on the "Zoo" class and select "Filters: > "Show/Hide Contents". You will then be able to pick what you want to show in the class' compartments. As for the aggregation, that is not the current behaviour of Papyrus, where the act of creating a property does not automatically create an aggregation. It is, however, often desirable to be able to graphically see that relationship, and it has already been reported as an issue (targeted at Mars I think).
For your step (9), "I expected the "implements" label to remain visible, but it doesn't", you will have to explicitly show if by right clicking on the abstraction and selecting "Filters" > "Manage Connectors Labels" to pick what you want displayed.
Powered by FUDForum
. Page generated in 0.01542 seconds