Login | Register
My pages Projects Community openCollabNet

ArgoUML User Manual

A tutorial and reference description

Alejandro Ramirez

Philippe Vanpeperstraete

Andreas Rueckert

Kunle Odutola

Jeremy Bennett

Linus Tolke

Michiel van der Wulp

This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later. A copy of this license is included in the section Open Publication License. The latest version is presently available at http://www.opencontent.org/openpub/.

Abstract

This version of the manual is intended to describe the version DISCONTINUED-0.26 of ArgoUML.


Table of Contents

1. Preface
1. Introduction
1.1. Origins and Overview of ArgoUML
1.1.1. Object Oriented Analysis and Design
1.1.2. The Development of ArgoUML
1.1.3. Finding Out More About the ArgoUML Project
1.2. Scope of This User Manual
1.2.1. Target Audience
1.2.2. Scope
1.3. Overview of the User Manual
1.3.1. Tutorial Manual Structure
1.3.2. Reference Manual Structure
1.3.3. User Feedback
1.4. Assumptions
1. Tutorial
2. Introduction (being written)
3. UML Based OOA&D
3.1. Background to UML
3.2. UML Based Processes for OOA&D
3.2.1. Types of Process
3.2.2. A Development Process for This Tutorial
3.3. Why ArgoUML is Different
3.3.1. Cognitive Psychology
3.3.2. Open Standards
3.3.3. 100% Pure Java
3.3.4. Open Source
3.4. ArgoUML Basics
3.4.1. Getting Started
3.4.2. The ArgoUML User Interface
3.4.3. Output
3.4.4. Working With Design Critics
3.5. The Case Study (To be written)
4. Requirements Capture
4.1. Introduction
4.2. The Requirements Capture Process
4.2.1. Process Steps
4.3. Output of the Requirements Capture Process
4.3.1. Vision Document
4.3.2. Use Case Diagram
4.3.3. The Use Case Specification
4.3.4. Supplementary Requirement Specification
4.4. Using Use Cases in ArgoUML
4.4.1. Actors
4.4.2. Use Cases
4.4.3. Associations
4.4.4. Hierarchical Use Cases
4.4.5. Stereotypes
4.4.6. Documentation
4.4.7. System Boundary Box
4.5. Case Study
4.5.1. Vision Document
4.5.2. Identifying Actors and Use Cases
4.5.3. Associations (To be written)
4.5.4. Advanced Diagram Features (To be written)
4.5.5. Use Case Specifications (To be written)
4.5.6. Supplementary Requirements Specification (To be written)
5. Analysis
5.1. The Analysis Process
5.1.1. Class, Responsibilities, and Collaborators (CRC) Cards
5.1.2. Concept Diagram (To be written)
5.1.3. System Sequence Diagram (To be written)
5.1.4. System Statechart Diagram (To be written)
5.1.5. Realization Use Case Diagram (To be written)
5.1.6. Documents (To be written)
5.2. Class Diagrams (To be written)
5.2.1. The Class Diagram (To be written)
5.2.2. Advanced Class Diagrams (To be written)
5.3. Creating Class Diagrams in ArgoUML
5.3.1. Classes
5.3.2. Associations (To be written)
5.3.3. Class Attributes and Operations (To be written)
5.3.4. Advanced Class Features (To be written)
5.4. Sequence Diagrams (To be written)
5.4.1. The Sequence Diagram (To be written)
5.4.2. Identifying Actions (To be written)
5.4.3. Advanced Sequence Diagrams (To be written)
5.5. Creating Sequence Diagrams in ArgoUML
5.5.1. Sequence Diagrams
5.5.2. Actions (To be written)
5.5.3. Advanced Sequence Diagrams (To be written)
5.6. Statechart Diagrams (To be written)
5.6.1. The Statechart Diagram (To be written)
5.6.2. Advanced Statechart Diagrams (To be written)
5.7. Creating Statechart Diagrams in ArgoUML
5.7.1. Statechart Diagrams (To be written)
5.7.2. States (To be written)
5.7.3. Transitions (To be written)
5.7.4. Actions (To be written)
5.7.5. Advanced Statechart Diagrams (To be written)
5.8. Realization Use Cases (To be written)
5.9. Creating Realization Use Cases in ArgoUML (To be written)
5.10. Case Study (To be written)
5.10.1. CRC Cards
5.10.2. Concept Class Diagrams (To be written)
5.10.3. System Sequence Diagrams (To be written)
5.10.4. System Statechart Diagrams (To be written)
5.10.5. Realization Use Cases (To be written)
6. Design
6.1. The Design Process (To be written)
6.1.1. Class, Responsibilities, and Collaborators (CRC) Cards
6.1.2. Package Diagram (To be written)
6.1.3. Realization Class Diagrams (To be written)
6.1.4. Sequence Diagrams and Collaboration Diagrams (To be written)
6.1.5. Statechart Diagrams and Activity Diagrams (To be written)
6.1.6. Deployment Diagram (To be written)
6.1.7. Documents (To be written)
6.2. Package Diagrams (To be written)
6.2.1. The Package Diagram (To be written)
6.2.2. Advanced Package Diagrams (To be written)
6.3. Creating Package Diagrams in ArgoUML
6.3.1. Packages
6.3.2. Relationships between packages (To be written)
6.3.3. Advanced Package Features (To be written)
6.4. More on Class Diagrams (To be written)
6.4.1. The Class Diagram (To be written)
6.4.2. Advanced Class Diagrams (To be written)
6.5. More on Class Diagrams in ArgoUML (To be written)
6.5.1. Classes (To be written)
6.5.2. Class Attributes and Operations (To be written)
6.5.3. Advanced Class Features
6.6. Sequence and Collaboration Diagrams (To be written)
6.6.1. More on the Sequence Diagram (To be written)
6.6.2. The Collaboration Diagram (To be written)
6.6.3. Advanced Collaboration Diagrams (To be written)
6.7. Creating Collaboration Diagrams in ArgoUML (To be written)
6.7.1. Collaboration Diagrams (To be written)
6.7.2. Messages (To be written)
6.7.3. Advanced Collaboration Diagrams (To be written)
6.8. Statechart Diagrams (To be written)
6.8.1. The Statechart Diagram (To be written)
6.8.2. Advanced Statechart Diagrams (To be written)
6.9. Creating Statechart Diagrams in ArgoUML (To be written)
6.9.1. Statechart Diagrams (To be written)
6.9.2. States (To be written)
6.9.3. Transitions (To be written)
6.9.4. Actions (To be written)
6.9.5. Advanced Statechart Diagrams (To be written)
6.10. Activity Diagrams (To be written)
6.10.1. The Activity Diagram (To be written)
6.11. Creating Activity Diagrams in ArgoUML (To be written)
6.11.1. Activity Diagrams (To be written)
6.11.2. Action States (To be written)
6.12. Deployment Diagrams (To be written)
6.12.1. The Deployment Diagram (To be written)
6.13. Creating Deployment Diagrams in ArgoUML (To be written)
6.13.1. Nodes (To be written)
6.13.2. Components (To be written)
6.13.3. Relationships between nodes and components (To be written)
6.14. System Architecture (To be written)
6.15. Case Study (To be written)
6.15.1. CRC Cards (To be written)
6.15.2. Packages (To be written)
6.15.3. Class Diagrams (To be written)
6.15.4. Sequence Diagrams (To be written)
6.15.5. Collaboration Diagrams (To be written)
6.15.6. Statechart Diagrams (To be written)
6.15.7. Activity Diagrams (To be written)
6.15.8. The Deployment Diagram (To be written)
6.15.9. The System Architecture (To be written)
7. Code Generation, Reverse Engineering, and Round Trip Engineering
7.1. Introduction
7.2. Code Generation
7.2.1. Generating Code from the Static Structure
7.2.2. Generating code from interactions and state machines
7.3. Code Generation in ArgoUML
7.3.1. Static Structure
7.3.2. Interactions and statechart diagrams
7.4. Reverse Engineering
7.5. Round-Trip Engineering
2. User Interface Reference
8. Introduction
8.1. Overview of the Window
8.2. General Mouse Behavior in ArgoUML
8.2.1. Mouse Button Terminology
8.2.2. Button 1 Click
8.2.3. Button 1 Double Click
8.2.4. Button 1 Motion
8.2.5. Shift and Ctrl modifiers with Button 1
8.2.6. Alt with Button 1: Panning
8.2.7. Ctrl with Button 1: Constrained Drag
8.2.8. Button 2 Actions
8.2.9. Button 2 Double Click
8.2.10. Button 2 Motion
8.3. General Information About Panes
8.3.1. Re-sizing Panes
8.4. The status bar
9. The Toolbar
9.1. File operations
9.2. Edit operations
9.3. View operations
9.4. Create operations
10. The Menu bar
10.1. Introduction
10.2. Mouse Behavior in the Menu Bar
10.3. The File Menu
10.3.1. New
10.3.2. Open Project...
10.3.3. Save Project
10.3.4. Save Project As...
10.3.5. Revert to Saved
10.3.6. Import XMI...
10.3.7. Export XMI...
10.3.8. Import Sources...
10.3.9. Page Setup...
10.3.10. Print...
10.3.11. Export Graphics...
10.3.12. Export All Graphics...
10.3.13. Notation
10.3.14. Project Properties
10.3.15. Most Recent Used Files
10.3.16. Exit
10.4. The Edit Menu
10.4.1. Select
10.4.2. Remove From Diagram
10.4.3. Delete From Model
10.4.4. Configure Perspectives...
10.4.5. Settings...
10.5. The View Menu
10.5.1. Goto Diagram...
10.5.2. Find...
10.5.3. Zoom
10.5.4. Adjust Grid
10.5.5. Adjust Snap
10.5.6. Page Breaks
10.5.7. Toolbars
10.5.8. XML Dump
10.6. The Create Menu
10.6.1. New Use Case Diagram
10.6.2. New Class Diagram
10.6.3. New Sequence Diagram
10.6.4. New Collaboration Diagram
10.6.5. New Statechart Diagram
10.6.6. New Activity Diagram
10.6.7. New Deployment Diagram
10.7. The Arrange Menu
10.7.1. Align
10.7.2. Distribute
10.7.3. Reorder
10.7.4. Size To Fit Contents
10.7.5. Layout
10.8. The Generation Menu
10.8.1. Generate Selected Classes ...
10.8.2. Generate All Classes...
10.8.3. Generate Code for Project... (To be Written)
10.8.4. Settings for Generate for Project... (To be Written)
10.9. The Critique Menu
10.9.1. Toggle Auto-Critique
10.9.2. Design Issues...
10.9.3. Design Goals...
10.9.4. Browse Critics...
10.10. The Tools Menu
10.11. The Help Menu
10.11.1. System Information
10.11.2. About ArgoUML
11. The Explorer
11.1. Introduction
11.2. Mouse Behavior in the Explorer
11.2.1. Button 1 Click
11.2.2. Button 1 Double Click
11.2.3. Button 1 Motion
11.2.4. Button 2 Actions
11.2.5. Button 2 Double Click
11.3. Keyboard Behavior in the Explorer
11.4. Perspective Selection
11.5. Configuring Perspectives
11.5.1. The Configure Perspectives dialog
11.6. Context Sensitive Menu
11.6.1. Create Diagram
11.6.2. Create ModelElement
11.6.3. Copy Diagram to Clipboard as Image
11.6.4. Add to Diagram
11.6.5. Delete From Model
11.6.6. Set Source Path... (To be written)
11.6.7. Add Package
11.6.8. New Stereotype
11.6.9. Add All Classes in Namespace
12. The Editing Pane
12.1. Introduction
12.2. Mouse Behavior in the Editing Pane
12.2.1. Button 1 Click
12.2.2. Button 1 Double Click
12.2.3. Button 1 Motion
12.2.4. Shift and Ctrl modifiers with Button 1
12.2.5. Alt with Button 1 motion
12.2.6. Button 2 Actions
12.2.7. Button 2 Double Click
12.2.8. Button 2 Motion
12.3. Keyboard Behavior in the Editing Pane
12.3.1. Nudging a model element
12.3.2. Moving across the model elements
12.4. The tool bar
12.4.1. Layout Tools
12.4.2. Annotation Tools
12.4.3. Drawing Tools
12.4.4. Use Case Diagram Specific Tools
12.4.5. Class Diagram Specific Tools
12.4.6. Sequence Diagram Specific Tools
12.4.7. Collaboration Diagram Specific Tools
12.4.8. Statechart Diagram Specific Tools
12.4.9. Activity Diagram Specific Tools
12.4.10. Deployment Diagram Specific Tools
12.5. The Broom
12.6. Selection Action Buttons
12.7. Clarifiers
12.8. The Drawing Grid
12.9. The Diagram Tab
12.10. Pop-Up Menus
12.10.1. Critiques
12.10.2. Ordering
12.10.3. Add
12.10.4. Show
12.10.5. Modifiers
12.10.6. Multiplicity
12.10.7. Aggregation
12.10.8. Navigability
12.11. Notation
12.11.1. Notation Languages
12.11.2. Notation Editing on the diagram
12.11.3. Notation Parsing
13. The Details Pane
13.1. Introduction
13.2. To Do Item Tab
13.2.1. Wizards
13.2.2. The Help Button
13.3. Properties Tab
13.4. Documentation Tab
13.5. Presentation Tab
13.6. Source Tab
13.7. Constraints Tab
13.7.1. The Constraint Editor
13.8. Stereotype Tab
13.9. Tagged Values Tab
13.10. Checklist Tab
14. The To-Do Pane
14.1. Introduction
14.2. Mouse Behavior in the To-Do Pane
14.2.1. Button 1 Click
14.2.2. Button 1 Double Click
14.2.3. Button 2 Actions
14.2.4. Button 2 Double Click
14.3. Presentation Selection
14.4. Item Count
15. The Critics
15.1. Introduction
15.1.1. Terminology
15.1.2. Design Issues
15.2. Uncategorized
15.3. Class Selection
15.3.1. Wrap DataType
15.3.2. Reduce Classes in namespace <namespace>
15.3.3. Clean Up Diagram
15.4. Naming
15.4.1. Resolve Association Name Conflict
15.4.2. Revise Attribute Names to Avoid Conflict
15.4.3. Change Names or Signatures in a model element
15.4.4. Duplicate End (Role) Names for an Association
15.4.5. Role name conflicts with member
15.4.6. Choose a Name (Classes and Interfaces)
15.4.7. Name conflict in a namespace
15.4.8. Choose a Unique Name for a model element (Classes and Interfaces)
15.4.9. Choose a Name (Attributes)
15.4.10. Choose a Name (Operations)
15.4.11. Choose a Name (States)
15.4.12. Choose a Unique Name for a (State related) model element
15.4.13. Revise Name to Avoid Confusion
15.4.14. Choose a Legal Name
15.4.15. Change a model element to a Non-Reserved Word
15.4.16. Choose a Better Operation Name
15.4.17. Choose a Better Attribute Name
15.4.18. Capitalize Class Name
15.4.19. Revise Package Name
15.5. Storage
15.5.1. Revise Attribute Names to Avoid Conflict
15.5.2. Add Instance Variables to a Class
15.5.3. Add a Constructor to a Class
15.5.4. Reduce Attributes on a Class
15.6. Planned Extensions
15.6.1. Operations in Interfaces must be public
15.6.2. Interfaces may only have operations
15.6.3. Remove Reference to Specific Subclass
15.7. State Machines
15.7.1. Reduce Transitions on <state>
15.7.2. Reduce States in machine <machine>
15.7.3. Add Transitions to <state>
15.7.4. Add Incoming Transitions to <model element>
15.7.5. Add Outgoing Transitions from <model element>
15.7.6. Remove Extra Initial States
15.7.7. Place an Initial State
15.7.8. Add Trigger or Guard to Transition
15.7.9. Change Join Transitions
15.7.10. Change Fork Transitions
15.7.11. Add Choice/Junction Transitions
15.7.12. Add Guard to Transition
15.7.13. Clean Up Diagram
15.7.14. Make Edge More Visible
15.7.15. Composite Association End with Multiplicity > 1
15.8. Design Patterns
15.8.1. Consider using Singleton Pattern for <class>
15.8.2. Singleton Stereotype Violated in <class>
15.8.3. Nodes normally have no enclosers
15.8.4. NodeInstances normally have no enclosers
15.8.5. Components normally are inside nodes
15.8.6. ComponentInstances normally are inside nodes
15.8.7. Classes normally are inside components
15.8.8. Interfaces normally are inside components
15.8.9. Objects normally are inside components
15.8.10. LinkEnds have not the same locations
15.8.11. Set classifier (Deployment Diagram)
15.8.12. Missing return-actions
15.8.13. Missing call(send)-action
15.8.14. No Stimuli on these links
15.8.15. Set Classifier (Sequence Diagram)
15.8.16. Wrong position of these stimuli
15.9. Relationships
15.9.1. Circular Association
15.9.2. Make <association> Navigable
15.9.3. Remove Navigation from Interface via <association>
15.9.4. Add Associations to <model element>
15.9.5. Remove Reference to Specific Subclass
15.9.6. Reduce Associations on <model element>
15.9.7. Make Edge More Visible
15.10. Instantiation
15.11. Modularity
15.11.1. Classifier not in Namespace of its Association
15.11.2. Add Elements to Package <package>
15.12. Expected Usage
15.12.1. Clean Up Diagram
15.13. Methods
15.13.1. Change Names or Signatures in <model element>
15.13.2. Class Must be Abstract
15.13.3. Add Operations to <class>
15.13.4. Reduce Operations on <model element>
15.14. Code Generation
15.14.1. Change Multiple Inheritance to interfaces
15.15. Stereotypes
15.16. Inheritance
15.16.1. Revise Attribute Names to Avoid Conflict
15.16.2. Remove <class>'s Circular Inheritance
15.16.3. Class Must be Abstract
15.16.4. Remove final keyword or remove subclasses
15.16.5. Illegal Generalization
15.16.6. Remove Unneeded Realizes from <class>
15.16.7. Define Concrete (Sub)Class
15.16.8. Define Class to Implement <interface>
15.16.9. Change Multiple Inheritance to interfaces
15.16.10. Make Edge More Visible
15.17. Containment
15.17.1. Remove Circular Composition
15.17.2. Duplicate Parameter Name
15.17.3. Two Aggregate Ends (Roles) in Binary Association
15.17.4. Aggregate End (Role) in 3-way (or More) Association
15.17.5. Wrap DataType
3. Model Reference
16. Top Level Model Element Reference
16.1. Introduction
16.2. The Model
16.2.1. Model Details Tabs
16.2.2. Model Property Toolbar
16.2.3. Property Fields For The Model
16.3. Datatype
16.3.1. Datatype Details Tabs
16.3.2. Datatype Property Toolbar
16.3.3. Property Fields For Datatype
16.4. Enumeration
16.4.1. Enumeration Details Tabs
16.4.2. Enumeration Property Toolbar
16.4.3. Property Fields For Enumeration
16.5. Enumeration Literal
16.6. Stereotype
16.6.1. Stereotype Details Tabs
16.6.2. Stereotype Property Toolbar
16.6.3. Property Fields For Stereotype
16.7. Tag Definition
16.8. Diagram
16.8.1. Diagram Details Tabs
16.8.2. Diagram Property Toolbar
16.8.3. Property Fields For Diagram
17. Use Case Diagram Model Element Reference
17.1. Introduction
17.1.1. ArgoUML Limitations Concerning Use Case Diagrams
17.2. Actor
17.2.1. Actor Details Tabs
17.2.2. Actor Property Toolbar
17.2.3. Property Fields For Actor
17.3. Use Case
17.3.1. Use Case Details Tabs
17.3.2. Use Case Property Toolbar
17.3.3. Property Fields For Use Case
17.4. Extension Point
17.4.1. Extension Point Details Tabs
17.4.2. Extension Point Property Toolbar
17.4.3. Property Fields For Extension Point
17.5. Association
17.6. Association End
17.7. Dependency
17.8. Generalization
17.8.1. Generalization Details Tabs
17.8.2. Generalization Property Toolbar
17.8.3. Property Fields For Generalization
17.9. Extend
17.9.1. Extend Details Tabs
17.9.2. Extend Property Toolbar
17.9.3. Property Fields For Extend
17.10. Include
17.10.1. Include Details Tabs
17.10.2. Include Property Toolbar
17.10.3. Property Fields For Include
18. Class Diagram Model Element Reference
18.1. Introduction
18.1.1. Limitations Concerning Class Diagrams in ArgoUML
18.2. Package
18.2.1. Package Details Tabs
18.2.2. Package Property Toolbar
18.2.3. Property Fields For Package
18.3. Datatype
18.4. Enumeration
18.5. Stereotype
18.6. Class
18.6.1. Class Details Tabs
18.6.2. Class Property Toolbar
18.6.3. Property Fields For Class
18.7. Attribute
18.7.1. Attribute Details Tabs
18.7.2. Attribute Property Toolbar
18.7.3. Property Fields For Attribute
18.8. Operation
18.8.1. Operation Details Tabs
18.8.2. Operation Property Toolbar
18.8.3. Property Fields For Operation
18.9. Parameter
18.9.1. Parameter Details Tabs
18.9.2. Parameter Property Toolbar
18.9.3. Property Fields For Parameter
18.10. Signal
18.10.1. Signal Details Tabs
18.10.2. Signal Property Toolbar
18.10.3. Property Fields For Signal
18.11. Reception (to be written)
18.12. Association
18.12.1. Three-way and Greater Associations and Association Classes
18.12.2. Association Details Tabs
18.12.3. Association Property Toolbar
18.12.4. Property Fields For Association
18.13. Association End
18.13.1. Association End Details Tabs
18.13.2. Association End Property Toolbar
18.13.3. Property Fields For Association End
18.14. Dependency
18.14.1. Dependency Details Tabs
18.14.2. Dependency Property Toolbar
18.14.3. Property Fields For Dependency
18.15. Generalization
18.16. Interface
18.16.1. Interface Details Tabs
18.16.2. Interface Property Toolbar
18.16.3. Property Fields For Interface
18.17. Abstraction
18.17.1. Abstraction Details Tabs
18.17.2. Abstraction Property Toolbar
18.17.3. Property Fields For Abstraction
19. Sequence Diagram Model Element Reference
19.1. Introduction
19.1.1. Limitations Concerning Sequence Diagrams in ArgoUML
19.2. Object
19.2.1. Object Details Tabs
19.2.2. Object Property Toolbar
19.2.3. Property Fields For Object
19.3. Stimulus
19.3.1. Stimulus Details Tabs
19.3.2. Stimulus Property Toolbar
19.3.3. Property Fields For Stimulus
19.4. Stimulus Call
19.5. Stimulus Create
19.6. Stimulus Destroy
19.7. Stimulus Send
19.8. Stimulus Return
19.9. Link
19.9.1. Link Details Tabs
19.9.2. Link Property Toolbar
19.9.3. Property Fields For Link
20. Statechart Diagram Model Element Reference
20.1. Introduction
20.1.1. Limitations Concerning Statechart Diagrams in ArgoUML
20.2. State
20.2.1. State Details Tabs
20.2.2. State Property Toolbar
20.2.3. Property Fields For State
20.3. Action
20.3.1. Action Details Tabs
20.3.2. Action Property Toolbar
20.3.3. Property Fields For Action
20.4. Composite State
20.5. Concurrent Region
20.6. Submachine State
20.7. Stub State
20.8. Transition
20.8.1. Transition Details Tabs
20.8.2. Transition Property Toolbar
20.8.3. Property Fields For Transition
20.9. Event
20.9.1. Event Details Tabs
20.9.2. Event Property Toolbar
20.9.3. Property Fields For Event
20.10. Guard
20.10.1. Guard Details Tabs
20.10.2. Guard Property Toolbar
20.10.3. Property Fields For Guard
20.11. Pseudostate
20.11.1. Pseudostate Details Tabs
20.11.2. Pseudostate Property Toolbar
20.11.3. Property Fields For Pseudostate
20.12. Initial State
20.13. Final State
20.13.1. Final State Details Tabs
20.13.2. Final State Property Toolbar
20.13.3. Property Fields For Final State
20.14. Junction
20.15. Choice
20.16. Fork
20.17. Join
20.18. Shallow History
20.19. Deep History
20.20. Synch State
20.20.1. Synch State Details Tabs
20.20.2. Synch State Property Toolbar
20.20.3. Property Fields For Synch State
21. Collaboration Diagram Model Element Reference
21.1. Introduction
21.1.1. Limitations Concerning Collaboration Diagrams in ArgoUML
21.2. Classifier Role
21.2.1. Classifier Role Details Tabs
21.2.2. Classifier Role Property Toolbar
21.2.3. Property Fields For Classifier Role
21.3. Association Role
21.3.1. Association Role Details Tabs
21.3.2. Association Role Property Toolbar
21.3.3. Property Fields For Association Role
21.4. Association End Role
21.4.1. Association End Role Details Tabs
21.4.2. Association End Role Property Toolbar
21.4.3. Property Fields For Association End Role
21.5. Message
21.5.1. Message Details Tabs
21.5.2. Message Property Toolbar
21.5.3. Property Fields For Message
22. Activity Diagram Model Element Reference
22.1. Introduction
22.1.1. Limitations Concerning Activity Diagrams in ArgoUML
22.2. Action State
22.2.1. Action State Details Tabs
22.2.2. Action State Property ToolBar
22.2.3. Property fields for action state
22.3. Action
22.4. Transition
22.5. Guard
22.6. Initial State
22.7. Final State
22.8. Junction (Decision)
22.9. Fork
22.10. Join
22.11. ObjectFlowState
23. Deployment Diagram Model Element Reference
23.1. Introduction
23.1.1. Limitations Concerning Deployment Diagrams in ArgoUML
23.2. Node
23.2.1. Node Details Tabs
23.2.2. Node Property Toolbar
23.2.3. Property Fields For Node
23.3. Node Instance
23.3.1. Node Instance Details Tabs
23.3.2. Node Instance Property Toolbar
23.3.3. Property Fields For Node Instance
23.4. Component
23.4.1. Component Details Tabs
23.4.2. Component Property Toolbar
23.4.3. Property Fields For Component
23.5. Component Instance
23.5.1. Component Instance Details Tabs
23.5.2. Component Instance Property Toolbar
23.5.3. Property Fields For Component Instance
23.6. Dependency
23.7. Class
23.8. Interface
23.9. Association
23.10. Object
23.11. Link
24. Built In DataTypes, Classes, Interfaces and Stereotypes
24.1. Introduction
24.1.1. Package Structure
24.1.2. Exposure in the model
24.2. Built In Datatypes
24.3. Built In Classes
24.3.1. Built In Classes From java.lang
24.3.2. Built In Classes From java.math
24.3.3. Built In Classes From java.net
24.3.4. Built In Classes From java.util
24.4. Built In Interfaces
24.5. Built In Stereotypes
Glossary
A. Supplementary Material for the Case Study
A.1. Introduction
A.2. Requirements Documents (To be written)
A.2.1. Vision Document (To be written)
A.2.2. Use Case Specifications (To be written)
A.2.3. Supplementary Requirements Specification (To be written)
B. UML resources
B.1. The UML specs (To be written)
B.2. UML related papers (To be written)
B.2.1. UML action specifications (To be written)
B.3. UML related websites (To be written)
C. UML Conforming CASE Tools
C.1. Other Open Source Projects (To be written)
C.2. Commercial Tools (To be written)
D. The C++ Module
D.1. Modeling for C++
D.1.1. Class tagged values
D.1.2. Attribute tagged values
D.1.3. Parameters
D.1.4. Generalization
D.1.5. Realization
D.1.6. Preserved sections
E. Limits and Shortcomings
E.1. Diagram Canvas Size
E.2. Missing functions
F. Open Publication License
F.1. Requirements On Both Unmodified And Modified Versions
F.2. Copyright
F.3. Scope Of License
F.4. Requirements On Modified Works
F.5. Good-Practice Recommendations
F.6. License Options
F.7. Open Publication Policy Appendix:
G. The CRC Card Methodology
G.1. The Card
G.2. The Group
G.3. The Session
G.4. The Process
Index

