Chapter
5 |
Configuration
settings |
|
CHAPTER
CONTENTS
|
About configuration
settings
Together enables you to control several different types of configuration
settings:
-
Options are frequently-desired or often-used
customization settings that you can set from a dialog in the Together user
interface.
-
Search Paths are lists of system paths that
Together searches for such things as classes and source code files.
-
Configuration Properties
are less-often needed system-level customization settings that you must
modify directly in the configuration properties file.
Options
Global options
To configure options globally:
-
From the Main menu, choose Edit | Options... to display Together Global
Options dialog.
-
Modify the current options settings on the various tabs as desired. (For
information on the tabs and options, see Options
dialog.)
-
If you want changes to be effective only for new diagrams from now
on, click OK. If you want changes to affect new diagrams and all
existing diagrams in the current project (assuming a project is open),
click Apply All.
TIP |
New diagrams are created with the set of local options taken from global
setting. The new global settings override them when you click Apply
All. This covers implicitly created Package diagrams for each subdirectory
in the project. |
Local options
To configure local options for the current diagram:
-
Browse to the desired diagram using the Navigation
pane.
-
Choose Diagram Options from the Diagram
context menu of the Diagram
pane.
-
Modify the current options settings on the various tabs as desired and
click OK. (For information on the tabs and options, see Options
dialog.)
TIP |
Changes show and apply for the current diagram only overriding current
global options settings. |
Common Options
All available options are documented in the Help topic for the Options
dialog. The current topic takes a brief look at two of the more commonly
sought options.
Switching between UML
and Coad notation
Together supports both UML and Coad notations for diagrams. You can set
the notation globally or locally
for individual diagrams. Open the appropriate Options dialog (as described
above) and choose the desired notation option on the Diagram tab.
Customizing context
menus with launch commands
You can customize the context menus of different types of project elements
to contain commands that launch other applications. Elements that are components
of diagrams append launch commands to the context menu of the corresponding
diagram icon. Elements that are represented on the Navigation pane's project
tree append launch commands to the context menu of corresponding tree-view
nodes (source files, for example).
To add a launch command to an element context menu:
-
Open the Global Options dialog (Edit | Global Options).
-
Select the Tools tab of
the Options dialog box.
-
From the Tool launch command(s) for list, choose a type of project
element. The launch command you create in the next steps will appear on
the context menus of all elements of this type.
-
Click the Add button.
-
In Label for context menu, enter the text you want to appear on
the context menu of the selected element type.
-
In Commands, enter the appropriate operating system command required
to launch the application that you want the menu command to run.
-
In Parameters, enter any command line parameters needed to run the
target application in the manner you desire. Combine static text with macro
parameters.
-
Click OK to accept changes.
Search Paths
Search paths are lists of system path specifications that are searched
for classes, source code files or libraries. When you first create a project,
Together suggests a default path specification for all search paths,
which you can modify immediately in the New
Project dialog box. If you need to change these specifications later,
you can do so using File | Project Properties on the Main menu.
The type of search path(s) accessible for modification depends upon
the product version and the target programming language of the currently
open project.
Java
You should add to the Source and Class paths when base or standard classes
are (or will be) imported into your project, and you want to include them
at some point in the diagrams you create for your project. Unless you specify
the locations for imported classes, Together shows only those classes in
your project's directory tree.
Note that classes on the search paths outside the project tree do not
automatically display in diagrams. You must import such classes using the
Import dialog.
To edit the Class and Source paths:
-
From the Main menu, choose File | Project Properties... to display the
Project Properties dialog.
-
Edit the path specifications to include the necessary paths to classes
or source files. Separate multiple path specifications in the edit controls
with the character appropriate to your operating system.
-
Click OK to close the dialog and update the search paths.
TIP |
If you plan to work with a part of a Project, create a new
project in a subdirectory and specify the base project directory in
Source paths. This enables you to properly access the classes with the
qualified name. |
C++
When your product/project uses C++ you can change the specification
of the Include path to includeclasses, source files, and libraries
that reside outside the current project directory tree. To edit the Include
path for a C++ project, choose File | Project Properties from the Main
menu and edit the Include path field in the Project
Properties dialog.
Object COBOL
When your product/project uses OCOBOL you can change the specification
of the Source path to source files and libraries
that reside outside the current project directory tree. To edit the Source
path for a COBOL project, choose File | Project Properties from
the Main menu and edit the Source path field in the Project
Properties dialog.
Configuration Properties
Configuration properties for the Together system are stored
in the file config.properties located in the lib subdirectory
of your Together installation. The default settings of all properties
here are adequate for most users, but you can do a wide range of customizations,
if you are so inclined, by directly editing the various settings in this
file. Things you can control here include:
-
Size of tab spacing for text editor
-
Tag names of Inspector properties and the order of property fields
-
Property editor types (string, combo box, etc.)
-
Contents of Inspector combo box lists for stereotypes
-
Extensions of parsed and generated files
-
File types excluded from parsing and Parser Blueprints
-
List of standard Types
-
Color coordinates for object stereotypes
-
Auto-renaming of source files (when class name changes)
-
Blueprints for class generating diagram elements
-
Blueprints for generating and parsing links
The config.properties file is
extensively commented. Studying the file structure and the comments should
enable you to do the customizations you desire. Here are several configurations
that you may want to consider.
Changing the Inspector
property tag name
Suppose you would prefer the note property for Classes to be labeled
as Comment in the Inspector. To make this change, open config.properties
in a text editor and find the following line:
inspector.all.tag.all.Class.note = Multistring
Above or below this line add a new line as follows:
inspector.all.tag.all.Class.note.name = "Comment"
You will find some properties in config.properties that have an existing
.name setting. For example:
inspector.all.tag.all.AssociationLink.clientRole.name = "client
role"
By changing the string within the double quotes you change the tag display
in the Inspector.
Note: You can change the order of property fields in the Inspector
by changing the relative position of the corresponding line in the appropriate
section of config.properties. For example, for a Class you could
switch the positions of version and author.
Changing property
editor types
Suppose after changing note to Comment, you decide you want
comments kept brief. You can change the property editor from a multi-line
string list to a single string editor. Again, locate the line:
inspector.all.tag.all.Class.note = Multistring
and change it to:
inspector.all.tag.all.Class.note = String
Populating stereotype
select lists
A number of element properties have combo box type property editors for
default. The values for the drop-down select list are specified in config.properties
when the lists are user-modifiable. For example:
inspector.all.tag.all.AssociationLink.clientCardinality.values
= 0..1,1,*,1..*
This line populates the select list for an Asociation link's client
cardinality property. The individual values are delimited with a comma
as you can see. If you preferred, you could change this line to:
inspector.all.tag.all.AssociationLink.clientCardinality.values
= 0..1,1,M,1..M
However, the main things you may want to configure in this way are the
select lists for stereotype. You can configure stereotype
lists for:
-
Class (has default values already)
-
Attribute
-
Operation
-
Package (has default values already)
-
UseCase
-
Actor
-
State
Search the config.properties file for stereotype.value to
locate the configurable stereotypes. Then add a comma-delimited list of
values after the = sign. For example:
inspector.all.tag.all.State.stereotype.values = MyValue1,MyValue2,MyValue3
Reloading configuration
properties
Changes to config.properties take effect the next time you start
Together. However, if you edit and save config.properties
during a Together work session, you can reload the modified system
properties in the current session.
To reload configuration properties:
-
On the Main menu, choose Edit | Reload Options
A corresponding information message is written to the Message log that
the properties have been reloaded. Click the Messages button to view the
list.
Note: Properties are reloaded but not necessarily applied.
Changes to Inspector property tags are updated when you click on any
element in the current diagram. To apply changes to blueprints or view
maps you need to call Update Diagrams from the Class Diagram
context menu.
About configuration
settings
Options
Understanding the
Options dialog box
Global options
Local options
Common options
Switching between
UML and Coad notation
Customizing context
menus with launch commands
Search paths
Configuration Properties
Changing Inspector's
property tag names
Changing property
editor types
Populating stereotype
select lists
Reloading configuration
properties
© 1997-98
This page is hosted by the Chair for Applied Software Engineering of the Technische Universität München.
Imprint (Impressum)