A lifeline is a vertical section of the sequence diagram representing an object and its messages. An object is an instance of a classifier (a Java class, interface, enum or annotation). A message is sent from one object to another one. It is usually associated with an operation (a method of a Java classifier).
A combined fragment groups together interaction fragments, i.e. messages and other combined fragments. Its interaction operator defines the semantics of a combined fragment. A combined fragment also has one or more interaction operands, each with an interaction constraint that provide further grouping of interaction fragments.
The Sequence Diagram Editor offers the same seamless integration into the Eclipse IDE as the Class Diagram Editor. You can drag Java types or methods from any view, e.g. the Type Hierarchy, Call Hierarchy and the Search view. Of course you can see javadoc and source code in the Javadoc and Declaration views. In addition, you can create call sequences from a stack trace in the Java Stack Trace Console, the Call Hierarchy view and from the call stack of a paused program in the Debug view.
First you create an empty sequence diagram with the 'New' wizard. To get there, you can simply press Ctrl+N in the package or folder where you want to create your class diagram.
You can drag classes onto your diagram to create objects. Any view with Java elements can be the source, in this example the Project Explorer is used.
If you drop a Java method onto a lifeline, the corresponding message and object are generated.
Of course you also simply drag a message from one lifeline to another and then select the operation.
Add Called Operations
You may want to add the operations called by your message's operation. The code of the
operation is parsed for this; this works for source as well as compiled code with attached source.
The control structures are translated into combined fragments, e.g. a
Combined fragments can also be created manually from a selection of interaction fragments.
Add from the Java Stack Trace Console
If you have an active Sequence Diagram Editor, you can click on a button
in the Java Stack Trace Console to reverse engineer all or the selected
part of a stack trace. Note that the top method in the selected
call stack (
Add Java Stack Frames from Debug View
If you have an active Sequence Diagram Editor, you can select a context menu item in the Debug view to reverse engineer all Java stack frames or only the selected ones from a paused thread.
Add Methods Call from Call Hierarchy View
If you have an active Sequence Diagram Editor, you can drag a method from the Call Hierarchy view. The entire call hierarchy from the root will be reverse engineered.