Preface

Software design is a cognitively challenging task. Designers must manually enter designs, but the primary difficulty is decision-making rather than data-entry. If designers improved their decision-making capabilities, it would result in better designs.

Current CASE tools provide automation and graphical user interfaces that reduce the manual work of entering a design and transforming a design into code. They aid designers in decision-making mainly by providing visualization of design diagrams and simple syntactic checks. Also many CASE tools provide substantial benefits in the area of version control and concurrent design mechanisms. One area of design support that has been not been well supported is analysis of design decisions.

Current CASE tools are usable in that they provide a GUI that allows designers to access all the features provided by the tool. And they support the design process in that they allow the designer to enter diagrams in the style of popular design methodologies. But they typically do not provide process support to guide the designer through the design task. Instead, designers typically start with a blank page and must remember to cover every aspect of the design.

ArgoUML is a domain-oriented design environment that provides cognitive support of object-oriented design. ArgoUML provides some of the same automation features of a commercial CASE tool, but it focuses on features that support the cognitive needs of designers. These cognitive needs are described by three cognitive theories:

  1. reflection-in-action;

  2. opportunistic design; and

  3. comprehension and problem solving.

ArgoUML is based directly on the UML 1.4 specification. The core model repository is an implementation of the Java Metadata Interface (JMI) which directly supports MOF and uses the machine readable version of the UML 1.4 specification provided by the OMG.

Furthermore, it is our goal to provide comprehensive support for OCL (the Object Constraint Language) and XMI (the XML Model Interchange format).

ArgoUML was originally developed by a small group of people as a research project. ArgoUML has many features that make it special, but it does not implement all the features that commercial CASE tools provide.

The current version (DISCONTINUED-0.26) of ArgoUML implements all the diagram types of the UML 1.4 standard (versions of ArgoUML prior to 0.20 implemented the UML 1.3 standard). It is written in Java and runs on every computer which provides a Java platform version 5 or newer. It uses the open file formats XMI (XML Metadata Interchange format) (for model information) and PGML (Precision Graphics Markup Language) (for graph information) for storage. When ArgoUML implements UML 2.0, PGML will be replaced by the UML Diagram Interchange specification.

This manual is the cumulative work of several people and has been evolving over several years. Connected to the release 0.10 of ArgoUML, Jeremy Bennett, wrote a lot of the new material that was added to the earlier versions by Alejandro Ramirez, Philippe Vanpeperstraete and Andreas Rueckert. He also added things from some of the other documents namely the developers cookbook by Markus Klink and Linus Tolke, the Quick Guide by Kunle Odutola, and the FAQ by Dennis Daniels. Connected to the release 0.14 changes were made by Linus Tolke, and by Michiel van der Wulp. These changes were mostly to adopt the manual to the new functions and appearance of ArgoUML version 0.14, and introduction of the index. The users and developers that have contributed by providing valuable input, such as review comments or observations while reading and using this manual are too many to name.

ArgoUML is available for free and can be used in commercial settings. For terms of use, see the license agreement presented when you download ArgoUML. We are providing the source code for ArgoUML for you to review, customize to your needs, and improve. Over time, we hope that ArgoUML will evolve into a powerful and useful tool for everyone to use.

This User Manual is aimed at the working designer, who wishes to make use of ArgoUML. The manual is presently written assuming familiarity with UML, but eventually it will support those new to UML.

The manual is written in DocBook/XML and available as both HTML and PDF.

The ArgoUML project welcomes those who want to get more involved. Look at the project website to find out more.

Tell us what you think about this User Manual! Your comments will help us improve things. See Section 1.3.3, “User Feedback” .

Chapter 1. Introduction

1.1. Origins and Overview of ArgoUML

1.1.1. Object Oriented Analysis and Design

Over the past decade, Object Oriented Analysis and Design (OOA&D) has become the dominant software development paradigm. With it has come a major shift in the thought processes of all involved in the software development life cycle.

Programming language support for objects began with Simula 67, but it was the emergence in the 1980's of hybrid languages, such as C++, Ada and Object Pascal that allowed OOA&D to take off. These languages provided support for both OO and procedural programming. Object Oriented programming became mainstream.

An OO system is designed and implemented as a simulation of the real world using software artifacts. This premise is as powerful as it is simple. By using an OO approach to design a system can be designed and tested (or more correctly simulated) without having to actually build the system first.

It is the development during the 1990's of tools to support Object Oriented analysis and design that moved this approach into the mainstream. When coupled with the ability to design systems at a very high level, a tool based OOA&D approach has enabled the implementation of more complex systems than previously possible.

The final driver that has propelled OOA&D has been its suitability for modeling graphical user interfaces. The popularity of object based and object oriented graphical languages such as Visual Basic and Java reflect the effectiveness of this approach.

1.1.2. The Development of ArgoUML

During the 1980's a number of OOA&D process methodologies and notations were developed by different research teams. It became clear there were many common themes and, during the 1990's, a unified approach for OOA&D notation was developed under the auspices of the Object Management Group. This standard became known as the Unified Modeling Language (UML), and is now the standard language for communicating OO concepts.

ArgoUML was conceived as a tool and environment for use in the analysis and design of object-oriented software systems. In this sense it is similar to many of the commercial CASE tools that are sold as tools for modeling software systems. ArgoUML has a number of very important distinctions from many of these tools.

  1. It is free.

  2. ArgoUML draws on research in cognitive psychology to provide novel features that increase productivity by supporting the cognitive needs of object-oriented software designers and architects.

  3. ArgoUML supports open standards extensively - UML, XMI, SVG, OCL and others.

  4. ArgoUML is a 100% pure Java application. This allows ArgoUML to run on all platforms for which a reliable port of the Java platform is available.

  5. ArgoUML is an open source project. The availability of the source ensures that a new generation of software designers and researchers now have a proven framework from which they can drive the development and evolution of CASE tool technologies.

UML is the most prevalent OO modeling language and Java is one of the most productive OO development platforms. Jason Robbins and the rest of his research team at the University of California, Irvine leveraged these benefits in creating ArgoUML. The result is a solid development tool and environment for OO systems design. Further, it provides a test bed for the evolution of object oriented CASE tools development and research.

A first release of ArgoUML was available in 1998 and more than 100,000 downloads by mid-2001 show the impact that this project has made, being popular in educational and commercial fields.

1.1.3. Finding Out More About the ArgoUML Project

1.1.3.1. How ArgoUML is Developed

Jason Elliot Robbins founded the Argo Project and provided early project leadership. While Jason remains active in the project, he has handed off project leadership. The project continues to move forward strongly. There are more than 300 members on the developer mailing list (see http://argouml.tigris.org/servlets/ProjectMailingListList), with a couple of dozen of those forming the core development group.

The developer mailing list is the place where all the discussion on the latest tasks takes place, and developers discuss the directions the project should take. Although controversial at times, these discussions are always kept nice and friendly (no flame-wars and such), so newbies should not hesitate and participate in them. You'll always get a warm welcome there.

If you want to learn how the project is run and how to contribute to it, go the the ArgoUML Web Site Developer Zone and read through the documentation there. The Developers' Cookbook was written specifically for this purpose.

1.1.3.2. More on Infrastructure

Besides the developer mailing list, there's also a mailing for users (see The ArgoUML Mailing List List ), where we can discuss problems from a user perspective. Developers also read this list, so highly qualified help will generally be provided.

Before posting to this list, you should take a look at the user FAQ maintained by Ewan R. Grantham.

More information on ArgoUML and other UML related topics is also available on the ArgoUML website, maintained by Linus Tolke.

1.2. Scope of This User Manual

1.2.1. Target Audience

The current release of this document is aimed at experienced users of UML in OOA&D (perhaps with other tools) who wish to transfer to ArgoUML.

Future releases will support designers who know OOA&D, and wish to adopt UML notation within their development process.

A long term goal is to support i) those who are learning design and wish to start with an OOA&D process that uses UML notation, and ii) people interested in modularized code design with a GUI.

1.2.2. Scope

The intention is that this document will provide a comprehensive guide, enabling designers to use ArgoUML to its full extent. It is in two parts.

  • A tutorial manual, showing how to work with ArgoUML

  • A complete reference manual, recording everything you can do with ArgoUML.

Version 0.22 of the document achieved the second of these.

In this guide there are some things you will not find, because they are covered elsewhere.

  • Descriptions of how ArgoUML works on the inside.

  • How to improve ArgoUML with new features and functions.

  • A trouble shooting guide.

  • A summary quick reference to using ArgoUML.

These are covered in the Developers Cookbook, the FAQ, and the Quick Guide.

1.3. Overview of the User Manual

1.3.1. Tutorial Manual Structure

Chapter 2, Introduction (being written) provides an overview of UML based OOA&D, including a guide to getting ArgoUML up and running.

Chapter 4, Requirements Capture through Chapter 7, Code Generation, Reverse Engineering, and Round Trip Engineering then step through each part of the design process from initial requirements capture through to final project build and deployment.

As each UML concept is encountered, its use is explained. Its use within ArgoUML is then described. Finally a case study is used to give examples of the concepts in use.

1.3.2. Reference Manual Structure

Chapter 8, Introduction is an overview of the user interface and provides a summary of the support for the various UML diagram types in ArgoUML. Chapter 10, The Menu bar and Chapter 11, The Explorer describe the menu bar, and each of the sub-windows of the user interface, known as Panes.

Chapter 15, The Critics gives details of all the cognitive critics within the system. Eventually ArgoUML will link directly to this manual when giving advice on critics.

Chapter 16, Top Level Model Element Reference is an overview of the model elements (i.e. the UML entities that can be placed on diagrams) within ArgoUML. The following chapters ( Chapter 17, Use Case Diagram Model Element Reference through Chapter 24, Built In DataTypes, Classes, Interfaces and Stereotypes) describe, the model elements that can be created through each ArgoUML diagram, and their properties, as well as some standard model elements provided with the system.

A complete Glossary is provided. Appendix A, Supplementary Material for the Case Study provides material to supplement the case study used throughout the document. Appendix B, UML resources and Appendix C, UML Conforming CASE Tools identify background information on UML and UML CASE tools. Appendix D, The C++ Module explains the use of the C++ module. Appendix F, Open Publication License is a copy of the GNU Free Documentation License.

1.3.3. User Feedback

Please tell us what you think about this User Manual. Your comments will help us make improvements. Email your thoughts to the ArgoUML Users Mailing List. In case you would like to add to the missing chapters you should contact the ArgoUML Developer Mailing List to check whether anyone else is working on this part. You can subscribe to either of the mailing lists via the ArgoUML web site.

1.4. Assumptions

This release of the manual assumes the reader is very familiar with UML already. This is reflected in the sparseness of the description of UML concepts in the tutorial.

The case study is described, but not yet fully realized throughout the tutorial. This will be achieved in future releases of the manual.

Part 1. Tutorial

Chapter 2. Introduction (being written)

This tutorial will be taking you through a tour of the use of ArgoUML to model a system.

First you will become familiar with the feel of the product and then we will go through an analysis and development process for a test case. Not every nook and cranny of the product will be demonstrated. That degree of detail is given in the reference materials to be found in subsequent parts of this document.

The state of the model at the end of key sections will be available in .zargo files. These are available so that you can play with various aspects not specifically covered in this tutorial and then restore yourself back to the proper state of the model in your work area. These .zargo files will be identified at the end of the sections whose work they represent.

An ATM (automated teller machine) project has been chosen as a case study to demonstrate the various aspects of modeling that ArgoUML offers. In subsequent sections we are going to develop the ATM example into a complete description in UML. The tutorial, however, will only walk you through part of it.

At this point you should create a directory to contain your project. Name the directory anything you feel is consistent with the rest of your file system. You should name the contents and any subdirectories as directed for reasons that will become apparent.

The case study will be an ATM system. Your company is FlyByNight Industries. You are going to play two roles. That of the Project Manager and that of the Designer Analyst.

We are not going to build a physical ATM, of course. The product that we will build as a case study will be an ATM simulator to be used for testing the design of a physical ATM.

How your company arranges its work into projects is usually determined as much by politics as anything else and is, therefore, out of the scope of this document. We will go into how you structure the project itself once one has been defined.

Chapter 3. UML Based OOA&D

In this chapter, we look at how UML as a notation is used within OOA&D.

3.1. Background to UML

Object orientation as a concept has been around since the 1960's, and as a design concept since 1972. However it was in the 1980's that it started to develop as a credible alternative to a functional approach in analysis and design. We can identify a number of drivers.

  1. The emergence of mainstream OO programming languages like SmallTalk and particularly C++. C++ was a pragmatic OO language derived from C, widely used because of its association with Unix.

  2. The development of powerful workstations, and with them the emergence into the mainstream of windowing operating user environments. Graphical User Interfaces (GUI) have an inherent object structure.

  3. A number of very public major project failures, suggesting that current approaches were not satisfactory.

A number of researchers proposed OOA&D processes, and with them notations. Those that achieved some success include Coad-Yourdon, Booch, Rumbaugh OMT, OOSE/Jacobson, Shlaer-Mellor, ROOM (for real-time design) and the hybrid Jackson Structured Development.

During the early 1990's it became clear that these approaches had many good ideas, often very similar. A major stumbling block was the diversity of notation, meaning engineers tended to be familiar with one OOA&D methodology, rather than the approach in general.

UML was conceived as a common notation, that would be in the interests of all involved. The original standard was driven by Rational Software ( www.rational.com, in which three of the key researchers in the field (Booch, Jacobson and Rumbaugh were involved). They produced documents describing UML v0.9 and v0.91 during 1996. The effort was taken industry wide through the Object Management Group (OMG), already well known for the CORBA standard. A first proposal, 1.0 was published in early 1997, with an improved version 1.1 approved that autumn.

ArgoUML is based on UML v1.4, which was adopted by OMG in September 2001. The current official version, supported by ArgoUML, is UML v1.4.2 dated July 2004, adopted as ISO/IEC 19501. The latest UML version is UML v2.1.2, from November 2007.

3.2. UML Based Processes for OOA&D

It is important to understand that UML is a notation for OOA&D. It does not prescribe any particular process. Whatever process is adopted, it must take the system being constructed through a number of phases.

  1. Requirements Capture. This is where we identify the requirements for the system, using the language of the problem domain. In other words we describe the problem in the “customer's” terms.

  2. Analysis. We take the requirements and start to recast them in the language of a putative solution—the solution domain. At this stage, although thinking in terms of a solution, we ensure we keep things at a high level, away from concrete details of a specific solution—what is known as abstraction.

  3. Design. We take the specification from the Analysis phase and construct the solution in full detail. We are moving from abstraction of the problem to its realization in concrete terms.

  4. Build Phase. We take the actual design and write it in a real programming language. This includes not just the programming, but the testing that the program meets the requirements (verification), testing that the program actually solves the customer's problem (validation) and writing all user documentation.

3.2.1. Types of Process

In this section we look at the two main types of process in use for software engineering. There are others, but they are less widely used.

In recent years there has also been a move to reduce the effort required in developing software. This has led to the development of a number of lightweight variants of processes (often known as agile computing or extreme programming) that are suited to small teams of engineers.

3.2.1.1. The Waterfall Process

In this process, each stage of the process—requirements, analysis, design and build (code and test) is completed before the next one starts. This is illustrated in Figure 3.1, “The Waterfall Process”.

Figure 3.1. The Waterfall Process

The Waterfall Process

This is a very satisfactory process where requirements are well designed and not expected to change, for example automating a well proven manual system.

The weaknesses of this approach show with less well defined problems. Invariably some of the uncertainties in the requirements will not be clarified until well into the analysis and design, or even code phases, requiring backtracking to redo work.

The worst aspect of this, is that working code does not become available until near the end of the project, and very often it is only at this stage that problems with the original requirements (for example with the user interface) become apparent.

This is exacerbated, by each successive stage requiring more effort, than the previous, so that the costs of late problem discovery are hugely expensive. This is illustrated by the pyramid in Figure 3.2, “Effort Involved in the Steps of the Waterfall Process”.

Figure 3.2. Effort Involved in the Steps of the Waterfall Process

Effort Involved in the Steps of the Waterfall Process

The waterfall process is still probably the dominant design process. However because of its limitations it is increasingly replaced by iterative processes, particularly for projects where the requirements are not well defined.

3.2.1.2. Iterative Development Processes

In recent years a new approach has been used, which aims to get at least part of the code up and running as quickly as possible, to bring discovery of problems forward in the development cycle.

These processes use a series of “mini-waterfalls”, defining a few requirements (the most important) first, taking them through analysis, design and build to get an early version of the product, with limited functionality, related to the most important requirements. Feedback from this can then be used to refine the requirements, spot problems etc before more work is done.

The process is then repeated for further requirements to construct a product with a step up in functionality. Again further feedback can be applied to the requirements.

The process is repeated, until eventually all requirements have been implemented and the product is complete. It is this iteration that gives these processes their name. Figure 3.3, “Effort Involved in the Steps of an Iterative Process” shows how this process compares to the pyramid structure of the Waterfall Process.

Figure 3.3. Effort Involved in the Steps of an Iterative Process

Effort Involved in the Steps of an Iterative Process

The growth in popularity of iterative processes is closely tied to the growth of OOA&D. It is the clean encapsulation of objects that allows a part of a system to be built with stubs for the remaining code clearly defined.

3.2.1.2.1. The Rational Unified Process

Perhaps the best known Iterative Process is the Rational Unified Process (RUP) from Rational Software ( www.rational.com).

This process recognizes that our pyramid view of even slices of the waterfall is not realistic. In practice the early iterations tend to be heavy on the requirements end of things (you need to define a reasonable amount even to get started), while the later iterations have more of their effort in the design and build areas.

RUP recognizes that iterations can be grouped into a number of phases according to their stage in the overall project. Each phase may have one or more iterations.

  • In the inception phase iterations tend to be heavy on the requirements/analysis end, while any build activity may be limited to emulation of the design within a CASE tool.

  • In the elaboration phase iterations tend to be completing the specification of the requirements, and starting to focus on the analysis and design, and possibly the first real built code.

  • In the construction phase iterations the requirements and analysis are more or less completed, and the effort is mostly in design and build.

  • Finally, in the deployment phase iterations are largely about build activity, and in particular the testing of the software.

[Note]Note

It should be clear that testing is an integral part of all phases. Even in the early phases the requirements and design should be tested, and this is facilitated by a good CASE tool.

We shall use an iterative process in this manual, that is loosely based on the RUP.

3.2.1.2.2. Iteration Size

A good rule of thumb is that an iteration should take between six and ten weeks for typical commercial projects. Any longer and you have probably bitten off too many requirements to do in one go. You also lose focus on getting the next working iteration completed. Any shorter and you probably haven't got enough requirements to make a significant advance. In this case the additional overhead associated with an interation will become a problem.

The total number of iterations depends on the size of project. Take the estimated time (working out/guessing that is a whole subject on its own), and divide it into 8 week chunks. Experience seems to suggest that the iterations will divide in the ratio of around 1:2:3:3 into RUP style inception, elaboration, construction and deployment phases. A project that has great vagueness in its specification (some advanced research projects for example) will tend to be heavier on the early phases.

When building a product to contract for a customer the end point is well defined. However when developing a new product for the market place, a strategy that can be used is to decide the product launch date, and hence the end date for completion of engineering (some time before). The time is then divided into iterations, and as much of the product as can be built in that time developed. The iterative process is very effective where time to market is more important than the exact functionality.

3.2.1.3. Recursive Development Processes

Very few software systems are conceived as monolithic artifacts. They are broken down into subsystems, modules etc.

Software processes are the same, with early parts of the process defining a top level structure, and the process reapplying to parts of the structure in turn to define ever greater details.

For example the initial design of a telephone system might identify objects to i) handle the phone lines, ii) process the calls, iii) manage the system and iv) bill the customer. The software process can then be reapplied to each of these four components to identify their design.

OOA&D with its clean boundaries to objects, naturally supports this approach. Such OOA&D with recursive development is sometimes abbreviated as OOA&D/RD.

Recursive development can be applied equally well to waterfall or iterative processes. It is not an alternative to them.

3.2.2. A Development Process for This Tutorial

For the purpose of this tutorial we will use a stripped down iterative process with recursive development, loosely akin to RUP. The case study will take us through the first iteration, although at the end of the tutorial section of the manual we will look at how the project will develop to completion.

