I am using Rational Software Architect to have a play at class diagrams and sequence diagrams. I created a class diagram with a number of classes. I then created a sequence diagram and tried create an operation/message between the classes.
I find that in some cases i cant create a link (message/operation) between some classes. I dont know why this is the case.
Are there some rules i should be aware of before i am able to link the classes on the sequence diagram?
Usually what happens is i click on the calling class, drag the mouse to the "Service" class to denote a method call. The problem though is that mouse shows a 'disabled' icon (similar to the no parking sign) so i cant link the two classes.
If you are using "combined fragments" in sequence diagrams it is necessary that the classes that are involved in the message (method call) are part of the same "fragment". If this is the case you can include new classes to one combined fragment by right-clicking on it and selecting "Covered Lifelines" -> "Add Covered Lifeline" on the context menu.
Related
I am trying to generate a Doxygen documentation for my Python project.
It seems like Doxygen does not provide an overall class diagram of the project including Association. It shows only inheritance for a single file.
Is there is a way I can generate an overall class diagram in doxygen?
Thanks a lot!
Doxygen does not generate class diagrams that contain "association" arrows.
These are the diagram types and my experience with them (stemming from C++):
CLASS_DIAGRAMS: Seems to be an old Doxygen option, superseded by CLASS_GRAPH, which contains more information. CLASS_DIAGRAMS often just show the class without anything else in my output, which is superfluous.
CLASS_GRAPH: This is actually an inheritance diagram, not a full class diagram (internally, it even goes by the name "inherit graph"). It doesn't show a diagram at all if a class is not a derived class or base class.
COLLABORATION_GRAPH: Shows base class, membership and template relations. Doesn't show "inherited by" or "used by" relationships. For a leaf class, the inheritance diagram (CLASS_GRAPH) is just a part of the COLLABORATION_GRAPH.
TEMPLATE_RELATIONS: Shows template relations in a similar style as inheritance, which is helpful for code using template specialization instead of inheritance, e.g. CRTP.
As you have a python project, did you try out Sphinx? sphinx.ext.inheritance_diagram comes included with the sphinx-doc distribution but also does not show other types of relations than inheritance.
A web search turned out https://pypi.org/project/sphinx-pyreverse/ which might be what you're looking for. I did not try it out myself.
Is is possible to display other properties, i.e. "hasTopping" etc.?
How to do that in OWLViz?
OWLViz only display the class hierarchies (both asserted and inferred class hierarchy). which is described using only "is-a" relationships.
OWLVizGuide
Other properties may be displayed using the OWLPropViz plugin.
List of visualisation tools for Protégé
This paper compare and evaluate some ontology visualisation tools.
I have experience with StarUML and Jumli. At my current company we have a Professional license for EA 9.2.
When I design a program, I start with creating Use Cases. Then from every Use Case, I create a Sequence Diagram. And from the Sequence Diagrams, almost every Lifeline-object will become a class (and all messages will become a method). With StarUML and Jumli this wasn't a problem.
But I cannot find a way in EA to convert the Lifeline objects into classes.
I tried to read the help from Sparx, but to me it is not really helpful. Their 'tutorial' is not a tutorial, but actually just another help file with lots of blah blah.
Can anyone tell me how to do this? Or are there any really helpful links?
It IS possible, but only in one a bit hidden way. First I'll tell you about the alternative ways:
you have a conceptual error here. Timelines in Sequence diagram are not classes, but objects. So, they can't become classes.
Of course, a tool could have a function to create a class according to an object, as VP UML has. Obviously, EA has not such feature.
On the contrary, it is not a problem to drop a class on the sequence diagram to become a timeline. But EA has some conceptual problems with it, too. You have to make it an object here. Look also this.
On the other hand, there should be no problems to drop a timeline to the object diagram, but in EA it IS a problem - the object-timeline remains the timeline even on the Object diagram. That is obviously non-convenient and ununderstandable, but it is so. Obviously, it is one of these bugs that are called "features".
The same is behaviour of the timeline if we drop it on the Class Diagram. We even can't connect this object to a class by generalization - EA considers such connection as a rules breaking one.
And finally, how you CAN connect the timeline/object to a class. Right-click the timeline on the sequence diagram or its copy object on the class diagram. Go to Advanced. Choose Instance Classifier - the first menu item. There you can choose an existent class or even create a new one. And the object/timeline will belong to this very class.
You can't reach this feature from the Project Browser. It is obviously, another "feature" of the EA.
In a spec-adherent UML tool, one can assign classes (among other things) to a lifeline. I think that is why you are having difficulty converting lifelines into classes: they aren't the same kind of thing! Try creating classes first and assigning them to lifelines.
To transform sequence model into class model right-click on the package choose "Transform Current Package" => Check DDL => Select Transform
I hope this helps.
Regards,
Nabil
I was self-studying various UML diagrams and I understood most of them except for Class Diagram and Object Diagram.
I can not get my head around how they wil be converted into code.
The trick that I learnt is this: all nouns become classes and verbs become methods of the classes.
All good till there but after that, how is the diagram converted into code?
Have a look at a diagram here that I got from the internet:
So, assuming that the language is Java, how will you code a software based on this?
A UML diagram solely describes the internal architecture of a given piece of software.
The information contained in your UML diagram is therefore:
What classes are contained
What methods and properties do they contain
How do they relate to each other
Each block with a header ("Train" for instance ) represents a class, listing its properties and methods.
As such the UML diagram does not state anything about a GUI or how the user interacts with the software. It is up to you or a UI/UX designer to create an interface you can implement, that uses the functionality outlined in this UML diagram.
You can think of a UML diagram as a description of the architecture of a piece of software, that is very shallow but is well suited for an overview of the project.
It is not a recipe.
I hope this was useful to you.
When you have a class diagram, you have a representation of the classes (and its members) that you should have in code.
So, your noun/verb analysis (what you were talking about), has already been done when you have a class diagram.
A class diagram is just a visual representation of your classes, converting them to code is just easy if you know the syntax of the language that you want to use.
Good day, colleagues!
I've posted this question to Eclipse community forum of UML2Tools, but that forum is almost dead, so I post my question here:
How can I create several representations of the same class in the main window of UML2Tools?
I need this because if class has many connections with other classes(aggergations, associations, inheritance), diagram becomes very confusing.
So, in this case it's convenient to create "duplicate" of target class and make new connections on the "duplicate" class, assuming that target class has connections from both "original" and "duplicate" representation of the class.
In StarUML I can do such thing by just Copy+Paste. In UML2Tools Copy+Paste creates ANOTHER class with the same attributes. This is not what I want.
It is impossible to show different views of the same class inheritance, association and dependencies with UML2 tools.