Within that first iteration, we will tackle each of the requirements capture, analysis, design and build activities in turn. Not all parts of the process are based on UML or ArgoUML. We will look at what other material is needed outside.

Within this process we will have an opportunity to see the various UML diagrams in use. The full range of UML diagrams and how they are supported is described in the reference manual (see Section 16.8, “Diagram” ).

3.2.2.1. Requirements Capture

Our requirements capture will use the UML concept of Use Cases. Starting with a Vision Document we will see how Use Cases can be developed to describe all aspects of the system's behavior in the problem domain.

3.2.2.2. Analysis

During the analysis stage, we will introduce the UML concept of classes to allow us to build a top level view of the objects that will make up the solution—sometimes known as a concept diagram.

We will introduce the UML sequence diagram and statechart diagram to capture requirements for the overall behavior of the system.

Finally we will take the Use Cases from the requirements capture stage, and recast them in the language of the solution domain. This will illustrate the UML ideas of stereotyping and realization.

3.2.2.3. Design

We use the UML package diagram to organize the components of the project. We then revisit the class diagram, sequence diagram and statechart diagram, to show how they can be used recursively to design the complete solution.

During this part of the process, we need to develop our system architecture, to define how all the components will fit together and operate.

Although not strictly part of our process, we'll look at how the UML collaboration diagram can be used as an alternative to, or to complement the sequence diagram. Similarly we will look at the UML activity diagram as an alternative or complement to the statechart diagram.

Finally we shall use the UML deployment diagram to specify how the system will actually be realized.

3.2.2.4. Build

UML is not really concerned with code writing. However at this stage we will show how ArgoUML can be used for code generation.

We will also look at how the UML Use Case Diagram and Use Case Specification are invaluable tools for a test program.

3.3. Why ArgoUML is Different

In the introduction, we listed the four key things that make ArgoUML different: i) it makes use of ideas from cognitive psychology, ii) it is based on open standards; iii) it is 100% pure Java; and iv) it is an open source project.

3.3.1. Cognitive Psychology

3.3.1.1. Theory

ArgoUML is particularly inspired by three theories within cognitive psychology: i) reflection-in-action, ii) opportunistic design iii) and comprehension and problem solving.

  • Reflection-in-Action

    This theory observes that designers of complex systems do not conceive a design fully-formed. Instead, they must construct a partial design, evaluate, reflect on, and revise it, until they are ready to extend it further.

    As developers work hands-on with the design, their mental model of the problem situation improves, hence improving their design.

  • Opportunistic Design

    A theory within cognitive psychology suggesting that although designers plan and describe their work in an ordered, hierarchical fashion, in reality, they choose successive tasks based on the criteria of cognitive cost.

    Simply stated, designers do not follow even their own plans in order, but choose steps that are mentally least expensive among alternatives.

  • Comprehension and Problem Solving

    A design visualization theory within cognitive psychology. The theory notes that designers must bridge a gap between their mental model of the problem or situation and the formal model of a solution or system.

    This theory suggests that programmers will benefit from:

    1. Multiple representations such as program syntactic decomposition, state transitions, control flow, and data flow. These allow the programmer to better identify elements and relationships in the problem and solution and thus more readily create a mapping between their situation models and working system models.

    2. Familiar aspects of a situation model, which improve designers' abilities to formulate solutions.

3.3.1.2. Practical Application in ArgoUML

ArgoUML implements these theories using a number of techniques.

  1. The design of a user interface which allows the user to view the design from a number of different perspectives, and allows the user to achieve goals through a number of alternative routes.

  2. The the use of processes running in parallel with the design tool, evaluating the current design against models of how “best practice” design might work. These processes are known as design critics.

  3. The use of to-do lists to convey suggestions from the design critics to the user, as well as allowing the user to record areas for future action.

  4. The use of checklists, to guide the user through a complex process.

3.3.2. Open Standards

UML is itself an open standard. ArgoUML throughout has tried to use open standards for all its interfaces.

The key advantage of adherence to open standards is that it permits easy inter-working between applications, and the ability to move from one application to another as necessary.

3.3.2.1. XML Metadata Interchange (XMI)

XML Metadata Interchange (XMI) is the standard for saving the meta-data that make up a particular UML model. In principle this will allow you to take the model you have created in ArgoUML and import it into another tool.

This clearly has advantages in allowing UML to meet its goal of being a standard for communication between designers.

The reality is not quite this good. Prior to UML 2.0 the XMI file includes no information about the graphical representation of the models, so diagram layout is lost. ArgoUML gets round this by saving graphical information separate from the model (see Section 3.4.3.1, “Loading and Saving”).

3.3.2.2. Graphics Formats - EPS, GIF, PGML, PNG, PS, SVG

  • Encapsulated PostScript (EPS) file is a PostScript file which satisfies additional restrictions. These restrictions are intended to make it easier for software to embed an EPS file within another PostScript document.

  • Graphics Interchange Format (GIF) uses lossless compression, and preserves sharp edges well, which makes it well-suited for ArgoUML. The GIF format used to be a patent encumbered format, but all the patents have currently expired.

  • Precision Graphics Markup Language (PGML) is an XML-based language for representing vector graphics. It was a W3C draft, but was not adopted as a recommendation. PGML and VML, another XML-based vector graphics language, were later joined and improved upon to create SVG (see below).

  • Portable Network Graphics (PNG) is an ISO/IEC standard (15948:2004) and is also a W3C recommendation. PNG is a bitmap image format that employs lossless data compression. PNG was created to both improve upon and replace the GIF format with an image file format that does not require a patent license to use. PNG is officially pronounced "ping" but it is often just spelled out — probably to avoid confusion with the network tool ping. PNG is supported by the libpng reference library, a platform-independent library that contains C functions for handling PNG images.

  • PostScript (PS) is a page description language and programming language used primarily in the electronic and desktop publishing areas.

  • Scalable Vector Graphics (SVG) is an XML markup language for describing two-dimensional vector graphics, both static and animated, and either declarative or scripted. It is an open standard created by the World Wide Web Consortium. The use of SVG on the web is in its infancy. There is a great deal of inertia due to the long-time use of pure raster formats and other formats like Macromedia Flash or Java applets, but also browser support is still uneven, with native support in Opera, Safari and Firefox, but Internet Explorer requires a plugin. See PGML above.

3.3.2.3. Object Constraint Language (OCL)

Object Constraint Language (OCL) is a declarative language for describing rules that apply to UML models. It was developed at IBM and is now part of the UML standard. Initially OCL was only a formal specification language extension to UML. OCL may now be used with any Meta-Object Facility (MOF) compliant metamodel, including UML. The Object Constraint Language is a precise text language that provides constraint and object query expressions on any MOF model or metamodel that cannot otherwise be expressed by diagrammatic notation.

3.3.3. 100% Pure Java

Java was conceived as an interpreted language. It doesn't have a compiler to produce code for any particular target machine. It compiles code for its own target, the Java Virtual Machine (JVM).

Writing an interpreter for a JVM is much easier than writing a compiler, and such machines are now incorporated into almost every Web Browser. As a result most machines can run Java, with no further work.

(In case you wonder why all languages aren't like this, it is because interpreted languages tend to be slower than compiled languages. However with the high performance of modern PCs, the trade-off for portability is worthwhile for many applications. Furthermore modern multi-level caches can mean that interpreted languages, which produce denser code, may actually not be that much slower anyway.)

By choosing to write ArgoUML in pure Java, it is immediately made available to the maximum number of users with the minimum amount of effort.

3.3.4. Open Source

ArgoUML is an open source project. That means anyone can have a free copy of the source code, change it, use it for new purposes and so on. The only (major) obligation is that you pass your code on in the same way to others. The precise nature of what you can and can't do varies from project to project, but the principle is the same.

The advantage is that a small project like ArgoUML suddenly is open to a lot of additional help from those who can chip in their ideas for how the program might be improved. At any one time there may be 10, 15, 20 or more people making significant contributions to ArgoUML. To do that commercially would cost $1m+ per year.

Its not just a spirit of pure altruism. Contributing is a way of learning “hands-on” about leading edge software. Its a way of getting a lot of visibility (over 1,125,000 people had downloaded ArgoUML by the end of 2005). That's a lot of good experience on a résumé and a lot of potential employers seeing you!

And its great for the ego!

Open Source doesn't preclude making money. Gentleware www.gentleware.com sell a commercial version of ArgoUML, Poseidon. Their value proposition is not a piece of private code. Its the commercial polish and support that take risk out of using ArgoUML in a commercial development, allowing customers to take advantage of ArgoUML's leading edge technology.

3.4. ArgoUML Basics

The aim of this section is to get you started with ArgoUML. It takes you through obtaining the code and getting it running.

3.4.1. Getting Started

3.4.1.1. System Requirements

Since ArgoUML is written in 100% pure Java, it should run on any machine with Java installed. Java version 5 or later is needed. You may have this in place, but if not the latest version can be downloaded free from www.java.com. Note that you only need the Java Runtime Environment (JRE), there is no need to download the whole Java Development Kit (JDK).

ArgoUML needs a reasonable amount of computing resource. Any PC which is able to run an operating system with a graphical user interface will suffice. Download the code from Download section of the project website argouml.tigris.org. Choose the version that suits your needs as described in the section below.

3.4.1.2. Downloading Options

You have three options for obtaining ArgoUML.

  1. Run ArgoUML directly from the Web Site using Java Web Start. This is the easiest option.

  2. Download the Windows installer program. This is the right option if you are on Windows and intend using ArgoUML regularly.

  3. Download the binary executable code. Unless you are on Windows, this is the right option if you intend using ArgoUML regularly and is not that difficult.

  4. Download the source code using Subversion and build your own version. Choose this option if you want to look at the internal workings of ArgoUML, or want to join in as a developer. This option does require the whole JDK (see Section 3.4.1.1, “System Requirements”).

All four options are freely available through the project web site, argouml.tigris.org.

3.4.1.3. ArgoUML Using Java Web Start

There are two steps to this.

  1. Install Java Web Start on your machine. This is available from java.sun.com/products/javawebstart, or via the Java Web Start link on the ArgoUML home page.

  2. Click on the Launch latest stable release link on the ArgoUML home page.

Java Web Start will download ArgoUML, cache it and start it the first time, then on subsequent starts, check if ArgoUML is updated and only download any updated parts and then start it. The ArgoUML home page also provides details on starting ArgoUML from the Java Web Start console.

3.4.1.4. Using the Windows installer

If you choose to download and install using the Windows installer, you will have a choice of downloading the latest stable version of the code (which will be more reliable, but not have all the latest features), or the current version (which will be less reliable, but have more features). Choose according to your own situation.

The install wizard gives you the opportunity to install the latest "JRE" (Java Runtime Environment). There is no need to select this if you already have a Sun Java installed, version 5 or better.

3.4.1.5. Downloading the Binary Executable

If you choose to download the binary executable, you will have a choice of downloading the latest stable version of the code (which will be more reliable, but not have all the latest features), or the current version (which will be less reliable, but have more features). Choose according to your own situation.

ArgoUML comes in .zip or tar.gz flavors. Choose the former if you are a Microsoft Windows user, and the latter if you are running some flavor of Unix. There is also a Mac OS X version with .app.tgz extension. Unpacking is as follows.

  • On Windows. Unzip the .zip file with WinZip, or if your version of Windows supports it, copy the files out of the compressed folder and put them into a directory of your choosing.

  • On Unix. Use GNU tar to unzip and break out the files to a directory of your choice tar zxvf <file>.tar.gz. If you have an older version of tar, the z option may not be available, so use gunzip < file.tar.gz | tar xvf -.

You should have a directory containing a number of .jar files and a README.txt.

3.4.1.6. Problems Downloading and Installing

If you get completely stuck and you have no local assistance, try the web site, particularly the FAQ. If this still doesn't solve the problem, try the ArgoUML users' mailing list.

You can subscribe through the mailing lists section of the project web site argouml.tigris.org, or send an empty message to users@argouml.org with the subject line subscribe.

You can then send your problem to users@argouml.org and see how other users are able to help.

The users' mailing list is an excellent introduction to the live activity of the project. If you want to get further involved there are additional mailing lists that cover the development of the product and issues in the current and future releases.

3.4.1.7. Running ArgoUML

To run ArgoUML depends on whether you use Microsoft Windows or some flavor of Unix.

  • On Windows. If you used the installer, starting ArgoUML is a matter of clicking on its icon. In case you installed the binairy executable, read on: Start an MSDOS shell window by e.g. using Start/Run with “command” in the text window. In the window change to the directory holding your ArgoUML files and type java -jar argouml.jar. This method has the advantage that progress and debugging information is visible in the DOS window. Alternatively use the supplied batch file (.bat), or create one containing the above command, with a shortcut to it on the desktop. The batch file should end with a "pause" statement in case any debugging information is created during a run. On some systems, simply (double) clicking on the argouml.jar file works. On others doing so initiates a zip utility. Refer to your operating system instructions or help facility to determine how to configure this.

  • On Unix. Start a shell window and type java -jar argouml.jar

3.4.1.8. Problems Running ArgoUML

It's unusual to encounter problems if you have made a successful download. If you can't solve the problem. Try the users' mailing list (see Section 3.4.1.6, “Problems Downloading and Installing”).

  • Wrong JRE. The most common issue is not having a new enough Java Runtime Environment (it must be version 5 or later).

  • Wrong language. If the product came up in a language you can't read or just don't want, go to the second leftmost menu item in the menu bar at the top of the screen. Select the bottom most menu entry in the drop down. Figure 3.5, “Setting Language in the Appearance Pane” shows this in Russian. Then click on the second tab from the bottom in the column of tabs on the left. Drop down the list as shown in Figure 3.5, “Setting Language in the Appearance Pane” and select a language. Note that the languages are listed in themselves. The language shown as being selected is German in which the word for “German” is “Deutsch”. You will have to exit ArgoUML and restart it for the change to take effect. Use the X button at the upper right.

Figure 3.4. Finding the Settings Wizard

Finding the Settings Wizard

Figure 3.5. Setting Language in the Appearance Pane

Setting Language in the Appearance Pane

3.4.2. The ArgoUML User Interface

Before beginning the Case Study, you need to become familiar with the user interface. Start by reading the introduction to the User Interface Reference. See Chapter 8, Introduction. You should also read the Section 8.2, “General Mouse Behavior in ArgoUML”

As you go through this tutorial you will be told what to do, and when to do it but how to do it will often be left to the User Interface Reference. It is not necessary at this point to read all of the Reference, but you should leaf through enough of it to become familiar with how to find things in it. Every attempt will be made to direct you to the appropriate part of the Reference at those points in the tutorial where they apply.

Figure 3.6, “Initial ArgoUML window”, shows the main ArgoUML window as it appears when ArgoUML is first entered.

Figure 3.6. Initial ArgoUML window

Initial ArgoUML window

Grab the vertical divider bars and move them back and forth. Grab the horizontal divider bar and move it up and down. Play around a little with the little arrows at the left or top of the divider bars. See Section 8.3, “General Information About Panes”.

3.4.2.1. The Menu Bar and Toolbars

The menu bar and toolbars give access to all the main features of ArgoUML. As is conventional, menu options and toolbar options that are not available (disabled) are grayed out and menu items that invoke a dialog box are followed by an ellipsis (...). At this time you should read Chapter 9, The Toolbar and Chapter 10, The Menu bar.

File menu. The standard file menu entries present no surprises and we will just use them when needed without first showing how they work. A number of other actions are available that are peculiar to ArgoUML and we will go over them here.

  1. File=>Revert to Saved. This has the same effect as File=>Open Project selecting the current project.

  2. Export/Import. Select the project line at the top of the Explorer. It should say "untitledModel" unless you have changed it. Perform a File=>Export XMI action using "DeleteThis" for an output name in the file chooser dialog. Select the "Properties" tab in the "Details Pane" and change the name to something else, anything will do. Perform a File=>Import XMI action. It will ask you whether you want to save the changes you have just made. Click on "No" and then in the file choosed that comes up select the "DeleteThis.xmi" file that you just wrote out. Observe that the name of the model has reverted back to what you had saved.

  3. File=>Import Sources. We will cover this later. You can't test it now unless you have some Java source code of your own handy.

  4. File=>Export (All) Graphics. In the Explorer Pane select one of the diagrams. Either "Class Diagram 1" or "Use Case Diagram 1" (assuming you haven't renamed or deleted them). Perform a File=>Export Graphics action. When the file chooser opens it defaults to the last name you saved something to (even from a project no longer open). The file chooser allows you to select from a number of formats. Drop down the "Files of type" combobox and observe the choices. Cancel out as there is nothing useful to save. Perform a File=>Export All Graphics action. Notice that this time you can't specify a file name and you can't select a file format. ArgoUML will allow you only to select an output directory. It will then create a file for each of your diagrams using the diagram name for the file name and an extension determined by the default graphics format. Actually, although you can't select file names in the browser panel, you can type one into the edit box. But, if you do that, nothing at all will happen. You will learn more about the default graphics format when we get to the Edit menu.

  5. File=>Notation. We are going to get a little ahead of ourselves here and do a little class diagram work so you can see what notation is all about. In the Explorer Pane select or create a class diagram. See Section 10.6, “The Create Menu” and Section 12.4.3, “Drawing Tools”. Create a class in the diagram. Go to the Detail Pane and create an attribute in the class. See Section 18.6.2, “Class Property Toolbar”. In the Properties tab of the Detail Pane change the multiplicity to "1..*". Now go the the File Menu and select Notation. Go back and forth between UML and Java observing the changes in the display in the Edit Pane.

  6. File=>Project Properties. In the Project Properties dialog it is possible to configure the project specific settings. It contains the tabs for User, Profiles, Notations and Diagram Appearance. For instance, to change the Notation language in the Project Properties dialog, click on File=>Project Properties and select the Notations tab. Set the Notation Language to UML1.4. Turn on all of the options and click Apply. Then turn off all of the options and click Apply observing the changes in the diagram. Set the Default Shadow Width to 8 and click Apply. Notice that nothing happens. This is because you are not setting the Shadow Width, but its default. The next time you create a class in a diagram, this new shadow value will apply.

Edit menu. The edit menu does not look like what you are used to in other products. There are no "Cut", "Copy", or "Paste" actions. All of the choices are peculiar to ArgoUML so we are going to cover all of them in detail.

  1. Edit=>Select.

    • Select a class diagram in the Explorer Pane. If there is none there create one using Create=>New Class Diagram. Create three classes using the class tool described in the User Interface Reference section on Class Diagram Specific Tools. Double click on it and then click in the Edit Pane for the class diagram in three different locations.

    • Undo the current mode by clicking on the "Select" tool. See Section 12.4.1, “Layout Tools”. This allows you to do things in the Edit Pane other than creating classes.

    • Open everything in the Explorer Pane tree, so that all elements are visible. Now activate the first menu item: Edit=>Select=>All. Obviously, this selects all elements, but only those on the current diagram - elements only present on another diagram are not selected this way. This function is e.g. usefull if you have a big diagram, and need to shift everything to add some more elements at the left or top of the diagram.

    • Each of the classes in the diagram has three vertically spaced sections. Double click in the top section of each class and enter a name for the class then hit the enter key. Just name the classes "A", "B", and "C". Select class A, then class B, and then class C either in the Edit Pane or in the Explorer Pane.

    • Now do an Edit=>Select=>Navigate Back. Class B should now be selected. Do another Edit=>Select=>Navigate Back. Class A should now be selected. Finally, do an Edit=>Select=>Navigate Forward. Class B should be selected again.

    • Do an Edit=>Select=>Invert Selection. Classes A and C should now be selected. Do another Edit=>Select=>Invert Selection. Class B should be selected again.

    • Do an Edit=>Remove From Diagram. Notice that class B is gone from the diagram but still exists in the Explorer Pane.

    • Select class B in the Explorer Pane, right click on it and choose "Add to Diagram". Move the cursor back onto the Edit Pane and left click on some part of the diagram where you think it will fit. You should be pretty much right back where you were before you removed it from the diagram. Do an Edit=>Delete From Model. Now class B should be gone both from the diagram and from the Explorer Pane.

  2. Edit=>Configure Perspectives. Read Section 11.5, “Configuring Perspectives”. We aren't going to go into this at this point as it needs much larger projects to be displayed than we have available at this point.

  3. Figure 3.7. Initial ArgoUML window

    Initial ArgoUML window

    Edit=>Settings=>Preferences. Enter Help=>About ArgoUML. Look at the panel in the "splash" tab. This is known as the Splash Panel. Go to Edit=>Settings=>Preferences. Turn off the "Show Splash Panel" check button. Exit from ArgoUML and restart it. Note that the splash panel does not show during the load.

  4. Edit=>Settings=>Environment. Do File=>Export Graphics and observe the file extension that shows at the bottom of the file chooser dialog in the "Files of type" combobox. Go to the Edit=>Settings=>Environment editor and pick some other value for Default graphics format. Click "Apply" and then "OK". Go back to the File=>Export Graphics dialog and notice that the new format is now the default.

  5. Edit=>Settings=>User. Enter your name and email address.

  6. Edit=>Settings=>Appearance. Change the "Look and Feel:" to Metal." Note that the "Metal Theme:" editor becomes anabled. Change the theme to "Very Large Fonts." Click on "Apply" and then "OK." Notice that nothing has happened. Exit from ArgoUML and reopen it. The display should be markedly different. You can change it back or leave it that way as you prefer.

  7. Edit=>Settings=>Profiles. Look in the Explorer Pane under "Profile Configuration". The only folder by default is the UML 1.4 profile. Now go to Edit=>Settings=>Profiles and look at the field "Default Profiles". It only contains the same UML 1.4 profile. Add the Java profile to it, and press OK.

    If you now look at the Explorer Pane, nothing has changed, since you adapted the default setting, not the project setting. Press File=>New and check out the profiles in the Explorer Pane: it now shows both the UML 1.4 profile and the Java profile.

    Many examples in this manual presume that the Java profile is available, so you may best leave it enabled.

  8. Edit=>Settings=>Configure Shortcuts. (To be written).

  9. Edit=>Settings=>Notations. We played around with this earlier with the File=>Notation and File=>Project Properties menu items. Start another copy of ArgoUML resize each copy so they can be seen at the same time next to each other. On one of them set the Notation Language to UML (the actual choice will have a version number with it). On the other set the Notation Language to Java.

    On both of them do the following. Turn all of the check boxes on. Do a File=>New, create a class in a class diagram. Double click in the attributes section to create an attribute. Double click in the operation section to create a method. Observe the difference in the displays.

  10. Edit=>Settings=>Diagram Appearance. This settings makes it possible to change the font and font-size used in the diagrams. Hence this setting does not influence the font used in the UI of ArgoUML itself. The default font for ArgoUML is Dialog.

  11. Edit=>Settings=>Modules. This shows the currently loaded modules. We are not going to mess with it in this version of the tutorial.

View menu. This allows you to switch between diagrams, find model elements in the model, zoom in a diagram, adjust the grid, toggle page break display, and show an XML representation of the project. Do a File=>New to get back to a known point. Create an example of each diagram type not already in the Explorer Pane. Click on the (+) sign widgets in the Explorer Pane to expand the tree nodes. Select the class diagram and give it a name.

  1. View=>Goto Diagram brings up a Go To Diagram panel. Select the class diagram entry in this panel and click on the "Go to Selection" button. There should be 0 nodes and 0 edges in the description column. Click on the "Close" button. In the Details Pane (Properties tab) enter the name as "Blort". Create two classes in the class diagram and go back to View=>Goto Diagram. You should now see 2 nodes and 0 edges shown. Click on the "Close" button again and link the classes with one of the "line" items like association or generalization. Go back to View=>Goto Diagram and you should see 2 nodes and 1 edge(s). Click on the "Close" button again and create a third class. Run the mouse over the icons in the toolbar until you find the one with the tooltip "New Association Class." Click on this tool and then connect the new class to one of the others. Having clicked on the "New Association Class" tool move the mouse over the new class. Press and hold down button 1. Move the mouse over one of the other classes and release button 1. Go back to View=>Goto Diagram and you should see 3 nodes and 2 edge(s). Even though it is a class and has a two dimensional representation, it counts as an edge not a node. Select other entries in this panel and click on the "Go to Selection" button in the Go To Diagram panel. Observe the changes in the Explorer Panel.

  2. View=>Find. At this point you should have three normal classes and an association class in the Explorer Pane. Name them "AA", "AB", "B", and "C". Perform a View=>Find operation. Click on the "Find" button. Notice that an "* in *" tab is created below. This tab should show pretty much everything. In the "In Diagram" editor change the "*" to "B*" and click on the "Find Button" observing the contents of the new tab with "* in B*" as a tab label. You should see the three classes, the link (such as an association), and the association class. In the Element Type drop down box select "Interface" and click on the Find button. The new tab "* in B* Inte..." should have no entries in it as we have defined no interfaces. In the Element Type drop down box select "Class" and click on the Find button. The new tab "* in B* Class" should have one fewer entries in it than the "* in B*" tab. Switch back and forth between these two observing the difference. In various of these tabs select an item and click on the "Go To Selection" button observing the change in the selection shown in the diagram and in the Explorer Pane.

  3. View=>Zoom. As an exeption to a general rule the toolbar equivalent of View=>Zoom does not operate in the same way as the corresponding menu item. Highlight View=>Zoom. and a submenu will appear that contains "Zoom Out", "Zoom Reset" and "Zoom In". Click on these a few times observing the effect on the diagram then click on the Zoom tool bar icon. This is a magnifying glass next to a down arrow head. You should see a graduated slider bar tool. Grab the pointer in this tool and move it up and down observing the effect on the diagram.

  4. View=>Adjust Grid.

  5. View=>Adjust Snap.

  6. View=>Page Breaks.

  7. View=>XML Dump.

Create Diagram menu. This allows you to create any one of the seven UML diagram types (class, use case, state, activity, collaboration, deployment and sequence) supported by ArgoUML.

State and activity diagrams can only be created when a class or actor is selected, even though the relevant menu entries are not grayed out if this has not been done (nothing will happen under this circumstance).

Arrange menu. This allows you to align, distribute and reorder model elements on a diagram and set the layout strategy for the diagram.

Generation menu. This allows you to generate Java code for selected classes or all classes.

Critique menu. This allows you to toggle the auto-critique on and off, set the level of importance of design issues and design goals and browse the critics available.

Tools menu. This menu is permanently grayed out unless there is some tool available in your version of ArgoUML.

Help menu. This menu gives access to details of those who authored the system, and where additional help may be found.

File Toolbar. This toolbar contains some of the tools from the File menu.

Edit Toolbar. This toolbar contains some of the tools from the Edit menu.

View Toolbar. This toolbar contains some of the tools from the View menu.

Create Diagram Toolbar. This toolbar contains some of the tools from the Create Diagram menu.

3.4.2.2. The Explorer Pane

At this time you should take the time to read Chapter 11, The Explorer. The Explorer Pane is fundamental to almost everything that you do and we will be coming back to it again and again in what follows. In fact you will recall we have had to use it already.

There is an expand or contract control in front of the package symbol for “untitledModel” in the Explorer Pane and the package symbol for “Medium” in the To-Do Pane. Click on these controls and observe that these panes are tree widgets that behave pretty much as you would expect them to. The expand or contract control is either plus (+)/minus (-) sign or knob with a right or bottom pointer depending upon the look and feel that you have chosen for an appearance.

Select alternately Class Diagram 1 and Use Case Diagram 1 observing that the detail pane changes to track to the selected item in the Explorer. The detail pane is described in Chapter 12. It is not necessary to read Chapter 12 at this point, but it couldn't hurt.

3.4.2.3. The Editing Pane

At this point take some time to read Chapter 12, The Editing Pane.

As we go through the Editing pane changes will sometimes occur in the Details and the To-Do panes. Pay no attention to them for now. We will attend to them when we cover those panes.

Select "Class Diagram 1" in the Explorers Pane. The name is unimportant, if you have changed it, just select the new name. If you have deleted it, first perform a Create=>New Class Diagram action. Click on the "New Package" button in the Edit Pane tool bar. Click somewhere in the edit pane. In the Explorer notice that a package appears named (unnamed Package).

Double click on the "New Class" button in Edit Pane the tool bar. Click first within the package and once outside of it. Notice that within the Explorer, two classes appear in the tree both named (unnamed Class) one of them attached to the model node and the other attached to the (unnamed Package) node.

Click the Select button in the Edit Pane tool bar so you can do things in the Edit Pane without adding new Classes. In the Explorer select the class that is not subordinate to the package. This selects the corresponding class in the diagram. Grab this class and move it into the package. Notice that in the Explorer this class is now also subordinate to the package node.

In the diagram select the other class. Notice that in the Explorer, the selected node changes correspondingly. Grab this class and move it outside of the package and watch what happens in the Explorer.

3.4.2.4. The Details Pane

At this point take some time to read Chapter 13, The Details Pane.

[Note]Note
  • To-Do Item. Discuss differences with other tabs about locations of items selected. Hold particulars for discussion of To-Do Pane.

  • Properties,

  • Documentation,

  • Presentation,

  • Source,

  • Constraints,

  • Stereotype,

  • Tagged Values,

  • Checklist.

  • Remove "images/tutorial/detailsoverview.gif" from file system.

3.4.2.5. The To-Do Pane

At this point take some time to read Chapter 14, The To-Do Pane.

[Note]Note
  • Describe priorities.

  • Resolving items.

  • Relation to ToDo Item tab in details pane.

  • Remove "images/tutorial/todooverview.gif" from file system.

3.4.2.6. Drawing Diagrams

In general diagrams are drawn by using the edit pane toolbar to select the model element desired and clicking in the diagram at the position required.

Model elements that are already in the model, but not on a diagram, may be added to a diagram by selecting the model element in the explorer, using Add to Diagram from the drop down menu (button 2) over that model element, and then clicking button 1 at the desired location on the diagram.

As well as UML model elements, the Edit pane toolbar provides for general drawing objects (rectangles, circles, lines, polygons, curves, text) to provide supplementary information on diagrams.

3.4.2.6.1. Moving Diagram Elements

There are several ways to move diagram elements.

3.4.2.6.1.1. Using the Mouse Keys

Select the elements you want to move. By holding down the Ctrl key while selecting you can select several elements to move at the same time.

Now hit your arrow keys. Your elements move a little with every key stroke.

If you also hold down the Shift key, they move a bit faster.

3.4.2.6.1.2. Using the Edit Pane Toolbar

Click on the broom button on the toolbar. Move your mouse to the diagram pane, right click and hold. Now moving your mouse will align elements.

3.4.2.6.2. Arranging Elements

The menu item Arrange allows you to align or group elements.

3.4.2.7. Working with Projects

3.4.2.7.1. The Start-Up Window

Figure 3.6, “Initial ArgoUML window” shows the ArgoUML main window as it appears as right after start-up

The main window's client area, below the menu and toolbar, is subdivided into four panes. Starting at the leftmost top pane, and working around the clock, you can see the Explorer, showing a tree view of your UML model, the Editing Pane with its toolbar, two scroll bars and gray drawing area, the Details Pane with the ToDoItem tab selected, and the To-Do Pane with a tree view of the to do items, ranked in various ways selected via the drop down list at the top of the pane.

Each time ArgoUML is started up without a project file as an argument, a new blank project is created. This project contains a model called untitledModel. This model contains a blank Class Diagram, called class diagram 1, and a blank Use Case Diagram called use case diagram 1.

The model and both empty diagrams can be seen in the explorer, which is the main tool for you to navigate through your model.

Let's assume for a moment that this is the point where you want to start modeling a new purchasing system. You want to give the name “purchasingmodel” to your model, and you want to store it in a file called FirstProject.

3.4.2.7.2. Saving a Project - The File Menu

For now ArgoUML; saves diagrams using an earlier proposed standard, Precision Graphics Markup Language (PGML). However it has the option to export graphical data as SVG for those who can make use of it. When ArgoUML; supports UML 2.0, it will store diagrams using the UML 2.0 Diagram Interchange format.

First, let's save the model in it's current (empty and unnamed) state. On the menu bar, click on File, then on Save Project As... as shown in Figure 3.8, “Invoking Save Project As....

Figure 3.8. Invoking Save Project As...

Invoking Save Project As...

Please notice that the File menu contains the usual options for creating a new project, for opening an existing project, for saving a project under a new name, for printing the currently displayed diagram, for saving the currently displayed diagram as a file, and for program Exit.

Some of these menu commands can be invoked by pressing key combinations, as indicated on the drop-down menu. For instance, holding down the “Ctrl” key, and pressing “N”, will create a new project.

In the current version, ArgoUML can only contain one active project at a time. In addition, a project can only contain one UML model. Since an UML model can contain an unlimited number of elements and diagrams, this should not present any serious limitations, even for modeling quite large and complex systems.

3.4.2.7.3. The File Chooser Dialog

But let's go back to saving our project. After clicking on the Save Project As... menu command, we get the file chooser dialog to enter the file name we wish to use as shown in Figure 3.9, “File Chooser Dialog”.

Figure 3.9. File Chooser Dialog

File Chooser Dialog

This is a standard Java FileChooser. Let's go over it in some detail.

The main, outstanding feature, is the scrollable folders list in the center of the dialog. By using the scroll bar on the right, you can move up and down in the list of folders contained inside the currently selected folder. If it is scrollable or not depends on the amount of files and folders shown and also how they are shown. If everything fits the window is not scrollable as seen in the picture.

Double-clicking on one of the displayed folders navigates you into that folder, allowing you to quickly navigate down into the folders hierarchy on your hard disk.

Notice that only folder names, and no file names are displayed in the scrollable area. Indeed, the dialog is currently set up in order to show only ArgoUML project files with an extension of .zargo, as can be seen on the lower drop-down control labeled Files of Type:.

Also notice that the currently selected folder's name is displayed in the upper drop-down control labeled Look in:. A single click on a folder inside the scrollable area does select that folder on screen but does not select the folder for saving.

At the top of the dialog, above the scrollable folder chooser area, there are a few more folder navigation tools.

  • The Folder drop-down control. Clicking on the down-arrow displays a tree view of the folder hierarchy, allowing you to navigate quickly up the hierarchy, and at the same time to quickly determine where in the hierarchy we are currently positioned.

  • The Folder-Up icon. Clicking on this icon will bring us to the parent folder of the current folder.

  • The Home Folder icon. Clicking on this icon will bring us to our home directory.

  • The New Folder icon. Clicking on this icon will create a new folder called "New Folder" under the current folder. After the folder is created selecting it an clicking in the name allows us to select the name of our choice.

  • The Folders Presentation Icon.

OK, now we navigate to the directory where we want to save our ArgoUML project, fill in the File name: with an appropriate name, such as “FirstProject” and click on the Save button.

You have now an active project called FirstProject, connected to the file FirstProject.zargo.

3.4.3. Output

3.4.3.1. Loading and Saving

3.4.3.1.1. Saving XMI files in ArgoUML

ArgoUML saves the diagram information in a PGML file (with extension .pgml, the model information in an XMI file (with extension .xmi and information about the project in a file with extension .argo. See Section 3.4.3.2.2, “Precision Graphics Markup Language (PGML)” and Section 3.4.3.3, “XMI” for more about PGML and XMI respectively.

All of these are then zipped to a file with extension .zargo. You can easily extract the .xmi file from the .zargo file using any old generic ZIP application. Give it a try and look into the magic of Argo.

[Warning]Warning

Be aware that double clicking will launch a ZIP utility, if one is installed, and NOT Argo.

3.4.3.2. Graphics and Printing

3.4.3.2.1. The Graph Editing Framework (GEF)

GEF is the software package that is the foundation of the diagrams that appear in the Editing Pane. GEF was an integral part of ArgoUML but has been separated. Like ArgoUML it is an open source project available via Tigris.

3.4.3.2.2. Precision Graphics Markup Language (PGML)

PGML is the current storage format for diagram information used in ArgoUML. In the future, PGML will be replaced by the UML 2.0 Diagram Interchange format.

3.4.3.2.3. Applications Which Open PGML

PGML is a predecessor of SVG (see Section 3.4.3.2.5, “Scalable Vector Graphics (SVG)”. It was dropped by the W3C Consortium.

Currently there are no other tools that we know of working on PGML.

3.4.3.2.4. Printing Diagrams

Select a diagram, then go to File=>Export Diagrams. You can generate GIF, PostScript, Encapsulated PostScript or SVG format.

3.4.3.2.5. Scalable Vector Graphics (SVG)

A World Wide Web Consortium (W3C) standard vector graphics format ( http://www.w3.org/TR/SVG/).

Support is built in to modern browsers, but you can also get a plugin for older browsers from adobe.com.

3.4.3.2.6. Saving Diagrams as SVG
  1. Select .svg as the file type.

  2. Type the name of the file as you like with the .svg tag at the end. Example myumldiagram.svg

Et viola! SVG! Give it a try and zoom around a little... They are not pretty though, so if you know anything about rendering beautiful SVG let us know.

Most modern browsers support SVG. If yours doesn't try Firefox or get a plugin for your current browser from adobe.com

[Note]Note

You will not have scroll bars for your SVG unless it is embedded in HTML. Good luck and let us know what you find!

3.4.3.3. XMI

ArgoUML supports XMI 1.0, 1.1, and 1.2 files which contain UML 1.3 and UML 1.4 models. For best compatibility with ArgoUML, export your models using UML 1.4 and XMI 1.1 or 1.2. Be sure to turn off any proprietary extensions (such as Poseidon's diagram data).

With UML versions earlier than UML 2.0, it isn't possible to save diagram information, so no diagrams will be transferred.

There is also a tool that converts XMI to HTML. For more information, see http://www.objectsbydesign.com/projects/xmi_to_html_2.html.

3.4.3.3.1. Using XMI from Rational Rose

...

3.4.3.3.2. Using Models Created by Poseidon

In the Export project to XMI dialog, but sure to clear the selection of Save with diagram dataliteral>.

3.4.3.3.3. Using Models Created by MagicDraw

...

3.4.3.3.4. XMI Compatibility with other versions of ArgoUML

Versions of ArgoUML prior to 0.19.7 supported UML 1.3/XMI 1.0. After this time, the save format is UML 1.4/XMI 1.2 which is not backward compatible. Newer versions of ArgoUML will read projects written by older versions, but not vice versa. If you might need to return to an older version of ArgoUML you should be careful to save a backup of your old projects.

Additionally, if you write XMI files which need to be read by other tools, you should take into account the different versions. Most modern UML modelling tools should read UML 1.4, but you may have in-house code generators or other tools which are tied to UML 1.3.

3.4.3.3.5. Importing Other XMI Formats into ArgoUML

XMI compatibility between UML modeling tools has improved over the years, but you may still occasionally run into problems.

ArgoUML will not read XMI files which contain UML 1.5 or UML 2.0 models, but it should be able to open most UML 1.4 and UML 1.3 files. If you find one that it can't open, please file a bug report so that a developer can investigate.

3.4.3.3.6. Generating XMI Format

Select the command File=>Export as XMI and choose a filename.

3.4.3.4. Code Generation

3.4.3.4.1. Code Generated by ArgoUML

It is possible to compile your generated code with ArgoUML, you still need to implement method bodies, though, to get usable results.

3.4.3.4.2. Generating Code for Methods

At the moment you cannot write code for methods (operations) within ArgoUML. The source pane is editable, but the changes are ignored. ArgoUML is a pure design tool for now, no IDE functionality but the desire is there. You might consider using Forte and ArgoUML together—it's a good work around!

You can help us out there if you'd like!

3.4.4. Working With Design Critics

Design critics are part of the practical application of the theories of Cognitive Psychology that are implemented in ArgoUML. See Section 3.3.1, “Cognitive Psychology”

3.4.4.1. Messages From the Design Critics

Where do we stand now? A new project has been created, and is stored in the file FirstProject.zargo. Figure 3.10, “ ArgoUML Window Having Saved FirstProject.zargo shows how your ArgoUML window should look at this stage.

Figure 3.10.  ArgoUML Window Having Saved FirstProject.zargo

ArgoUML Window Having Saved FirstProject.zargo

The project contains a top-level package, called untitledModel, which contains a class diagram and a use case diagram.

If we look carefully at the screen, we can see that the "Medium" folder in the To-Do Pane (the lower left pane) must contain some items, since its activation icon is displayed.

Clicking on this icon will open the "Medium" folder. An open folder is indicated by the icon.

But what is this “To-Do” Pane anyway. You haven't recorded anything yet that has to be done, so where do these to do items originate.

The answer is simple, and is at the same time one of the strong points of ArgoUML. While you are working on your UML model, your work is monitored continuously and invisibly by a piece of code called a design critic. This is like a personal mentor that watches over your shoulder and notifies you each time he sees something questionable in your design.

Critics are quite unobtrusive. They give you a friendly warning, but they do not force you into design principles that you don't want or like to follow. Let us take a look at what the critics are telling us. Click on the icon next to the Medium folder, and click on the Revise Package Name UntitledModel item.

Figure 3.11, “ArgoUML Window Showing the Critic Item Revise Package Name UntitledModel shows how your screen should now look.

Figure 3.11. ArgoUML Window Showing the Critic Item Revise Package Name UntitledModel

ArgoUML Window Showing the Critic Item Revise Package Name UntitledModel

Notice that your selection is highlighted in red in the To-Do Pane, and that a full explanation appears now in the Details Pane (the lower right pane). You may have to re-size your Details Pane or to scroll down in order to see the full message as displayed in our example.

What ArgoUML is trying to tell you is that usually, package names are written in lower cases. The default top level package created by ArgoUML is called untitledModel and therefore violates a sound design principle. (Actually, this could be considered as a bug within ArgoUML, but it comes in handy to demonstrate the working of critics).

At this point, you can choose to change the package name manually or to impose silence on the design critic for some time or permanently

We will do nothing of this (we'll come back to it when we talk about the design critics in more detail) but we'll use another handy feature of ArgoUML—an auto-correct feature.

In order to do that, just click on the Next button on the Details Pane. This will cause a renaming wizard to be displayed inside the properties panel, proposing to use the name untitledmodel (all in lower case).

3.4.4.2. Design Critics at Work: The Rename Package Wizard

Replace the name untitledmodel with purchasingmodel, and click on the Finish button. Figure 3.12, “ArgoUML Window Showing the Critic Wizard to Rename the Package” shows how the ArgoUML window will now look.

Figure 3.12. ArgoUML Window Showing the Critic Wizard to Rename the Package

ArgoUML Window Showing the Critic Wizard to Rename the Package

Watch now how the design critic note in the To Do panel disappears, leaving only the Add Elements to Package purchasingmodel note in the To-Do list.

If this doesn't happen at once, wait for a few seconds. ArgoUML makes heavy use of several threads of execution that execute in parallel. This can cause delays of a few seconds before the information gets updated on the screen.

The package name change should also be reflected in the explorer, in the top left corner of your ArgoUML window.

We are now ready to create our first UML diagram, a Use Case diagram, but first let's save what we've done so far.

Click on the File menu item, and select Save Project. You can now safely exit ArgoUML without losing your work so far, or go on creating your first diagram.

3.5. The Case Study (To be written)

Here is where we are going to start the Case Study. It is at this point that you define your project; not your product, but your project. It can be argued that modeling concepts should apply here as well but this has not been well established. If you can take the time to look into the ArgoUML project, you will find that there are a large number of "lines of code" and lines of documentation that are part of the project, but not part of the product. For example, this document is part of the product while the Cookbook and the build.xml files are part of the project only. At a minimum the file structure of the project could be shown in a package diagram.

...

Chapter 4. Requirements Capture

4.1. Introduction

Requirements capture is the process of identifying what the “customer” wants from the proposed system.

The key at this stage is that we are in the problem domain. At this stage we must describe everything from the “customer” perspective and in the language of the “customer”.

The biggest risk we have in requirements capture is to start thinking in terms of possible solutions. That must wait until the Analysis Phase (see Chapter 5, Analysis). One of the steps of the Analysis Phase will be to take the output of the Requirements Phase and recast it in the language of a deemed solution.

Remember we are using both a incremental, and an iterative process.

We may well come back to the requirements process again as we break down the problem into smaller chunks, each of which must have its requirements captured.

We will certainly come back through the requirements phase on each iteration as we seek to define the requirements of more and more of the system

[Note]Note

The only part of the requirements notation specified by the UML standard is the use case diagram. The remainder is process specific. The process described in this chapter draws heavily on the Rational Unified Process.

4.2. The Requirements Capture Process

We start with a top-level view of the problem we are solving and the key areas of functionality that we must address in any solution. This is our vision document, and should be just a few pages long.

For example the top-level view of an automated teller machine (ATM) might be that it should support the following.

  1. Cash deposit, cash withdrawal and account inquiries by customers.

  2. Maintenance of the equipment by the bank's engineers, and unloading of deposits and loading of cash by the local bank branch.

  3. Audit trail for all activities sent to the bank's central computer.

From this top-level view we can extract the principal activities of the system, and the external agents (people, equipment) that are involved in those activities. These activities are known as use cases and the external agents are known as actors.

Actors may be people or machines. From a practical standpoint it is worth knowing the stakeholder behind any machine, since only they will be able to engage with the requirements capture process.

Use cases should be significant activities for the system. For example customer use of the ATM machine is a use case. Entering a PIN number is not.

There is a gray area between these two extremes. As we shall see it is often useful to break very large use cases into smaller sub-use cases. For example we may have sub-use cases covering cash deposit, cash withdrawal and account inquiry.

There is no hard and fast rule. Some architects will prefer a small number of relatively large use cases, others will prefer a larger number of smaller use cases. A useful rule of thumb is that any practical project ought to require no more than about 30 use cases (if it needs more, it should be broken into separate projects).

We then show the relationship between use cases and actors on one or more use case diagrams. For a large project more than one diagram will be needed. Usually groups of related use cases are shown on one diagram.

We must then give a more detailed specification of each use case. This covers its normal behavior, alternative behaviors and any pre- and post-conditions. This is captured in a document variously known as a use case specification or use case scenario.

Finally, since use cases are functional in nature, we need a document to capture the non-functional requirements (capacity, performance, environmental needs etc). These requirements are captured in a document known as a supplementary requirements specification.

4.2.1. Process Steps

The steps in the requirements capture process can be summarized as follows.

  1. Capture an overall view of the problem, and the desired characteristics of its solution in the vision document.

  2. Identify the use case and actors from the vision document and show their relationships on one or more use case diagrams.

  3. Give detailed use case specifications for each use case, covering normal and alternate behavior, pre- and post-conditions.

  4. Capture all non-functional requirements in a supplementary requirements specification.

In any iterative development process, we will prioritize, and early iterations will focus on capturing the key behavior of the most important use cases.

Most modern requirements capture processes agree that it is essential that the authoritative representative of the customer is fully involved throughout the process.

4.3. Output of the Requirements Capture Process

Almost all the output of the requirements capture process is documentary. The only diagram is the use case diagram, showing the relationships between use cases and actors.

4.3.1. Vision Document

Typical sections of this document would be as follows.

  • Summary. A statement of the context, problem and solution goals.

  • Goals. What are we trying to achieve (and how do we wish to achieve it).

  • Market Context or Contractual Arrangements. For a market led development, this should indicate target markets, competitive differentiators, compelling events and so forth. For a contractual development this should explain the key contractual drivers.

  • Stakeholders. The users (in the widest sense) of the system. Many of these will map in to actors, or control equipment that maps into actors.

  • Key Features. At the very highest level what are they key functional aspects of the problem/desired solution. These will largely map down to the use cases. It is helpful to give some prioritization here.

  • Constraints. A high level view of the non-functional parameters of the system. These will be worked out in detail in the supplementary requirements specification.

  • Appendix. A listing of the actors and use cases that will be needed to meet this vision. It is useful to link to these from the earlier sections to ensure comprehensive coverage.

4.3.2. Use Case Diagram

The vision document has identified the use cases and actors. The use case diagram captures how they interact. In our ATM example we have identified “customer uses machine”, “maintain machine” and “audit” as the three main use cases. We have identified “customer”, maintenance engineer“,”“local branch official” and “central computer” as the actors.

Figure 4.1, “Basic use case diagram for an ATM system” shows how this could be displayed on a use case diagram. The use cases are shown as ovals, the actors as stick people (even where they are machines), with lines (known as associations connecting use cases to the actors who are involved with them. A box around the use cases emphasizes the boundary between the system (defined by the use cases) and the actors who are external.

[Note]Note

Not all analysts like to use a box around the use cases. It is a matter of personal choice.

Figure 4.1. Basic use case diagram for an ATM system

Basic use case diagram for an ATM system

The following sections show how the basic use case diagram can be extended to show additional information about the system being designed.

4.3.2.1. Active and Passive Actors

Active actors initiate interaction with the system. This can be shown by placing an arrow on the association from the actor pointing toward the use case. In the ATM example, the customer is an active actor.

Interaction with passive actors is initiated by the system. This can be shown by placing an arrow on the association from the use case pointing toward the actor. In the ATM example, the central computer is a passive actor.

This is a good example where the arrow helps, since it allows us to distinguish an event driven system (the ATM initiates interaction with the central computer) from a polling system (the central computer interrogates the ATM from time to time).

Where an actor may be either active or passive, depending on circumstances, the arrow may be omitted. In the ATM example the bank engineer fits into this category. Normally he is active, turning up on a regular cycle to service the machine. However if the ATM detects a fault, it may summon the engineer to fix it.

The use of arrows on associations is referred to as the navigation of the association. We shall see this used elsewhere in UML later on. The choice, by the OMG, of zero vice two arrowheads to show a bidirectional association is unfortunate. Under this convention you cannot distinguish between an association whose navigation has yet to be determined and one that is bidirectional.

Figure 4.2, “Use case diagram for an ATM system showing navigation.” shows the ATM use case diagram with navigation displayed.

Figure 4.2. Use case diagram for an ATM system showing navigation.

Use case diagram for an ATM system showing navigation.

4.3.2.2. Multiplicity

It can be useful to show the multiplicity of associations between actors and use cases. By this we mean how many instances of an actor interact with how many instances of the use case.

By default we assume one instance of an actor interacts with one instance of a use case. In other cases we can label the multiplicity of one end of the association, either with a number to indicate how many instances are involved, or with a range separated by two periods (..). An asterisk ( *) is used to indicate an arbitrary number.

In the ATM example, there is only one central computer, but it may be auditing any number of ATM uses. So we place the label 0..* at the use case end. There is no need for a label at the other end, since the default is one.

A local bank will have up to three officials authorized to unload and load ATM machines. So at the actor end of the relationship with the use case Maintain ATM, we place the label 1..3. They may be dealing with any number of ATM machines, so at the other end we place the label 0..*.

There may be any number of customers and there may be any number of ATM systems they could use. So at each end of the association we place the label 0..*.

Figure 4.3, “Use case diagram for an ATM system showing multiplicity.” shows the ATM use case diagram with multiplicity displayed.

Figure 4.3. Use case diagram for an ATM system showing multiplicity.

Use case diagram for an ATM system showing multiplicity.

Multiplicity can clutter a diagram, and is often not shown, except where it is critical to understanding. In the ATM example we would only choose to show 1..3 against the local bank official, since all others are obvious from the context.

4.3.2.3. Hierarchies of Use Cases

In our ATM example so far we have just three use cases to describe all the behavior of the system. While use cases should always describe a significant chunk of system behavior, if they are too general they can be difficult to describe.

We could for example define the behavior of the use case “Use ATM” in terms of the behavior of three simpler use cases, “Deposit Cash”, “Withdraw Cash” and “Query Account”. The main use case could be specified by including the behavior of the subsidiary use cases where needed.

Similarly the “Maintain ATM” use case could be defined in terms of two use cases “Maintain Equipment” and “Reload ATM”. In this case the two actors involved in the main use case are really only involved in one or other of the two subsidiary use cases and this can be shown on the diagram.

The decomposition of a use case into simpler sub-use cases is shown in UML by using an include relationship, a dotted arrow from the main use case to the subsidiary, with the label «include».

Figure 4.4. Use case diagram for an ATM system showing include relationships.

Use case diagram for an ATM system showing include relationships.

Include relationships are fine for breaking down the use case behaviors in to hierarchies. However we may also want to show a use case that is an extension to an existing use case to cater for a particular circumstance.

In the ATM example we have a use case covering routine maintenance of the ATM, “Maintain Equipment”. We also want to cover the special case of an unscheduled repair caused by the ATM detecting an internal fault.

This is shown in UML by the extend relationship. In the main use case, we specify a name for a location in the description, where an extension to the behavior could be attached. The name and location are shown in a separate compartment within the use case oval. The representation extend relationship is the same as the include relationship, but with the label «extend». Alongside the extend relationship, we specify the condition under which that behavior will be attached.

Figure 4.5, “Use case diagram for an ATM system showing an extend relationship.” shows the ATM use case diagram with an extend relationship to a use case for unscheduled repairs. The diagram is now getting rather complex, and so we have split it into two, one for the maintenance side of things, the other for customer usage and audit.

The “Maintain Equipment” use case defines a name “Unsched”, at the start of its description. The extending use case “Unscheduled Repair” is attached there when the ATM detects an internal error.

Figure 4.5. Use case diagram for an ATM system showing an extend relationship.

Use case diagram for an ATM system showing an extend relationship.

Use cases may be linked together in one other way. One use case may be a generalization of a subsidiary use case (or alternatively the subsidiary is a specialization of the main use case). This is very like the extends relationship, but without the constraint of specific extension points at which the main use case may be extended, and with no condition on when the subsidiary use case may be used.

Generalization is shown on a use case diagram by an arrow with solid line and solid white head from the subsidiary to the main use case. This may be useful when a subsidiary use case specializes the behavior of the main use case at a large number of positions and under a wide range of circumstances. However the lack of any restriction makes generalization very hard to specify precisely. In general use an extend relationship instead.

4.3.3. The Use Case Specification

Each use case must be documented to explain in detail the behavior it is specifying. ArgoUML assists in this area through the generation of graphic files for inclusion in this documentation. This document is known by different names in different processes: use case specification, use case scenario or even (confusingly) just use case.

A typical use case specification will include the following sections.

  • Name. The name of the use case to which this relates.

  • Goal. A one or two line summary of what this use case achieves for its actors.

  • Actors. The actors involved in this use case, and any context regarding their involvement.

    [Note]Note

    This should not be a description of the actor. That should be associated with the actor on the use case diagram.

  • Pre-condition. These would be better named “pre-assumptions”, but the term used everywhere is pre-conditions. This is a statement of any simplifying assumptions we can make at the start of the use case.

    In the ATM example we might make the assumption for the“Maintain Equipment” use case that an engineer is always available, and we do not need to worry about the case where a routine maintenance visit is missed.

    [Caution]Caution

    Avoid pre-conditions wherever possible. You need to be absolutely certain that the pre-condition holds under all possible circumstances. If not your system will be under specified and hence will fail when the pre-condition is not true. Alternatively, when you cannot be certain the pre-condition is always true, you will need to specify a second use case to handle the pre-condition being false. In the first case, pre-conditions are a source of problems, in the second a source of more work.

  • Basic Flow. The linear sequence of steps that describe the behavior of the use case in the “normal” scenario. Where a use case has a number of scenarios that could be normal, one is arbitrarily selected. Specifying the basic flow is described in more detail in Section 4.3.3.1, “Specifying the Basic Flow” below.

  • Alternate Flows. A series of linear sequences describing each of the alternative behaviors to the basic flow. Specifying alternate flows is described in more detail in Section 4.3.3.2, “Specifying the Alternate Flows”.

  • Post-conditions. These would be better named “post-assumptions”. This is a statement of any assumptions that we can make at the end of the use case. Most useful where the use case is one of a series of subsidiary use cases that are included in a main use case, where they can form the pre-conditions of the next use case to be included.

    [Caution]Caution

    Like pre-conditions, post-conditions are best avoided. They place a burden on the specification of the use case flows, to ensure that the post-condition always holds. They therefore are also a source of problems and extra work.

  • Requirements. In an ideal world the vision document, use case diagrams, use case specifications and supplementary requirements specification would form the requirements for a project.

    For most market-led developments, where ownership of requirements is within the same business as the team who will do the development, this is now usually the case. The marketing department can learn use case based requirements capture and analysis to link to their customer facing activities.

    However for external contract developments, customers may insist on a traditional “list of features” as the basis of the contract. Where this is the case, this section of the use case specification should link to the contract features that are covered by the use case.

    This is often done through a third party tool that can link documents, providing automated checking of coverage, in which case this section is not needed, or may be generated automatically.

The final size of the use case specification will depend on the complexity of the use case. As a rule of thumb, most use cases take around 10-15 pages to specify, the bulk of which is alternate flows. If you are much larger than this, consider breaking the use case down. If you are much smaller consider whether the use case is addressing too small a chunk of behavior.

4.3.3.1. Specifying the Basic Flow

All flows in a use case specification are linear—that is there is no conditional branching. Any choices in flows are handled by specifying another alternate flow that takes over at the choice point. It is important to remember we are specifying behavior here, not programming it.

A flow is specified as a series of numbered steps. Each step must involve some interaction with an actor, or at least generate a change that is observable externally by an actor. Requirements capture should not be specifying hidden internal behavior of a system.

For example we might give the following sequence of steps for the basic flow of the use case "Withdraw Cash" in our ATM example.

  1. Customer indicates a receipt is required.

  2. Customer enters amount of cash required.

  3. ATM verifies with the central computer that the customer can make this withdrawal.

  4. ATM dispenses cash to the customer.

  5. ATM issues receipt to customer.

Remember this is a sub-use case included in the main “Use ATM” use case, which will presumably handle checking of cards and PINs before invoking this included use case.

[Note]Note

The first step is not a condition. We take as our basic flow the case where the customer does want a receipt. The case where the customer does not want a receipt will be an alternative flow.

4.3.3.2. Specifying the Alternate Flows

This captures the alternative scenarios, as linear flows, by reference to the basic flow. Initially we just build a list of the alternate flows.

    1. Customer does not require a receipt.

    2. Customer's account will not support the withdrawal.

    3. Communication to the central computer is down.

    4. The customer cancels the transaction.

    5. The customer fails to take the dispensed cash.

Subsequently we flesh out each alternate flow, by reference to the basic flow. For example the first alternate flow might look like.

    1. Customer does not require a receipt.

      1. At step 1 of the basic flow the customer indicates they do not want a receipt.

      2. The basic flow proceeds from step 2 to step 4, and step 5 is not used.

The convention is to number the various alternate flows as A.1, A.2, A.3, etc. The steps within an alternate flow are then numbered from this. So the steps of the first alternate flow would be A.1.1, A.1.2, A.1.3, etc.

4.3.3.3. Iterative Development of Use Case Specifications

Iterative development will prioritize the use cases, and the first iterations will address the most important.

Early iterations will capture the basic flows of the most important use cases with only essential detail and list the headings of the main alternate flows.

Later iterations will address the remaining use cases, flesh out the steps on individual alternate flows and possibly provide more detail on individual steps.

4.3.4. Supplementary Requirement Specification

This captures the non-functional requirements or constraints placed on the system. Since use cases are inherently functional in nature, they cannot capture this sort of information.

[Note]Note

Some analysts like to place non-functional requirements in a section at the end of each use case specification, containing the non-functional requirements relevant to the use case.

This can cause some problems. First key non-functional requirements (for example about performance) may need to appear in many use cases and it is bad practice to replicate information. Secondly there are invariably some non-functional requirements that are system wide and need a system wide document. Hence my preference for a single supplementary requirements specification.

There should be a section for each of the main areas of non-functional requirements. The checklist provided by Ian Sommerville in his book Software Engineering (Third Edn, Addison-Wesley, 1989) is a useful guide.

  • Speed. Processor performance, user/event response times, screen refresh time.

  • Size. Main memory (and possibly caches), disc capacity.

  • Ease of use. Training time, style and detail of help system.

  • Reliability. Mean time to failure, probability of unavailability, rate of failure, availability.

  • Robustness. Time to restart after failure, percentage of events causing failure, probability of data corruption on failure.

  • Portability. Percentage of target-dependent code/classes, number of target systems.

To this we should add sections on environment (temperature, humidity, lightening protection status) and standards compliance.

4.4. Using Use Cases in ArgoUML

ArgoUML allows you to draw use case diagrams. When you create a new project it has a use case diagram created by default, named use case diagram 1. Select this by button 1 click on the diagram name in the explorer (the upper left quadrant of the user screen).

New use case diagrams can be created as needed through Create Diagram on the main menu bar or on the Create Diagram Toolbar. They are edited in the editing pane (the upper right quadrant of the user screen).

4.4.1. Actors

To add an actor to the diagram use button 1 click on the actor icon on the editing pane toolbar ( ) and then button 1 click at the location where you wish to place it. The actor can be moved subsequently by button 1 motion (i.e. button 1 down over the actor to select it, move to the new position and button 1 release to drop the actor in place.

Multiple actors can be added in one go, by using button 1 double click on the actor icon. Each subsequent button 1 click will drop an actor on the diagram. A button 1 click on the select icon ( ) will stop adding actors.

The actors name is set in its property panel. First select the actor (if not already selected) on the editing pane using button 1 click. Then click on the Properties tab in the details pane. The name is entered in the name field, and will appear on the screen.

As a shortcut, double button 1 click on the name of the actor in the editing pane (or just typing on the keyboard when an actor is selected) will allow the name to be edited directly. This is a convenient way to enter a name for a new actor.

Having created the actor, you will see it appear in the explorer (the upper left quadrant of the user screen). This shows all the model elements created within the UML design. A drop down at the top of the explorer controls the ordering of model elements in the explorer. The most useful are the Package-centric (default) and Diagram-centric. The latter shows model elements grouped by the diagram on which they appear.

4.4.2. Use Cases

The procedure for adding use cases is the same as that for adding actors, but using the use case icon on the editing pane toolbar ().

By default use cases in ArgoUML do not display their extension points (for use in extend relationships). You can show the extension point compartment in one of two ways.

  1. Select the use case in the editing pane with button 1 click, then select the Style tab in the details pane and button 1 click on the Display: Extension Points check box.

  2. Use button 2 click over the use case in the editing pane to display a context-sensitive pop-up menu and from that choose Show/Show Extension Point Compartment.

The same approaches can be used to hide the extension point compartment.

4.4.2.1. Adding an Extension Point to a Use Case

There are two ways to add an extension point to a use case.

  1. Select the use case on the editing pane with button 1 click. Then click on the Add Extension Point icon ( ) on the toolbar, and a new extension point with default name and location will be added after any existing extension points.

    [Note]Note

    The Add Extension Point icon is grayed out and unusable until a use case is selected.

  2. Select the use case on the editing pane with button 1 click and then select its property tab in the details pane. A button 2 click over the Extension Points: field will bring up a context-sensitive pop-up menu. Select Add to add a new extension point.

    If any extension points already exist, they will be shown in this field on the property tab. The new extension point will be inserted immediately before the entry over which the pop-up menu was invoked. This ordering can be changed later by using the Move Up and Move Down entries on the pop-up menu.

Whichever method is used, the new extension point is selected, and its property tab can be displayed in the details pane. The name and location of the extension point are free text, set in the corresponding fields of the property tab.

An existing extension point can be edited from its property tab. The property tab can be reached in two ways.

  1. If the extension point compartment for the use case is displayed on the diagram, select the use case with button 1 click and then select the extension point with a further button 1 click. The property tab can then be selected in the details pane.

  2. Otherwise select the use case and its property tab in the details pane. A button 1 click on the desired entry in the Extension Points field will bring up the property tab for the extension point in the details pane.

The name and location fields of the extension point may then be edited.

As a shortcut, where the extension point compartment is displayed, double click on the extension point allows text to be typed in directly. This is parsed to set name and location for the extension point.

Extension points may be deleted, or their ordering changed by using the button 2 pop-up menu over the Extension Points field in the use case property tab.

Having created an extension point, it will appear in the explorer (upper left quadrant of the user screen). Extension points are always shown in a sub-tree beneath their owning use case.

4.4.3. Associations

To join a use case to an actor on the diagram use button 1 click on the association icon on the editing pane toolbar (). Hold button 1 down at the use case, move to the actor and release button 1 (or alternatively start at the actor and finish at the use case).

This will create a straight line between actor and use case. You can segment the line by holding down button 1 down on the line and moving before releasing. A vertex will be added to the line, which you can move by button 1 motion. A vertex can be removed by picking it up and sliding to one end of the line.

Multiple associations can be added in one go, by using button 1 double click on the association icon. Each subsequent button 1 down/motion/release sequence will join an actor to a use case. Use button 1 on the select icon ( ) to stop adding associations.

It is also possible to add associations using small “handles” that appear to the left and right of a use case or actor when it is selected and the mouse is over it. Dragging the handle from a use case to an actor will create an association to that actor (and similarly by dragging a handle from an actor to a use case).

Dragging a handle from a use case into empty space will create a new actor to go on the other end. Similarly dragging a handle from an actor into empty space will create a new use case.

It is possible to give an association a name, describing the relationship of the actor to the use case, although this is not usually necessary. This is done through the property tab of the association. Such a name appears alongside the association near its center.

4.4.3.1. Setting Navigation

There are two ways of setting the navigation of an association.

  1. Use button 2 click on the association to bring up a context-sensitive pop-up menu. The Navigability sub-menu has options for bi-directional navigation (the default, with no arrows) and for navigability Actor->Use Case and Use Case->Actor.

  2. Use button 1 to select the association and select its property tab in the details pane. This shows a field named Association Ends:, with entries for each end labeled by the actor or use case name and its multiplicity. Select the end that should be at the tail of the arrow with button 1 click. This brings up the property tab for the association end. Use button 1 click to uncheck the Navigability box.

    [Note]Note

    This may seem counter-intuitive, but in fact associations by default are navigable in both directions (when no arrows are shown). This process is turning off navigation at one end, rather than turning it on at the other.

You will see it is possible to give an association end a name in its property tab. This name will appear at that end of the association, and can be used to indicate the role being played by an actor or use case in an association.

For example a time management system for a business may have use cases for completing time sheets and for signing off time sheets. An employee actor may be involved in both, one as an employee, but the other in a role as manager.

4.4.3.2. Setting Multiplicity

There are two ways of setting multiplicity at the end of an association.

  1. Button 2 click over the end of an association will cause a context-sensitive pop-up menu to appear with a sub-menu labeled Multiplicity. This allows you to select from 1 (the default), 0..1, 0..* and 1..*.

  2. Bring up the property sheet for the association end as described for setting navigation (see the second option in Section 4.4.3.1, “Setting Navigation” ). A drop down menu gives a range of multiplicity options that may be selected.

The second of these two approaches has a wider range of options, although ArgoUML does not currently allow the user to set an arbitrary multiplicity.

4.4.4. Hierarchical Use Cases

UML as originally designed allowed use cases to be organized by grouping them in packages as well as by specifying relations among them. In ArgoUML only the relations mechanism is supported. All Three of the relations that apply to use cases are supported. These are include, extend and generalization.

4.4.4.1. Includes

The procedure for adding an include relationship is the same as that for adding an association, but using the include icon from the editing pane toolbar ( ) to join two use cases.

Since include relationships are directional the order in which the two ends are selected is important. The including (main) use case should be selected first (button 1 down) and the included (subsidiary) use case second (button 1 release).

It is possible to name include relationships using the property tab, but this is rarely done, and will not be displayed on the use case diagram.

4.4.4.2. Extends

The procedure for adding an extend relationship is the same as that for adding an include relationship, but using the extend icon from the editing pane toolbar ( ) to join two use cases.

As with include relationships, the order of selection matters. In this case, the extending (subsidiary) use case should be selected first (button 1 down) and the extending (main) use case second (button 1 release).

[Note]Note

This is the reverse of the include relationship, but reflects the way that designer's tend to think. The fact that the extend icon's arrow points upward (the opposite of the include icon) should help remind you of this.

To set a condition for the extend relationship, select the extend relationship in the editing pane (button 1 click) and then bring up its property tab in the details pane ((button 1 click on the tab). The text of the condition may be typed in the Condition field. Long conditions may be split over several lines if desired. The condition is displayed under the «extend» label on the diagram.

It is possible to name extend relationships using the property tab, but this is rarely done, and will not be displayed on the use case diagram.

4.4.4.3. Generalization

The procedure for adding generalizations, is the same as for adding extend relationships, but using the generalization icon from the editing pane toolbar ( ).

Since generalization is a directed relationship, the order of selection matters. The specialized use case should be selected first (button 1 down) and the generalized second (button 1 release).

It is also possible to add generalizations using small “handles” that appear to the top and bottom of a use case when it is selected. Dragging the handle at the top to another use case will create a generalization. The original use case is the specializing end, and the use case to which the handle was dragged will be the generalizing end. Dragging into empty space will create a new use case to be the generalizing end.

Similarly dragging on the bottom handle will create a generalization in which the original use case is the generalizing end.

Generalization is also permitted between actors, although its use is beyond the scope of this tutorial. Unlike use cases there are no generalization handles on actors, so generalizations must be created using the toolbar icon.

It is possible to name generalization relationships using the property tab, but this is rarely done. If a name is provided, it will be displayed on the use case diagram.

4.4.5. Stereotypes

UML has the concept of stereotyping as a way of extending the basic notation. It may prove useful for example to model a problem at both the business level and the engineering level. It is for this reason that the OMG distinguishes between a PIM and a PSM. For both of these we will need use cases, but the use cases at the business level hold a different sort of information to those at the engineering level. Very likely they use different language and notation in their underlying use case specifications.

Stereotypes are used to label UML model elements such as use cases, to indicate that they belong to a certain category. Such labels are shown in guillemots ( « ») above the name of the model element on the diagram. The UML standard defines a number of standard stereotypes, and the user may define more stereotypes of his own.

You will see that ArgoUML has a drop down selector, Stereotype on every property tab. This is populated with the standard stereotypes, to which you may add your own user defined ones.

The details of stereotyping are beyond the scope of this tutorial. The reference manual (see Section 16.6, “Stereotype”) documents the support provided in ArgoUML.

[Warning]Warning

ArgoUML is missing a few of the standard UML stereotypes. In addition not all model elements will actually display the stereotype on the diagram. At present this includes use cases and actors.

4.4.6. Documentation

ArgoUML has some simple documentation facilities associated with model elements on a diagram. In general these should be used only to record the location of material in documents that can be handled by a mainstream editor or word processor, not the actual documentation itself.

Documentation for a particular model element is recorded through the documentation tab in the details pane (the quadrant of the user screen at the bottom right).

In addition annotation may be added to diagrams using the text icon on the editing pane toolbar ( ).

The recommendation is that a use case diagram should use the documentation tab of actors to record information about the actor, or if the actor is complex to refer to a separate document that holds information about the actor.

The documentation tab of use cases should record the location of the use case specification. The information in a use case specification (for all but the simplest use cases) is too complex to be placed directly in the tab.

The project should also have a separate vision document and supplementary requirements specification. A text annotation on diagrams may be used to refer to these if the user finds this helpful.

[Warning]Warning

The documentation tab includes a Deprecated check box. The state of this flag is not preserved over save and load in the current release of ArgoUML

4.4.7. System Boundary Box

ArgoUML provides a series of tools to provide arbitrary graphical annotation on diagrams (we have already mentioned the text tool). These are found at the right hand end of the editing pane toolbar and are fully documented in the reference manual (see Chapter 12, The Editing Pane ).

The rectangle tool can be used to draw the boundary box. Use the button 2 context-sensitive Ordering pop-up menu to place it behind everything else. However there is no way to change its fill color from the default white. You may therefore prefer to draw the boundary box as four lines. This is the method used for the diagrams in this chapter.

[Note]Note

The editing pane in ArgoUML has a grid to which objects snap to aid in drawing. The size of this grid and its effect may be altered through the View menu (using Adjust Grid and Adjust Grid Snap). This is described fully in the reference manual (see Chapter 10, The Menu bar).

4.5. Case Study

4.5.1. Vision Document

A vision document contains more than those things needed for the modeling effort. It also contains financial and scheduling pertinent information. The following sections are those parts of the Vision Document spelled out in Section 4.3.1, “Vision Document” above. In practice this format need not be followed religiously, but is used here for consistency.

4.5.1.1. Summary

The company wishes to produce and market a line of ATM devices. The purpose of this project is to produce the hardware and the software to drive it that are both maintainable and robust.

4.5.1.2. Goals

To produce better designed products based on newer technology. Follow the MDA philosophy of the OMG by producing first a Platform Independent Model (PIM). As current modeling technology does not admit of maintaining the integrity of the connection between the PIM and Platform Specific Models (PSMs), the PIM will become comparatively stable before the first iteration of the PSM is produced. The software platform will be Java technology. The system will use a simple userid (from ATM card) and password (or PIN) mechanism.

4.5.1.3. Market Context

Equipment currently on the market is based on older technology for both hardware and software. This technology has not reached the end of its useful life, making it unlikely that the vendors of that gear are going to update it in the near future. On the other hand newer technology is available that would put us at a competitive advantage if implemented now.

4.5.1.4. Stakeholders

Among the stakeholders for this system are the Engineering Department, the Maintenance Department, and the Central Computer Facility. The full list of these stakeholders and the specific individuals representing them are.

  • Engineering. Bunny, Bugs

  • Maintenance. Hardy, Oliver

  • Computer Facility. Laurel, Stanley

  • Chief Executive Officer. Hun, Atilla The

  • Marketing. Harry, Oil Can

4.5.1.5. Key Features

Cash deposit, cash withdrawal, and account inquiries by customers. Customers include people who have accounts at the owning bank as well as people who wish to make withdrawals from accounts in other banks or from credit card accounts.

Maintenance of the equipment by the bank's engineers. This action may be initiated by the engineer on a routine basis. It may also be initiated by the equipment that can call the engineer when it detects an internal fault.

Unloading of deposits and loading of cash by officials of the local bank branch. These actions occur either on a scheduled basis or when the central computer determines that the cash supply is low or the deposit receptacle is liable to be getting full.

An audit trail for all activities will be maintained and sent periodically to the bank's central computer. It will be possible for the maintenance engineer to save a copy of the audit trail to a diskette for transporting to the central computer.

Both dialup and leased line support will be provided. The ATM will continue to provide services to customers when communication with the central computer is not available.

4.5.1.6. Constraints

The project must be completed within nine months. It must cost no more than 1,750,000 USD excluding production costs. Components may be contracted out, but the basic architecture as well as the infrastructure will be designed in house. Close liaison must be maintained between the software development and the design, development and production of the hardware. Neither the hardware nor the software shall be considered the independent variable, but rather they shall be considered equal.

4.5.1.7. Appendix

The following are the actors that directly support this vision. Additional actors may be identified later that are needed to support this or that technology. They should not be added to this list unless they are deemed to directly support the vision as described in this document.

  • Central Computer

  • Customer

  • Local Branch Official

  • Maintenance Engineer

The following are the use cases that directly support this vision. Additional use cases may be identified later that are needed to support this or that technology or to support the use cases listed here. They should not be added to this list unless they are deemed to directly support the vision as described in this document.

  • Audit

  • Customer Uses Machine

  • Maintain Machine

4.5.2. Identifying Actors and Use Cases

For the ATM case study, we will elaborate on the examples in Section 4.3, “Output of the Requirements Capture Process”, Figure 4.4, “Use case diagram for an ATM system showing include relationships.” and Figure 4.5, “Use case diagram for an ATM system showing an extend relationship.”, and progress to identify additional actors and use cases that comprise our model of the ATM system. Figure 4.4, “Use case diagram for an ATM system showing include relationships.” and Figure 4.5, “Use case diagram for an ATM system showing an extend relationship.” exemplified the essential concepts and components of a use case diagram such as, use cases, actors, multiplicity, and include / extend relationships. They showed the relationships between the actors and use cases, and demonstrated how these actors and use cases interact.

In Figure 4.4, “Use case diagram for an ATM system showing include relationships.” we see a use case diagram for an ATM system consisting of «include» relationships for the use cases, Maintain ATM and Use ATM. Maintain ATM was further defined by two use cases, "Maintain Equipment" and "Reload ATM". Use ATM was further defined in terms of the behavior of three simpler use cases: "Deposit Cash", "Withdraw Cash" and "Query Account".

More to be written...

4.5.3. Associations (To be written)

To be written...

4.5.4. Advanced Diagram Features (To be written)

To be written...

4.5.5. Use Case Specifications (To be written)

To be written...

4.5.6. Supplementary Requirements Specification (To be written)

To be written...

Chapter 5. Analysis

Analysis is the process of taking the “customer” requirements and re-casting them in the language of, and from the perspective of, a putative solution.

We are not actually trying the flesh out the detailed solution at this stage. That occurs in the Design Phase (see Chapter 6, Design).

Unlike the boundary between Requirements and Analysis Phases, the boundary between Analysis and Design Phases is inherently blurred. The key is that analysis should define the solution no further than is necessary to specify the requirements in the language of the solution. The model elements in Analysis generally represent a high level of abstraction.

Once again the recursive, and iterative nature of our process means we will come back to the Analysis phase many times in the future.

5.1. The Analysis Process

There are three schools of thought on how Analysis should be approached. The ontologist defines the data (actually the metadata) first and worries about processes later. The true ontologist would prefer not to have to think about processes at all. The phenomenonologist reverses this and favors process over data. The panparadigmist considers both process and data to be equally important and addresses both from the start.

When it comes to being a purist the ontologist has the upper hand. It is possible to define and build a database into which data can be entered and retrieved without concern for what happens to it or is done with it. On the other hand implementing a process without having any data structures for it to operate on is not very meaningful.

5.1.1. Class, Responsibilities, and Collaborators (CRC) Cards

The CRC methodology favors the phenomenonologists preference for analysis. It is the equivalent of starting with the use cases, the process aspects (operations) of the class diagrams, and scenarios from which sequence diagrams can be initiated.

CRC cards and the associated methodology are described in detail in Appendix G, The CRC Card Methodology. They are used again in the design phase and are further discussed in Chapter 6, Design.

The strength of CRC cards during analysis.

  • Common Project Vocabulary -

  • Spread Domain Knowledge -

  • Making the Paradigm Shift -

  • Live Prototyping -

  • Identifying Holes in Requirements -

In this phase the group should consist of two or three domain experts, one object-oriented technology facilitator, and the rest of the group made up of people who are responsible for delivering the system.

The first time that the Analysis phase occurs a special case of the CRC session happens as there are no classes or scenarios to choose from to define a CRC session. At this point a special type of session known as brainstorming is held. During this session you identify the initial set of classes in the problem domain by using the problem statement or requirements document or whatever you know about the desired result for a starting point. The nouns that are found in whatever you are starting from are a good key to an initial set of classes in the system. In a brainstorming session there should be little or no discussion of the ideas. Record them and filter the results after the brainstorming. At this stage the distinction between class and object is blurred.

Once a reasonable set of classes has been defined by the group, responsibilities can be added. Add responsibilities that are obvious from the requirements or the name of the class. You don't need to find them all (or any for that matter). The scenarios will make them more obvious. The advantage of finding some in the beginning is that it helps provide a starting place.

Select the initial scenarios from the requirements document by examining it's verbs in much the same way that we scanned its nouns earlier. Then as many walk through sessions as necessary to complete the analysis phase are performed.

When is enough of the analysis complete that design can begin? When all the different responsibilities are in place and the system has become stable. After all the normal behavior has been covered, exceptional behavior needs to be simulated. When you notice that the responsibilities are all in place to support the new scenarios, and there is little change to the cards, this is a sign the you are ready to start design.

5.1.2. Concept Diagram (To be written)

To be written...

5.1.3. System Sequence Diagram (To be written)

To be written...

5.1.4. System Statechart Diagram (To be written)

To be written...

5.1.5. Realization Use Case Diagram (To be written)

To be written...

5.1.6. Documents (To be written)

Use Case Specifications and Supplementary Requirements Specifications recast in solution language. To be written...

5.2. Class Diagrams (To be written)

To be written...

5.2.1. The Class Diagram (To be written)

To be written...

5.2.2. Advanced Class Diagrams (To be written)

To be written...

5.2.2.1. Association Classes (To be written)

To be written...

5.3. Creating Class Diagrams in ArgoUML

5.3.1. Classes

Identifying class diagrams from existing materials (Vision, Use Cases etc). To be written...

5.3.1.1. Using the Note Icon in the Tool Bar

Click on your target class. Then click on the note icon. ArgoUML will generate the link automatically.

You can also right click to add a note as well! Be aware that you can add an undefined number of notes to any one class!

[Warning]Warning

Be aware that your note will not appear in the source code documentation tab.

5.3.2. Associations (To be written)

To be written...

5.3.2.1. Aggregation (To be written)

To be written...

5.3.3. Class Attributes and Operations (To be written)

To be written...

5.3.3.1. Entering Data Into Attributes and Methods Windows

Click directly in the class model element and start typing. Do not use the properties window dialog fields—they are not fully functional and liable to cause you a little frustration.

In fact, it would be interesting to see if you can type stereotypes right into the class attribute box for generating XML diagrams.

5.3.3.2. Class Attributes (To be written)

To be written...

5.3.3.3. Class Operations (To be written)

To be written...

5.3.4. Advanced Class Features (To be written)

5.3.4.1. Association Classes (To be written)

To be written...

5.3.4.2. Stereotypes (To be written)

To be written...

5.4. Sequence Diagrams (To be written)

To be written...

5.4.1. The Sequence Diagram (To be written)

To be written...

5.4.2. Identifying Actions (To be written)

To be written...

5.4.3. Advanced Sequence Diagrams (To be written)

To be written...

5.5. Creating Sequence Diagrams in ArgoUML

5.5.1. Sequence Diagrams

5.5.1.1. Creating a Sequence Diagram

Normally, you can just start a sequence diagram right away. On the Create Diagram menu choose Sequence.

5.5.2. Actions (To be written)

To be written...

5.5.3. Advanced Sequence Diagrams (To be written)

To be written...

5.6. Statechart Diagrams (To be written)

To be written...

5.6.1. The Statechart Diagram (To be written)

Types of statechart diagram (Moore, Mealy); Hierarchical diagrams. To be written...

5.6.2. Advanced Statechart Diagrams (To be written)

To be written...

5.6.2.1. Hierarchical Statechart Diagrams (To be written)

To be written...

5.7. Creating Statechart Diagrams in ArgoUML

5.7.1. Statechart Diagrams (To be written)

To be written...

5.7.1.1. Creating a Statechart Diagram

Select a class, then you can create a statechart diagram.

5.7.2. States (To be written)

To be written...

5.7.2.1. Editing a Composite State

When editing a composite state, how do you provide do and event for a composite state?

The answer is to select a class, then you can create a statechart diagram.

5.7.3. Transitions (To be written)

To be written...

5.7.4. Actions (To be written)

To be written...

5.7.5. Advanced Statechart Diagrams (To be written)

To be written...

5.7.5.1. Hierarchical Statechart Diagrams (To be written)

To be written...

5.8. Realization Use Cases (To be written)

To be written...

5.9. Creating Realization Use Cases in ArgoUML (To be written)

To be written...

5.10. Case Study (To be written)

Regardless of which methodology you use, at this time you are undoubtedly going to take the problem statement from Section 4.5, “Case Study” and extract the nouns from it. This list should be compacted to contain only those nouns that are expected to result in a class. This effort results in the following.

  • Account

  • Audit trail

  • Bank

  • Cash

  • Customer

5.10.1. CRC Cards

The project manager convenes a CRC session at which the initial set of classes are to be defined. The facilitator reminds the participants that we are in the analysis phase and are only interested in what needs to be done (at the business level) and are to leave out anything that smacks of how to do it. As a general rule of thumb this means a subset of the nouns from the problem statement (see above). The group starts with a complete list of all of the nouns in the statement, examines each one, and decides which are inappropriate crossing them off the list. Each class is then assigned to one of the participants.

to be continued...

5.10.2. Concept Class Diagrams (To be written)

To be written...

5.10.2.1. Identifying classes (To be written)

To be written...

5.10.2.2. Identifying associations (To be written)

To be written...

5.10.3. System Sequence Diagrams (To be written)

To be written...

5.10.3.1. Identifying actions (To be written)

To be written...

5.10.4. System Statechart Diagrams (To be written)

To be written...

5.10.5. Realization Use Cases (To be written)

To be written...

Chapter 6. Design

We now have the problem we are trying to solve specified in the language of a putative solution. In the Design Phase, we construct all the details of that solution.

The blurred boundary between Analysis and Design is reflected in their use of many of the same UML tools. In this chapter we will mostly be reusing UML technology we have already met once. The big step is casting everything into concrete terms. We move from the abstract concepts of analysis to their concrete realization.

Once again the recursive, and iterative nature of our process means we will come back to the Design phase many times in the future.

6.1. The Design Process (To be written)

The design process extends the modeling effort beyond the business concerns and into the solutions space. It is during this effort that you decide whether you are going to use Java, C++, J2EE, CORBA, SOAP, Dial up line, internet connection dedicated line, XML, etc. Many of these decisions will impact directly the PSM model, others may only be reflected in the documents produced.

...

6.1.1. Class, Responsibilities, and Collaborators (CRC) Cards

Strength of CRC cards during Design

  • Spreading Objet-Oriented Design Expertise

  • Design Reviews

  • Framework for Implementation

  • Informal Notation

  • Choice of supporting software components

  • Performance Requirements

In this phase developers replace some of the domain experts in the group, but there should always be at least one domain expert in the group.

The focus of the group moves from what is to be done to how to do it. The classes from the solution domain are added to those defined in the analysis phase. Think about what classes are needed to make the system work. Do you need a List class to hold objects? Do you need classes to handle exceptions? Do you need wrapper classes for other subsystems? New classes that are looked for in this part, are classes that support the implementation of the system.

During the design phase the distinction between class and object becomes important. Think about the objects in your scenarios. Who creates the objects? What happens when it is created and destroyed? What is the lifetime of the object vs. the lifetime of the information held be the object?

Now is the time to look at what information the objects hold compared to what is requested from other classes or computed on the fly. Use the back of the card to record the attributes found for the classes. Break you responsibilities into subresponsibilities and list the subresponsibilities indented under the main responsibilities. Move the collaborators next to the subresponsibilities that use them.

After the Collaborator class on your card list the responsibility of the used class that is used in the collaboration. After the collaborating responsibilities on your cards, list the data passed back by the collaborating object in parenthesis.

Redo the scenarios you did in the analysis phase, but know take into consideration all of the design heuristics discussed. Make up your own scenarios and try them.

6.1.2. Package Diagram (To be written)

To be written...

6.1.3. Realization Class Diagrams (To be written)

To be written...

6.1.4. Sequence Diagrams and Collaboration Diagrams (To be written)

To be written...

6.1.5. Statechart Diagrams and Activity Diagrams (To be written)

To be written...

6.1.6. Deployment Diagram (To be written)

To be written...

6.1.7. Documents (To be written)

System Architecture. To be written...

6.2. Package Diagrams (To be written)

To be written...

6.2.1. The Package Diagram (To be written)

To be written...

6.2.2. Advanced Package Diagrams (To be written)

To be written...

6.2.2.1. Subpackages (To be written)

To be written...

6.2.2.2. Adding DataTypes (To be written)

To be written...

6.2.2.3. Adding Stereotypes (To be written)

To be written...

6.3. Creating Package Diagrams in ArgoUML

6.3.1. Packages

How to work out what goes in packages. To be written...

6.3.1.1. Subpackages (To be written)

To be written...

6.3.2. Relationships between packages (To be written)

To be written...

6.3.2.1. Dependency (To be written)

To be written...

6.3.2.2. Generalization (To be written)

To be written...

6.3.2.3. Realization and Abstraction (To be written)

To be written...

6.3.3. Advanced Package Features (To be written)

To be written...

6.3.3.1. Creating New Datatypes (To be written)

To be written...

6.3.3.2. Creating New Stereotypes (To be written)

To be written...

6.4. More on Class Diagrams (To be written)

To be written...

6.4.1. The Class Diagram (To be written)

To be written...

6.4.1.1. Class Attributes (To be written)

To be written...

6.4.1.2. Class Operations (To be written)

To be written...

6.4.2. Advanced Class Diagrams (To be written)

To be written...

6.4.2.1. Realization and Abstraction (To be written)

To be written...

6.5. More on Class Diagrams in ArgoUML (To be written)

6.5.1. Classes (To be written)

More on identifying classes from existing materials and use of stereotypes. To be written...

6.5.2. Class Attributes and Operations (To be written)

To be written...

6.5.2.1. Class Attributes (To be written)

To be written...

6.5.2.2. Class Operations (To be written)

To be written...

6.5.3. Advanced Class Features

6.5.3.1. Operations on Interfaces

6.5.3.1.1. Interfaces that extend interfaces

Add a unnamed interface to the current classdiagram by single-clicking on the interface icon in the tool bar and then clicking at the diagram pane (see Figure 6.1, “Selecting the Interface tool”).

Figure 6.1. Selecting the Interface tool

Selecting the Interface tool

Then double click on the interfaces name field to change it's name as shown in Figure 6.2, “Interface model element on the Class Diagram”

Figure 6.2. Interface model element on the Class Diagram

Interface model element on the Class Diagram

and type a name for it (like TestInterface in this case). Press “Enter” when the name is complete. (You could also enter the name by going to the Properties Tab in the Details Pane after adding the interface.)

Add another interface with a different name by repeating the last 2 steps. Then single-click on the Generalization icon in the tool bar as shown in Figure 6.3, “Generalization on the Class Diagram tool bar”.

Figure 6.3. Generalization on the Class Diagram tool bar

Generalization on the Class Diagram tool bar

Move the mouse pointer to the subinterface, press the left mouse button and drag the generalization to the superinterface, where you release the mouse button. The screenshot of Figure 6.4, “Generalization between two Interfaces.” shows how your diagram should look now.

Figure 6.4. Generalization between two Interfaces.

Generalization between two Interfaces.

By clicking on the subinterface and the source tab properties pane, and then selecting Java Notation for the source tab, you can see that the interface actually extends it's superinterface.

6.5.3.2. Stereotypes (To be written)

To be written...

6.6. Sequence and Collaboration Diagrams (To be written)

[Note]Note

Sequence diagrams does not work in ArgoUML version 0.14.

To be written...

6.6.1. More on the Sequence Diagram (To be written)

To be written...

6.6.2. The Collaboration Diagram (To be written)

To be written...

6.6.2.1. Messages (To be written)

To be written...

6.6.2.2. Actions (To be written)

To be written...

6.6.3. Advanced Collaboration Diagrams (To be written)

To be written...

6.7. Creating Collaboration Diagrams in ArgoUML (To be written)

6.7.1. Collaboration Diagrams (To be written)

To be written...

6.7.2. Messages (To be written)

To be written...

6.7.2.1. Actions (To be written)

To be written...

6.7.3. Advanced Collaboration Diagrams (To be written)

To be written...

6.8. Statechart Diagrams (To be written)

To be written...

6.8.1. The Statechart Diagram (To be written)

More on this. To be written...

6.8.2. Advanced Statechart Diagrams (To be written)

To be written...

6.8.2.1. Actions (To be written)

To be written...

6.8.2.2. Transitions (To be written)

To be written...

6.8.2.2.1. Triggers (To be written)

To be written...

6.8.2.2.2. Guards (To be written)

To be written...

6.8.2.2.3. Effectss (To be written)

To be written...

6.8.2.3. Pseudo States (To be written)

To be written...

6.8.2.3.1. Junction and Choice (To be written)

To be written...

6.8.2.3.2. Fork and Join (To be written)

To be written...

6.8.2.4. Hierarchical State Machines (To be written)

To be written...

6.8.2.5. Models for State History (To be written)

Shallow v Deep. To be written...

6.9. Creating Statechart Diagrams in ArgoUML (To be written)

6.9.1. Statechart Diagrams (To be written)

To be written...

6.9.2. States (To be written)

To be written...

6.9.3. Transitions (To be written)

To be written...

6.9.4. Actions (To be written)

To be written...

6.9.5. Advanced Statechart Diagrams (To be written)

To be written...

6.9.5.1. Transitions (To be written)

To be written...

6.9.5.1.1. Triggers (To be written)

To be written...

6.9.5.1.2. Guards (To be written)

To be written...

6.9.5.1.3. Effectss (To be written)

To be written...

6.9.5.2. Pseudo States (To be written)

To be written...

6.9.5.2.1. Junction and Choice (To be written)

To be written...

6.9.5.2.2. Fork and Join (To be written)

To be written...

6.9.5.3. Hierarchical State Machines (To be written)

To be written...

6.9.5.4. History (To be written)

Shallow v Deep. To be written...

6.10. Activity Diagrams (To be written)

To be written...

6.10.1. The Activity Diagram (To be written)

More on this. To be written...

6.10.1.1. Action States (To be written)

To be written...

6.11. Creating Activity Diagrams in ArgoUML (To be written)

6.11.1. Activity Diagrams (To be written)

To be written...

6.11.1.1. Creating an Activity Diagram

Select a use case or class, then you can create an activity diagram.

6.11.2. Action States (To be written)

To be written...

6.12. Deployment Diagrams (To be written)

To be written...

6.12.1. The Deployment Diagram (To be written)

To be written...

6.13. Creating Deployment Diagrams in ArgoUML (To be written)

6.13.1. Nodes (To be written)

To be written...

6.13.1.1. Node Instances (To be written)

To be written...

6.13.2. Components (To be written)

To be written...

6.13.2.1. Component Instances (To be written)

To be written...

6.13.3. Relationships between nodes and components (To be written)

To be written...

6.13.3.1. Dependency (To be written)

To be written...

6.13.3.2. Associations (To be written)

To be written...

6.13.3.3. Links (To be written)

To be written...

6.14. System Architecture (To be written)

To be written...

6.15. Case Study (To be written)

6.15.1. CRC Cards (To be written)

To be written...

6.15.2. Packages (To be written)

To be written...

6.15.2.1. Identifying Packages (To be written)

To be written...

6.15.2.2. Datatypes and Stereotypes (To be written)

To be written...

6.15.3. Class Diagrams (To be written)

To be written...

6.15.3.1. Identifying classes (To be written)

To be written...

6.15.3.2. Identifying associations (To be written)

To be written...

6.15.3.3. Specifying Attributes and Operations (To be written)

To be written...

6.15.4. Sequence Diagrams (To be written)

To be written...

6.15.4.1. Identifying actions (To be written)

To be written...

6.15.5. Collaboration Diagrams (To be written)

To be written...

6.15.5.1. Identifying Messages (To be written)

To be written...

6.15.6. Statechart Diagrams (To be written)

To be written...

6.15.7. Activity Diagrams (To be written)

To be written...

6.15.8. The Deployment Diagram (To be written)

To be written...

6.15.9. The System Architecture (To be written)

To be written...

Chapter 7. Code Generation, Reverse Engineering, and Round Trip Engineering

7.1. Introduction

We now have our design fully specified. With the right simulator we could actually execute the design and see if it works. (ArgoUML does not provide such functionality, but this functionality has been provided in alternative tools.)

ArgoUML does allow you to generate code from the design in several different programming languages. We, most likely, already in the design had a programming language in mind because some of the design considerations are to care for a specific language.

The output of this process is the set of files that constitute the program that solves the problem.

Once again the recursive, and iterative nature of our process means we will come back to the Build phase many times in the future.

There is also another side to this and that is the reverse engineering side. If we happen to have an old program that we would like to examine then we could take the files and reverse engineer them to create a design. This can be used when trying to understand some not so well documented program or as a quick start for the design work.

The process of going back and forth between doing changes in the design followed by a code generation and then doing changes in the code followed by a reverse engineering using for every change, the best possible perspective, is called Round-trip Engineering.

7.2. Code Generation

The output of the Code Generation is the completed program. Depending on the contents of the design, we could also generate Unit test cases.

To do the work we need the design model, containing both static and dynamic descriptions of the program.

7.2.1. Generating Code from the Static Structure

It is rather straightforward to do this generation, at least as long as we do it for an object-oriented language. This is some of the basic rules:

  • A class will become a class.

    In some target languages (like java, c++) they also become files and compilation units.

  • A generalization will become an inheritance.

    If the target language does not support inheritance and we didn't address this during the design, some special conversions are required to solve this.

  • An attribute will become a member variable.

  • A navigable association will become a member variable.

    Depending on the target language, target platform, and the association multiplicities this will be a pointer, a reference, a collection class, an entry in some table or map.

  • A non-abstract operation in a class will become a method.

  • An abstract operation in a class will become an abstract method.

  • An in parameter in an operation will become a parameter in the method.

    For simple types (int, boolean), this is the normal case. For C++, these will probably const classes. For Java, this cannot be enforced for classes.

  • An out or in/out parameter in an operation will become a referenced parameter in the method.

    For C++, these will be referenced non-const parameters. For Java classes, this is the default. Simple types (int, boolean) must, in java, be converted to an object of a corresponding class (Integer, Boolean).

  • The visibilities of the attributes, associations, and operations will become visibilities on the member variables or methods.

  • Packages will become directories, namespaces, or both.

7.2.2. Generating code from interactions and state machines

This conversion is not as straight-forward as the conversion of the static structure. It is much more depending on the target language and target platform.

In general it is only possible to say the following for interactions:

  • A message is converted into a function call.

    The class of the recipient will have to have a function with the correct name and signature.

    The sender function in the class of the sender will have a call to the function in the recipient.

  • An asynchronous message is converted to either posting a message to be handled by some other thread or a function call to a function that starts a new thread.

The following describes one possible way to generate state machines:

  • A State Machine is generated to a set of member variables that each method in this class refer to when deciding behavior.

  • A State is generated to a closed set of combination of values on these member variables.

  • An Event is generated as a call to a member method that can change the state.

    These methods would then typically have one big switch statement splitting on the current state.

  • A Guard is generated to an if statement in the event member method in the branch for the correct state.

  • A Transition is generated as an assignment of some state variable.

  • An Action is generated as a function call.

7.3. Code Generation in ArgoUML

7.3.1. Static Structure

Most of the generation can be done automatically by the provided language modules. Files are generated in a directory hierarchy that need to be filled in by the actual code.

7.3.2. Interactions and statechart diagrams

There is currently no support for this in ArgoUML, not for any language.

7.4. Reverse Engineering

Reverse Engineering is used for two main purposes:

  1. To get previously developed classed into the model to build upon.

  2. To get a UML view of previously developed classes to understand how they work.

Essentially this does the opposite of Code Generation.

7.5. Round-Trip Engineering

Round-Trip Engineering makes it possible to switch perspective while doing the design. Create some classes in a class diagram. Write some code for some of the operations or functions using your favorite editor. Move the operations from one class to another in the class diagram...

ArgoUML currently does not support this for any language.

Part 2. User Interface Reference

Chapter 8. Introduction

This chapter describes the overall behavior of the user interface. Description of the various component parts—the menu bar, panes and various diagrams— is in separate chapters.

8.1. Overview of the Window

Figure 8.1, “Overview of the ArgoUML window” shows the main ArgoUML window.

The titlebar of the window shows the following 4 parts of information, separated from each other by a dash.

  • The current filename. If no filename for the project is set yet, then the titlebar shows "Unititled".

  • The name of the currently active diagram.

  • The name “ArgoUML”.

  • An asterisk (*). This item is only present if the current project file is “dirty”, i.e. it is altered, but not yet saved. In other words, if the asterisk is absent, then the current file has not been altered.

Figure 8.1. Overview of the ArgoUML window

Overview of the ArgoUML window

At the top of screen is a menu bar, which is described in Chapter 10, The Menu bar. Below that is the toolbar, as described in Chapter 9, The Toolbar.

The bulk of the window comprises four sub-windows or panes. Clockwise from top left these are the explorer (see Chapter 11, The Explorer), editing pane (see Chapter 12, The Editing Pane), details pane (see Chapter 13, The Details Pane) and to-do pane (see Chapter 14, The To-Do Pane). All 4 panes have a tool bar at the top (in the details pane it is located under the properties tab). An overview of the panes is given in Section 8.3, “General Information About Panes”. Finally at the bottom of the window is a status bar described in Section 8.4, “The status bar”.

8.2. General Mouse Behavior in ArgoUML

Mouse behavior that is specific to the various panes of ArgoUML (see Section 8.3, “General Information About Panes”) or the menu bar, is discussed in the chapters covering those panes and the menu bar. In this section we cover behavior that is general across all of ArgoUML.

In a number of places in ArgoUML text may be directly edited (for example the constraint editor—see Section 13.7.1, “The Constraint Editor”). The behavior of the mouse when handling text is discussed in the sections that follow.

8.2.1. Mouse Button Terminology

ArgoUML assumes a two button mouse. We will refer to the buttons as “button 1” and “button 2”. Button 1 is the leftmost button on a right-handed mouse, and sometimes referred to as the select button. Button 2 is the rightmost button on a right-handed mouse, and is sometimes referred to as the adjust button.

A single depress and release of a mouse button with the mouse is referred to as a click. Two clicks in quick succession is referred to as a double click. Moving the mouse while holding a button down is referred to as button motion with the starting point being at button down and the end point at button up.

8.2.2. Button 1 Click

Clicking on an user-interface object or on a diagram model element may establish many different things. Most of the behaviour is experienced quite intuitive by the user, mainly because the high degree of standardisation, even spanning different computer platforms (Macintosh, PC, UNIX,...). ArgoUML follows the Java Look and Feel Design Guidelines by Sun. See http://java.sun.com/products/jlf/. Hence, behaviour of common user-interface components is generally not discussed in this document.

On the other hand, mouse actions in a diagram may not seem so intuitive to the user, since it is specific for ArgoUML. Hence they are explained here. In short, clicking selects or activates the object beneath the mouse-pointer, and moves the focus (i.e. navigation).

More in detail, the button 1 click may cause the following result:

8.2.2.1. Selection

Here button 1 is used to choose (select) a model element (in a list or tree or on a diagram) on which subsequent operations will take place. Multiple model elements may be selected by using Shift and/or Ctrl in combination with button 1, see Section 8.2.5, “Shift and Ctrl modifiers with Button 1”. Selection is always clearly indicated by a colored background.

On a diagram, the selected model element is indicated with colored "blocks" at the corners/ends of the object. Model elements can be selected or deselected in different ways:

  • Button 1 click. Deselects all model elements, and selects the one clicked on.

  • Button 1 motion. Button motion (moving the mouse with the button down) in the diagram, not on any model element, allows to draw a rectangle around model elements which will be selected when the button 1 is released.

  • Menu functions and shortcuts. Many menu operations change selection as side-effect, e.g. creating a new diagram. Many keyboard shortcuts for menu operations change the selection, e.g. Ctrl-A, which stands for the Select All function.

8.2.2.2. Activation

Here button 1 is used to activate the user interface component, e.g. a button. The object is usually highlighted when the mouse button is pressed and then activated when the mouse button is released. Activating an user-interface object means that its function is executed.

8.2.2.3. Navigation

Here button 1 is used to move the focus from one user interface component or diagram model element to another. It is better known under the term keyboard focus. This because keyboard commands usually work on the model element that has the focus. The focus is indicated by a (hardly visible) box around the model element, or for a text entry box, by a flashing cursor.

8.2.2.4. General Behavior When Editing Text

Here button 1 is used to select the point within the text at which operations (text entry and deletion) will take place.

8.2.3. Button 1 Double Click

The behavior of button 1 double click varies betweens panes and is discussed in their chapters.

8.2.3.1. General Behavior When Editing Text

Here button 1 double click is used to select a complete word, or other syntactic unit within the text. Subsequent operations (text entry and deletion) will replace the selected text.

8.2.4. Button 1 Motion

8.2.4.1. General Behavior When Editing Text

Here button 1 motion is used to select a range of text. Subsequent operations (text entry and deletion) will replace the selected text.

8.2.5. Shift and Ctrl modifiers with Button 1

8.2.5.1. Within Lists

This behavior applies where there is a list of things that may be selected. This includes various dialog boxes, and the to-do pane, where there is a list of to-do items to be selected.

Where selections are to be made, the SHIFT key is used to with button 1 to extend from the original button 1 selection to the current position.

Similarly the CTRL key with button 1 is used to add individual items to the current selection. Where Ctrl-button 1 is used on an item already selected, that item is removed from the selection.

[Caution]Caution

Users of Microsoft Windows might be familiar with the use of SHIFT-CTRL-Click (i.e. holding both the Shift and Ctrl key down when clicking), to add sub-lists to an existing selection. ArgoUML does not support this. SHIFT-CTRL-Click will behave as CTRL-Click.

8.2.5.2. General Behavior When Editing Text

In a number of places in ArgoUML text may be directly edited (for example when naming a model—element in the properties pane, or when typing a UML note / comment). Here SHIFT button 1 is used to select a range of text from the previously selected point. Subsequent operations (text entry and deletion) will replace the selected text.

8.2.6. Alt with Button 1: Panning

When holding down the Alt key during button 1 down on a diagram, movement of the mouse pans the drawing area. The function is indicated by the mousepointer which turns into a crosshair with arrows.

8.2.7. Ctrl with Button 1: Constrained Drag

When holding down the Ctrl key while dragging with mouse button 1 down on a diagram, the movement of the dragged element element will be constrained to one of eight cardinal directions : North, South, East, West, NE, SE, SW, NW.

8.2.8. Button 2 Actions

Button 2 actions are all dependent on the pane or menu bar, and discussed in their various chapters.

8.2.9. Button 2 Double Click

Button 2 actions are all dependent on the pane or menu bar, and discussed in their various chapters.

8.2.10. Button 2 Motion

Button 2 actions are all dependent on the pane or menu bar, and discussed in their various chapters.

8.3. General Information About Panes

The four sub-windows of the main ArgoUML window are called panes. Clockwise from top left these are the explorer (see Chapter 11, The Explorer), editing pane (see Chapter 12, The Editing Pane), details pane (see Chapter 13, The Details Pane) and to-do pane (see Chapter 14, The To-Do Pane). At the top the editing pane is a tool bar.

8.3.1. Re-sizing Panes

You can re-size panes by dragging on the divider bars between them. To indicate this possibility, the mouse cursor changes shape when hovering over the divider bars.

In addition you will see there are two small left pointing arrows within the vertical divider bars, one at the top of the vertical divider bar between explorer and editing pane and one at the top of the vertical divider bar between to-do pane and details pane. Button 1 click on the first of these will expand the editing pane to the full width of the window, button 1 click on the second will expand the details pane to the full width of the window.

There is also a small downward pointing arrow within the horizontal divider bar at its leftmost end. Clicking on this will expand the explorer and editing panes to the full depth of the window.

By using both the top arrow on the vertical divider and the arrow on the horizontal divider, it is possible to expand the editing pane to use the entire window.

The original configuration can be restored by clicking again on these arrows, which are now located at the edge of the window.

8.4. The status bar

The status bar is at the very bottom of the ArgoUML window and is used to display short advisory messages. In general such messages are self explanatory. It is e.g. used for displaying parsing error messages in case a text entered on the diagram can not be interpreted.

Chapter 9. The Toolbar

9.1. File operations

These buttons have identical functions as their counterparts in the File menu.

9.2. Edit operations

These buttons have identical functions as their counterparts in the Edit menu.

9.3. View operations

The Find... button has identical behaviour as its counterpart in the View menu. The Zoom button is a more luxurously version of the function in the View menu.

  • Find... See for a full description Section 10.5.2, “ Find...”.

  • Zoom This is a different version of the menu-item for zooming, as described in Section 10.5.3, “Zoom” . Clicking with button 1 on the zoom-icon opens a panel as in the figure below.

    Figure 9.1. The Zoom slider on the Toolbar

    The Zoom slider on the Toolbar

    Once the panel is open, the following actions are possible:

    • Clicking with button 1 on the "knob" followed by button 1 movement will adjust the zoomfactor.

    • Clicking with button 1 on the shown percentage allows editing the given zoomfactor (in percent) directly with the keyboard. Double clicking on the value shown selects the whole entry for easy overtyping.

    • Clicking with button 1 below or above the knob increases or decreass the zoom factor with 1%. Use this function to easily fine-adjust the percentage.

    • Clicking with button 1 or button 2 on the Zoom tool, or anywhere outside the slider panel closes the panel.

    • The keyboard can be used to operate the Zoom Slider as follows: When the Zoom icon in the toolbar has the focus (indicated by the thin blue box around it), then pressing the spacebar opens the zoon slider panel. Use the arrow keys to increase and decrease the percentage 1 by 1. Use Shift-Tab to set the focus to the percentage box, where you can edit the given value directly. Pressing Enter activates the changed value. When the "knob" has the focus, pressing PageUp/PageDown increases/decreases the percentage by some amount. Pressing Home sets the percentage to 300%, and End sets it to 25%.

9.4. Create operations

These buttons have identical functions as their counterparts in the Create menu.

Chapter 10. The Menu bar

10.1. Introduction

An important principle behind ArgoUML is that actions should be able to be invoked in whatever way the user finds convenient. As a result many (but not all) actions that can be carried out on the menu can be carried out in other ways as well under ArgoUML.

A number of the common menu entries are also available through keyboard shortcuts.

It is also be possible to navigate the menu from the keyboard. Each level of each menu is identified by a letter (shown underlined in the menu or entry name from the moment the ALT key is pressed). This sequence of letters while holding down the ALT key selects the entry.

The following is an explanation of why the menuitems are grouped as they are.

  • The File menu contains operations that affect on the whole project/file. All the items in this menu can be explained as such.

  • The Edit menu is generally intended for editing the model or changing the content of a diagram. It also contains functions to enable editing, like e.g. selecting. This menu is not intended for diagram layout functions. Most functions here do something with the selected modelelement and diagram. The items "Configure Perspectives..." and "Settings..." are a bit different, since they adjust the way ArgoUML works - but they do not belong in the File menu, since their settings are not stored in the project.

  • The View menu is for functions that do never alter the model, nor the diagram layout, only the way you view the diagram. A good example is "zoom". Also navigational functions belong here, e.g. "Find" and "Goto Diagram...". All changes of settings in this menu apply to all diagrams (e.g. zoom).

  • The Create menu contains all possible diagrams that can be created. These functions are context dependend, since they work on the selected modelelement.

  • The Arrange menu allows layout changes in the current diagram, which is not the same as the items in the View menu. Functions here can not alter the UML model.

  • The Generation menu is for Code Generation. The functions here work either on the selected modelelements, or on the whole project.

  • The Critique menu is specific for settings related to critics, which apply for all projects.

  • The Tools menu is currently empty. If plugins are installed, then their functions appear here.

  • The Help menu contains the usual "information" and "about".

10.2. Mouse Behavior in the Menu Bar

Behavior of the mouse in general, and the naming of the buttons is covered in the chapter on the overall user interface (see Section 8.2, “General Mouse Behavior in ArgoUML”). There is no ArgoUML specific behaviour for the menu.

10.3. The File Menu

These are actions concerned with input and output and the overall management of projects and the ArgoUML system.

10.3.1.  New

Shortcut Ctrl-N.

This initializes a new project within ArgoUML. The project is created without a the name. It contains a (top-level) Model named untitledModel and two empty diagrams: a class diagram and a use case diagram.

[Caution]Caution

untitledModel is not a conventional model name (most processes suggest models should be build from lower case letters). ArgoUML permits you to use any case letters, but a critic will trigger to warn that this is not conventional. See Section 16.2, “The Model” for a discussion of this.

If the model has been altered (as indicated by the "*" in the titlebar of ArgoUML's window), then activating the "New" function is potentionally not the user's intention, since it will erase the changes. Hence a confirmation dialog appears to allow the user to save his work first, or cancel the operation completely.

Figure 10.1. The confirmation dialog for New.

The confirmation dialog for New.

10.3.2.  Open Project...

Shortcut Ctrl-O.

This opens an existing project from a file. Selecting this menu option will open a file selection dialog (see Figure 10.2, “The file selection dialog for Open Project....”).

Figure 10.2. The file selection dialog for Open Project....

The file selection dialog for Open Project....

The main body of the dialog is a text area with a listing of all directories and files in the currently selected directory which match the current filter (see below).

Navigating in the directory tree is possible by selecting a directory in the drop down selector at the top of this dialog. Navigating deeper in the tree may be done by double clicking button 1 on the directory shown in the main text area.

In the lower portion of the dialog is a text box labeled File name: for the name of the file to be opened. The file name may be typed directly in here, or selected from the directory listing above using button 1 click.

Beneath this is a drop down selector labeled Files of type: to specify a filter on the files to be shown in the directory listing. Only files that match the filter are listed. The available filters are listed below. The default filter is the first one, which combines all available formats.

  • ArgoUML file (*.zargo, *.uml, *.xmi, *.xml, *.zip)

  • ArgoUML compressed project file (*.zargo)

  • ArgoUML project file (*.uml)

  • XML Metadata Interchange (*.xmi)

  • XML Metadata Interchange (*.xml)

  • XMI compressed project file (*.zip)

10.3.3.  Save Project

Shortcut Ctrl-S.

This saves the project using its current file name. Use Save Project As... to save the project to a different file. If no filename is given yet (e.g. after New), then this function works exactly as Save Project As....

[Note]Note

In certain circumstances, there is nothing to save, and this menuitem is downlighted. E.g. when the user did not yet alter a loaded project. The presence of a “*” in the titlebar of ArgoUML's window indicates that the current project is “dirty” (has been altered), and can be saved.

10.3.4.  Save Project As...

This opens a dialog allowing you to save the project under a different file name (or to specify a file name for the first time if the project is a new project).

The dialog box is almost identical to that for Open Project (see Figure 10.2, “The file selection dialog for Open Project....”). The extension of the filename is automatically set.

10.3.5. Revert to Saved

This menu-item allows you to throw away all your recent changes, and reload the last saved version of the current project. It works a bit like an Undo feature, but only restores changes done since the last time the file was saved.

This menu-item is downlighted unless the currentproject has been saved or loaded before (i.e. it has a name), and it has been altered.

When this menu-item is activated, a small confirmation dialog box opens, as shown in the figure below. This warning that all recent changes will be discarded, is needed because the action can not be undone. Selecting No cancels the whole action as if you did not select the menu-item in the first place. Selecting Yes reloads the last saved file.

Figure 10.3. The warning dialog for Revert to Saved.

The warning dialog for Revert to Saved.

10.3.6. Import XMI...

This menu-item allows to load an UML 1.3 or 1.4 model which was exported by e.g. another tool, as a XMI file, according the XMI V1.0, V1.1 or V1.2 standard. The extension of such file should be .xmi.

If the model has been altered (as indicated by the "*" in the titlebar of ArgoUML's window), then activating the "Import XMI..." function is potentionally not the user's intention, since it will erase the changes. Hence a confirmation dialog appears to allow the user to save his work first, or cancel the operation completely.

Figure 10.4. The confirmation dialog for Import XMI....

The confirmation dialog for Import XMI....

When the menu is activated, the standard filechooser appears, see Figure 10.5, “The dialog for Import XMI....”. Beware the fact that this file will only contain the model, not any diagram layout. Hence, the new project will not contain any diagrams.

Figure 10.5. The dialog for Import XMI....

The dialog for Import XMI....

10.3.7. Export XMI...

This menu-item allows to save the complete structure of the UML 1.4 model as a XMI file, according the XMI V1.2 standard. Beware the fact that this file will only contain the model, not any diagram layout. Hence, if the XMI file is reloaded with the File - Open Project... menu, then the diagrams are lost.

When the menu is activated, the standard filechooser appears, see Figure 10.6, “The dialog for Export XMI....”.

Figure 10.6. The dialog for Export XMI....

The dialog for Export XMI....

10.3.8.  Import Sources...

A very powerful feature of ArgoUML is that it can “Reverse Engineer” Java code to yield a class diagram. This sub-menu entry specifies Java code to be imported for reverse engineering.

The dialog box is similar to that for Open Project (see Figure 10.2, “The file selection dialog for Open Project....”), but with two extra tabs placed alongside the directory listing, as shown in Figure 10.7, “The file selection dialog for Import Sources....”).

Figure 10.7. The file selection dialog for Import Sources....

The file selection dialog for Import Sources....

Those fields that are the same as Open Project behave in the same way (see Section 10.3.2, “ Open Project...”).

Next to the "All Files" file filter, there is the default filter "Java Source File (*.java)".

The first of the two tabs is labeled General and is selected by button 1 click on its tab. It provides a combo box for the language selection (in V0.18 of ArgoUML only Java can be chosen), and the following selections:

  • Descend directories recursively. If enabled (the default), reverse engineering will track through sub-directories for any further Java files. If not it will restrict to the selected directory.

  • Changed/new files only. If enabled (the default), only changed and new files are imported. If not all classes will be replaced.

  • Create diagrams from imported code. If you unselect this, then no diagrams are created, i.e. all data will only be visible in the explorer.

  • Minimise Class icons in diagrams. If enabled, then the attributes and operations compartiments will not be shown in the classes on the generated class diagrams. Note: This item is checked by default, and is overseen by many users, which are then surprised by the result.

  • Perform Automatic Diagram Layout. If selected, then ArgoUML will do its best to layout the generated diagrams automatically. If not, then all items will be placed at the top left corner of the diagram.

  • Level of import detail: Classifiers only / Classifiers plus feature specifications / Full import. The latter is the default.

  • Import source file encoding:. The value Cp1252 is often the default. This string represents the coded character set identifier (CCSID).

The second of the two tabs is labeled Java and is selected by button 1 click on its tab. It provides two pairs of radio boxes.

  • The first radio box allows selection between modeling attributes of Java classes as UML attributes (the default) or as UML associations to the class specified.

  • The second radio box allows selection between modeling arrays as new datatypes in their own right (the default) or as their base datatype with multiplicity.

10.3.9.  Page Setup...

This brings up the standard dialog box provided by the operating system to adjust printer paper size, orientation, and other options.

10.3.10.  Print...

Shortcut Ctrl-P.

This brings up the standard dialog box provided by the operating system allowing the current diagram to be printed out.

In some cases, when the printing is started, the dialog box of Figure 10.8, “The diagram exceeds page size dialog.” appears. Selecting the "Fit to page" button does print the whole diagram fitted on one page by scaling it down. Which might cause all text to be too small to read in case of big diagrams, but it is a quick and easy way to get an usable printout. Selecting the "Multiple pages" option does print unscaled, by dividing the diagram in pieces, on as many pages as needed. Pressing the close button of the dialog does the former option.

Figure 10.8. The diagram exceeds page size dialog.

The diagram exceeds page size dialog.

[Warning]Warning

If the current diagram contains no selected model elements, then the whole diagram is printed. However, if one or more model elements are selected, then only the area they cover is printed! If scaling is selected (by the "Fit to page" choice in the dialog box descibed above), then the scaling is done on basis of the selected model elements only. If scaling is not chosen (or in case it is not needed), then all pages containing a selected model element are printed.

10.3.11. Export Graphics...

This menu entry brings up a dialog box allowing the currently selected diagram (in the editing pane) to be saved in one of a number of graphic formats.

The dialog box is identical to that for Open Project (see Figure 10.2, “The file selection dialog for Open Project....”), except for the Files of type:. The chosen filetype specifies the graphics format used for saving. The filename is automatically extended with the corresponding ending (if not entered already). A default filename is generated based on the diagram name.

The available graphics types are:

  • GIF image (*.gif)

  • Encapsulated Postscript file (*.eps)

  • PNG image (*.png)

  • Postscript file (*.ps)

  • Scalable Vector Graphics file (*.svg)

The graphics format that is selected by default is set in the dialog under the menu entry Edit - Settings...

10.3.12. Export All Graphics...

This menu entry brings up a dialog box to select a directory. In this directory, for all diagrams in the current project, a graphics file is generated.

The names of the files are deducted from the diagram names. The graphics format that is produced is set in the dialog under the Edit menu (see Section 10.4.5, “ Settings...”).

10.3.13. Notation

This sub-menu presents a radio button selection for notation, i.e. the language in which all textual adornments are shown on the diagrams.

This feature defines the project's notation language.

There are 2 ways to set the notation language:

  • In the Edit menu, see Section 10.4.5.7, “Notation Tab” in the notation tab of the settings dialog, which defines the default notation language for new projects. This choice is stored in the argo.user.properties file in the .argouml directory under the user's home directory.

  • In the File menu, item Notation. This determines how all textual adornments of figures on all diagrams of the current project are shown. This choice is stored in the project file.

The following 2 notations are build in ArgoUML:

  • UML 1.4. Uses UML notation as the default notation for every modelelement on any diagram.

  • Java. Uses Java notation as the default notation for every modelelement on any diagram.

The following choices are only available if the corresponding plugin languages are installed.

  • Cpp.

  • CSharp.

  • PHP.

Besides UML, only Java is partly implemented in V0.22 of ArgoUML.

10.3.14.  Project Properties

This menu entry brings up a dialog box, which allows the user to set various options of the currently loaded project.

All settings in this dialog are stored in the project-file together with the model.

Figure 10.9. The dialog for Project Properties - the User tab.

The dialog for Project Properties - the User tab.

In the User tab, you are able to set the following fields:

  • The first field contains the name of the author or responsible for the current project. By default the name and email of the creator are filled in, so probably you will never need to edit this, but it is possible.

  • The Project Description field may contain any text that you need to describe the project. By default it is empty.

  • The "Last saved with ArgoUML" field indicates the version of ArgoUML that was used to save this project (the last time it was saved). This may be usefull if multiple designers have different versions of ArgoUML, which may not be backwards compatible all the time.

Figure 10.10. The dialog for Project Properties – the Profiles tab.

The dialog for Project Properties – the Profiles tab.

In the Profiles tab, you are able change the following settings:

  • The type of “Stereotype Visualization” for the project, which may be textual, small or with big icons.

  • The UML profiles which are configured in the project – model elements of these UML profiles may be referenced in the project.

Figure 10.11. The dialog for Project Properties - the Notations tab.

The dialog for Project Properties - the Notations tab.

In the Notations tab, you are able to set the following fields:

  • The first field is a combobox that allows selection of the project's Notation language. By default, it lists UML and Java, but other languages may be added by plugins. See the chapter on Notation for more explanation: Section 12.11, “Notation”.

  • Use guillemots (« ») for stereotypes (clear by default). By default ArgoUML uses pairs of less than and greater than (<< >>) characters for stereotypes. If this box is checked stereotypes on diagrams are shown between true guillemots (« »).

    This feature is presumably added to ArgoUML because guillemots are poorly supported by various fonts, and if they are present, then they are quite small and poorly visible.

  • Show visibility (clear by default). If this is selected, then ArgoUML will show the visibility indicators in front of e.g. attributes in the diagram. In UML the notation is "+" for public, "-" for private, "#" for protected, and "~" for package. E.g. for an attribute, it may show: +newAttr : int.

  • Show multiplicity (clear by default). If this is selected, then ArgoUML will show the multiplicity of e.g. attributes in the diagram. In UML notation, the multiplicity is shown between [], such as: +newAttr [0..*] : int. This setting has no impact on showing multiplicity near associationends.

  • Show initial value (clear by default). If this is selected, then ArgoUML will show the initial value of e.g. attributes in the diagram. In UML notation, the initial value is shown e.g. like this: +newAttr : int = 1.

  • Show properties (clear by default). If this is selected, then ArgoUML will show various properties between braces {}. E.g. for an attribute, it may show: +newAttr : int { frozen }.

  • Show types and parameters (set by default). When this checkbox is unmarked, attributes in classes are shown without type indication, and operations are shown without parameters. This feature may be usefull during the analysis phase of your project. If all checkmarks in the Notation Tab are unchecked, then e.g. for an attribute, ArgoUML may show: newAttr. And for an operation: newOperation().

  • Show stereotypes in explorer (clear by default). If this is selected, then ArgoUML will show stereotypes next to the icons of the modelelements in the Explorer, i.e. the tree structure at the left hand side.

  • Default shadow width (set to 1 by default). ArgoUML is able to draw all elements on a diagram with a shadow, for esthetical reasons. Use this setting to adjust the size of the shadow, used when the modelelement is created. The details tab "Presentation" allows to set the shadow per modelelement, after they are created, but ArgoUML V0.22 does not retain this latter change after save and load.

Figure 10.12. The dialog for Project Properties – the Diagram Appearance tab.

The dialog for Project Properties – the Diagram Appearance tab.

In the Diagram Appearance tab, you are able change the diagrams font.

10.3.15. Most Recent Used Files

ArgoUML remembers a few of the most recently saved files, and lists them here, to enable loading then in the most simple way.

The maximum number of files that is listed here, can be adjusted in the Edit -> Settings... menu. The list of files is stored in the argo.user.properties file in the .argouml directory under the user's home directory.

10.3.16. Exit

Shortcut Alt-F4.

This closes down ArgoUML. A warning message will pop-up if you have a project open with unsaved changes asking if you wish to save it. See Figure 10.13, “The save changes dialog.”. The options are:

  • Yes (save the project and exit ArgoUML);

  • No (do not save the project, but still exit ArgoUML); and

  • Cancel (do not save the project and do not exit ArgoUML).

  • The dialog box can also be closed by clicking in the close button in the window border. The effect is the same as selecting "Cancel".

Figure 10.13. The save changes dialog.

The save changes dialog.

10.4. The Edit Menu

This menu provides support for selecting model elements on the editing pane; removal of model elements from diagrams and the model; and control of user settings.

10.4.1. Select

This sub-menu provides for selection of items on the editing menu. It has the following entries.

  • Select All (shortcut Ctrl-A). Selects all model elements on the current pane or in the current field. The exact behaviour depends on the current pane (i.e. the last one you clicked in): explorer pane, editing pane, to-do pane, details pane. One rule applies in all cases though: the selection on the diagram (editing pane) and in the explorer are always synchronised.

    If the editing pane is the current pane: First everything in the explorer and on the current diagram is deselected, and then everything that is on the current diagram is selected (and if the same items apear in the explorer, then they are also there indicated as selected, because they are always synchronised).

    If the explorer pane is the current pane: All visible items in the explorer pane are selected, and non-visible items are deselected.

    If the to-do pane is the current pane: All visible items in the to-do pane are selected, and non-visible items are deselected. In fact, this works the same as for the explorer pane, because both are tree structures.

    If the details pane is the current pane: The function only works when the cursor is in certain fields, where selecting is possible, e.g. a Name field. In such a case, the Select All function extends the current selection to the whole field contents.

  • Navigate Back. ArgoUML keeps a record of the model elements that you have been selecting while navigating the model. This button moves you back to the previous one selected. If there are no more previous model elements, the button is grayed out.

  • Navigate Forward. ArgoUML keeps a record of the model elements that you have been selecting while navigating the model. This button moves you forward to the next one selected (after you have used the Navigate Back button to move back). If there are no more next model elements, the button is grayed out.

  • Invert Selection. This inverts the current selection on the current pane. More exact: everything that was selected is de-selected and everything that was not selected within the current pane is selected.

10.4.2.  Remove From Diagram

Shortcut Delete.

This removes the currently selected item(s) from the diagram, but not from the model.

The modelelement can be re-added to the diagram by button 2 click on the modelelement in the explorer, or by dragging it onto the diagram.

10.4.3.  Delete From Model

Shortcut Ctrl-Delete.

This function deletes the selected item(s) from the model completely.

If the item to be deleted is also present on another diagram than the current one, the dialog box from figure x appears.

Figure 10.14. The dialog for confirmation of Remove from Model.

The dialog for confirmation of Remove from Model.

10.4.4.  Configure Perspectives...

This menu-item invokes the same dialog as the button at the top of the explorer. See Section 11.5, “Configuring Perspectives”. for a complete description.

10.4.5.  Settings...

This menu entry brings up a dialog box, which allows the user to set various options that control the behavior of ArgoUML (see Figure 10.15, “The dialog for Settings - Preferences.”).

These settings are saved persistently for use by subsequent ArgoUML sessions.

ArgoUML has various user specific configurations that can be set in this dialog box, or directly on the various panes. Also the main window size and location is such a setting. Activating this menu entry causes the information to be saved in the file argo.user.properties. The location of this file is in the .argouml directory under the "users home directory", which is defined as ${user.home} , and can be determined as described in Section 10.4.5.2, “Environment Tab” .

[Tip]Tip

This is a text file, which you can edit to configure ArgoUML.

Figure 10.15. The dialog for Settings - Preferences.

The dialog for Settings - Preferences.

The options that can be set up on the various tabs are described in the following sections. For each tab there are three buttons at the bottom of the dialog box.

  • OK. Activating this button (button 1 click) applies the chosen settings and exits the dialog.

  • Cancel. Selecting this button (button 1 click) exits the dialog without applying any settings changed since the last Apply (or since the dialog started if Apply has not been used).

  • Apply. Selecting this button (button 1 click) applies the chosen settings and remains in the dialog.

Closing the dialog (with the close button in the top corner in the border of the window) causes the same effect as Cancel.

10.4.5.1. Preferences Tab

Selecting the Preferences tab (button 1 click on the tab) gives the following options as check boxes.

  • Show Splash Panel (set by default). If enabled ArgoUML will show a small panel with a picture while starting up.

    [Tip]Tip

    The splash panel can be seen by using the Help menu (see Section 10.11.2, “About ArgoUML” ).

  • Reload last saved project on startup (clear by default). Check this item if you always work on the same project, and wish to load it automatically when you start up ArgoUML.

  • Strip (non-standard) diagrams from XMI file during import (clear by default). Checking this item will tell ArgoUML to ignore the "Diagram" elements when importing XMI files.

    You only need to use this setting, if ArgoUML gives an error while importing your XMI file saying that it encountered unrecognized elements named "Diagram." Some versions of Poseidon are known to create this type of file by default although there's usually an export option to force them to create standard XMI files.

10.4.5.2. Environment Tab

Selecting the Environment tab (button 1 click on the tab) lists several environmental items. Note that none of the paths can be altered — these are just a matter of record.

Figure 10.16. The dialog for Settings - Environment.

The dialog for Settings - Environment.

  • Default Graphics Format. Here you can select the same graphics formats as in the menu Section 10.3.11, “Export Graphics...”. The chosen format is selected by default in the Export Graphics and Export All Graphics menu-items.

  • Graphics Export Resolution. This allows you to artificially increase the resolution of produced graphics. The advised setting is "Standard". To be able to use "High" or "Extra High", you usually need to start the Java virtual machine with extra memory.

  • ${argo.ext.dir}. The directory holding ArgoUML extensions—by default the ext sub-directory of the ArgoUML build directory.

  • ${java.home}. The home directory of the Java Runtime Environment (JRE).

  • ${user.home}. The user's home directory. Used for storing the argo.user.properties file, under the .argouml directory.

  • ${user.dir}. The directory from which ArgoUML was started.

  • Startup Directory. The directory in which ArgoUML starts file searches etc.

10.4.5.3. User Tab

This tab allows the user to record additional information of use to the system. There are two text boxes provided.

Figure 10.17. The dialog for Settings - User.

The dialog for Settings - User.

  • Full Name. Allows the user to record her full name.

  • Email Address. Allows the user to record his Email address.

This information is used when requesting to-do help by Email.

10.4.5.4. Appearance Tab

This tab allows the user to specify the LAF (Look And Feel) and theme, i.e. what the complete ArgoUML UI looks like. It comprises the following settings.

Figure 10.18. The dialog for Settings - Appearance.

The dialog for Settings - Appearance.

  • Look and Feel. The choice made here influences the complete User Interface. It only becomes effective when ArgoUML is exited and restarted.

  • Metal Theme. This item is downlighted if the Metal LAF is not chosen. The choice made here influences the complete User Interface. It only becomes effective when ArgoUML is exited and restarted.

  • Smooth edges of diagram lines and text. This feature is known as “anti-aliasing” on certain platforms. It causes diagonal lines to look much less jagged, by making use of several shades of gray. This feature only works if the operating system supports it.

10.4.5.5. Profiles Tab

In this tab the user may configure the ArgoUML application settings related to the profiles.

Figure 10.19. The dialog for Settings - Profiles.

The dialog for Settings - Profiles.

  • Stereotype Visualization – select to view stereotypes as text, small or big icons.

  • Default XMI directories – allows the user to configure directories where ArgoUML can find the user defined profiles.

  • Default Profiles – select which profiles from the available profiles are configured in new projects by default.

10.4.5.6. Configure Shortcuts Tab

(To Be Written)

Figure 10.20. The dialog for Settings - Configure Shortcuts.

The dialog for Settings - Configure Shortcuts.

10.4.5.7. Notation Tab

This tab allows the user to specify certain notation settings, i.e. how things are shown on diagrams. It comprises the following check boxes.

All settings here, only define the defaults used for new projects. If you want to change the way the diagrams in your current project look, then see the File - Properties menu.

Figure 10.21. The dialog for Settings - Notations.

The dialog for Settings - Notations.

  • Notation Language ( UML 1.4 by default). This feature allows changing the default notation (i.e. language: UML, Java,...) used on the diagrams for new projects. Suppose that a designer indicates that the default notation of a project is Java. When he saves the project, the choice for Java is stored inside the project file. If someone else is viewing the diagram, he will see the Java notation, too. This person can select the UML notation in the File - Notation menu, and see all diagrams in UML language. See Section 10.3.13, “Notation”).

  • Show name of nodes in bold font.

    This feature causes the names of every node (i.e. something drawn with a closed polygon) to be bold.

    There is no semantics to showing bold names, but it may make your diagrams look nicer.

  • Use guillemots (« ») for stereotypes (clear by default). By default ArgoUML uses pairs of less than and greater than (<< >>) characters for stereotypes. If this box is checked stereotypes on diagrams are shown between true guillemots (« »).

    This feature is presumably added to ArgoUML because guillemots are poorly supported by various fonts, and if they are present, then they are quite small and poorly visible.

    Independent of the way they are shown, when entering stereotypes, you can always type real guillemots (if your keyboard supports it) or their << >> equivalents.

  • Show association names.

    This feature causes the names of every association to be hidden if not marked.

  • Show visibility (clear by default). If this is selected, then ArgoUML will show the visibility indicators in front of e.g. attributes in the diagram. In UML the notation is "+" for public, "-" for private, "#" for protected, and "~" for package. E.g. for an attribute, it may show: +newAttr : int.

  • Show multiplicity (clear by default). If this is selected, then ArgoUML will show the multiplicity of e.g. attributes in the diagram. In UML notation, the multiplicity is shown between [], such as: +newAttr [0..*] : int. This setting has no impact on showing multiplicity near associationends.

  • Show initial value (clear by default). If this is selected, then ArgoUML will show the initial value of e.g. attributes in the diagram. In UML notation, the initial value is shown e.g. like this: +newAttr : int = 1.

  • Show properties (clear by default). If this is selected, then ArgoUML will show various properties between braces {}. E.g. for an attribute, it may show: +newAttr : int { frozen }.

  • Show types and parameters (set by default). When this checkbox is unmarked, attributes in classes are shown without type indication, and operations are shown without parameters. This feature may be usefull during the analysis phase of your project. If all checkmarks in the Notation Tab are unchecked, then e.g. for an attribute, ArgoUML may show: newAttr. And for an operation: newOperation().

  • Show stereotypes in explorer (clear by default). If this is selected, then ArgoUML will show stereotypes next to the icons of the modelelements in the Explorer, i.e. the tree structure at the left hand side.

  • Show "1" multiplicities.

    This feature allows the user to select if he wants to show all multiplicities that are "1" to be shown or not..

    Some people consider not showing the multiplicity as "undefined". So, the only way to differentiate between a multiplicity of 1 and an undefined multiplicity, is to mark this checkbox.

  • Hide arrowheads for bi-directional associations..

    The UML standard defines different ways to indicate navigability of an association on diagrams. Presentation option 1 is to show all arrows (i.e. you can only navigate in a certain direction if an arrow is drawn), presentation option 2 is to show no arrows at all, and presentation option 3 is to show only an arrow if the association is unidirectional.

    Before the release of version 0.26, ArgoUML could only use presentation option 3. Currently, the user can choose between option 1 and 3. Option 2 is not supported.

    In the past, option 3 was used most often in other UML tools, but nowadays option 1 is more common.

  • Default shadow width (set to 1 by default). ArgoUML is able to draw all elements on a diagram with a shadow. Use this setting to adjust the size of the shadow, used when the modelelement is created. The details tab "Presentation" allows to set the shadow per modelelement, after they are created.

10.4.5.8. Diagram Appearance Tab

(To Be Written)

Figure 10.22. The dialog for Settings - Diagram Appearance.

The dialog for Settings - Diagram Appearance.

10.4.5.9. Modules Tab

This tab shows a list of modules that are installed, which may be enabled or disabled. Since this is a new concept for ArgoUML, it currently contains a list of modules that can not be removed, and a button to test the concept. Pressing this button adds a useless menu-item on the Tools menu, nothing else.

Notice also that this is a "new" modules concept so the old Pluggable modules do not work this way, and are not listed.

10.4.5.10. Extra Tabs added by Plugins

A plug-in module has the possibility to add extra tabs. One example is C++; it adds the following tab.

Figure 10.23. The dialog for Settings - C++.

The dialog for Settings - C++.

10.5. The View Menu

This menu is used for actions that affect how the various panes are viewed.

10.5.1. Goto Diagram...

This menu entry brings up a dialog box, describing all the diagrams in the current project under ArgoUML.

Figure 10.24. The dialog for Goto Diagram....

The dialog for Goto Diagram....

The dialog box contains a table with three columns and one row for each diagram in the current project. A scroll bar gives access if the table is too long for the box. Double button 1 click on any row will select that diagram in the editing pane. The three columns are as follows.

  • Type. Lists the type of diagram.

  • Name. Lists the name given to the diagram.

  • Description. Shows how many nodes and edges there are on the diagrams. A node is a “2-D” model element and an edge is a connector model element.

This dialog box is not modal, which allows it to remain open while editing the model for easy navigation.

[Warning]Warning

The V0.26 implementation of ArgoUML does not immediately update the dialog box with changes made to diagrams: change of name, addition of diagrams, deletion of diagrams.

10.5.2.  Find...

This menu entry brings up a non-modal dialog box for the ArgoUML search engine.

Figure 10.25. The dialog for Find....

The dialog for Find....

The Name and Location specifies the search to be made. It contains the following:

  • A text box labeled Element Name: specifies the name of the model element to search for. Wild cards (*, ?) may be used here. A drop down gives access to find expressions previously used.

  • A text box labeled In Diagram: specifies which diagrams are to be searched. Again wild cards may be used. Both these two text boxes have a default entry of *, i.e. match anything.

  • To the right of these two text boxes, a selector labeled Element Type: allows you to specify the UML metaclass for which you are searching.

  • A selector labeled Find in: allows the search to be made over the entire project (the default) or as a sub-search over the results of a previous search. When opened, a list of all the search result tabs appears.

  • Beneath these boxes is the button Clear Tabs. This clears the display of tabs with the results from previous searches (see below). This button is downlighted if there are no tabs but the Help tab.

  • And finally, there is the button Find. This causes the search specified in the text boxes and selectors above to be executed. The results are displayed in a tab taking up the lower two thirds of the page.

The lower two thirds of the dialog comprises an initial tab (labeled Help) giving summary help, and further tabs displaying the results of searches. These search tabs are labeled with a summary of the search element in diagram and are divided horizontally in two halves.

Button 1 double clicking on these tabs removes the tab, and spawns a new window that contains the tab contents, i.e. the search results. This window can be moved and sized at will. This does not work for the help tab.

The top half is labeled Search Results: followed by a count of the number of items found. It comprises a table with one row for each model element and four columns. The width of the columns can be adjusted.

  • Type. Lists the type of model element.

  • Name. Lists the name given to the model element.

  • In Diagram. Where the model element is visible on a diagram, this lists the name of the diagram, otherwise it shows N/A.

  • Description. Contains a description of the model element. In ArgoUML V0.18 this seems to be restricted to the single entry docs.

Button 1 click on any row will give more information on that model element by showing related model elements in the bottom half (see below). Double click on any row describing a model element on a diagram and that item and diagram will be selected.

The bottom half of the tab is a table labeled Related Elements: and is a table with the same columns as the top half. When a model element has been selected in the top half, this table shows the details of any related elements.

[Tip]Tip

Enlarging the dialog vertically shows that the "Related Items" part changes in size, but not the Search results part. However, between them is a divider line and when hovering over this line, the mouse pointer changes into a sizing icon, and the border between these 2 areas can be moved up or down to redistribute the space in the window.

[Warning]Warning

This dialog box is not modal, which allows it to remain open while editing the model for easy navigation. But the V0.26 implementation of ArgoUML does not immediately update the dialog box with changes made to the found model elements: change of model element name, change of diagram name. Deletion of a diagram does not stop the possibility to navigate to it.

10.5.3. Zoom

This entry brings up a sub-entry, which allows scaling the view of all diagrams to a factor of its normal size. This setting is not saved persistently.

The sub-menu items that can be selected are:

  • Zoom Out. Shortcut (Ctrl-Minus). Gives more overview over the drawing.

  • Zoom Reset. Returns to the default zoom ratio (i.e. 100%).

  • Zoom In. Shortcut (Ctrl-Plus). Makes the items on the drawings bigger.

10.5.4. Adjust Grid

This allows selection of the grid representation on the screen between the following:

  • Lines 16: full grid at 16 pixel spacing.

  • Lines 8: full grid at 8 pixel spacing.

  • Dots 16: dots at 16 pixel spacing (the default).

  • Dots 32: dots at 32 pixel spacing.

  • None: no grid of any form.

10.5.5. Adjust Snap

This allows selection of the spacing of grid snapping between the following:

  • Snap 4: snap at 4 pixel spacing.

  • Snap 8: snap at 8 pixel spacing (the default).

  • Snap 16: snap at 16 pixel spacing.

  • Snap 32: snap at 32 pixel spacing.

[Note]Note

There is no option to turn off snap to grid altogether

[Note]Note

If you wish to align existing elements to changed snap boundaries, you can use the Arrange > Align To Grid Snap menu (see Section 10.7.1, “Align”).

10.5.6. Page Breaks

This toggles whether page breaks are shown on the diagram (as white dotted lines).

[Warning]Warning

This menu item does not work in ArgoUML V0.26.

10.5.7. Toolbars

This menu allows the user to hide or show any of the bars at will. By default, all of them are shown.

10.5.8. XML Dump

This activates a window that shows the complete contents of the current project in XML format.

Although very useful for debugging ArgoUML, this menu function is hardly interesting to the common user.

10.6. The Create Menu

This menu provides for creating the various types of UML diagrams supported by ArgoUML.

10.6.1.  New Use Case Diagram

This menu entry creates a blank use case diagram, and selects that diagram in the editing pane. If a package is currently selected, then the use case diagram will be created within that package. This means that it will be shown within the package on the explorer hierarchy (under Package-centric view) and model elements created on the diagram will be created within the namespace of the package. This does not only apply to a package, but also to a class, interface, use case, etc.

[Tip]Tip

This does not prevent model elements from other namespaces/packages appearing on the diagram. They can be added from the explorer using Add to Diagram from the button 2 pop-up menu.

10.6.2.  New Class Diagram

This menu entry creates a blank class diagram, and selects that diagram in the editing pane. If a package is currently selected, the class diagram will be created within that package. This means that it will be shown within the package on the explorer hierarchy (under Package-centric view) and model elements created on the diagram will be created within the namespace of the package. This does not only apply to a package, but also to a class, interface, use case, etc.

[Tip]Tip

This does not prevent model elements from other namespaces/packages appearing on the diagram. They can be added from the explorer using Add to Diagram from the button 2 pop-up menu.

10.6.3.  New Sequence Diagram

This menu entry creates a blank sequence diagram, and selects that diagram in the editing pane. It also creates a Collaboration UML element, which is a container for the elements shown on the new diagram. If a class is currently selected, a sequence diagram and a collaboration will be created that represent the behaviour of that class. This means that the created elements will be shown within the class in the explorer hierarchy (under Package-centric view) and model elements created on the diagram will be created within the namespace of the collaboration. A sequence diagram may not only represent the behavior of a class, but also of any other classifier, such as interface, use case, etc. It is also possible to make sequence diagrams for an operation.

10.6.4.  New Collaboration Diagram

This menu entry creates a blank collaboration diagram, and selects that diagram. It also creates a Collaboration UML element, which is a container for the elements shown on the new diagram. If a package is selected when this menu item is activated, the collaboration diagram will be created within a collaboration within that package. This means that it will be shown within the collaboration within the package on the explorer hierarchy (under