The Text pane displays source code contained in the source file currently
selected in the Navigation pane or the Class diagram element currently
selected in the Diagram pane. You can directly edit source code in this
pane. Modifications to such things as class or interface declarations or
values of properties are reflected visually in the diagram to which the
code pertains. When you select a Class icon on the diagram, the Text pane
displays the source code with the Class declaration highlighted. The same
applies for members and interfaces (in Java) .
For Class diagrams, which generate source code, the text pane displays
by default; for other diagrams it is initially hidden. The Text pane has
no context menu.
In a multi-tasking environment, Together automatically saves
changed files when you switch to another application and reloads them when
you switch back. This makes it easy to use your preferred source code editor
in parallel with Together. Note that files are being changed from
the two sources, when you modify visual elements of diagrams (in the Diagram
pane) and/or when you modify directly source code (in the Text pane).
At the bottom of the Text pane is the Status bar. It shows source file
name and path or messages, column and row where cursor is currently positioned
and a status message of the source file (modified, read-only etc.)
Updating the diagram
Whenever you change the source code in the Text pane, click on the Diagram
pane to apply the changes to the diagram. If you change an attribute's
name in the source code, for example, click on the Diagram pane and the
attribute name changes on the icon.
Text that you type in the Text pane, or source code changes you make
in external tools are passed to Together "as is". They are reflected
in Together's diagrams when diagram updating occurs. Diagram updates
are "one-way": from the source code to the visual model.
Understanding the Text pane's limitations
IMPORTANT:
You are fully responsible for the syntactical correctness of changes
you make to source code in the Text pane. As noted above, the changes are
actualized when you click on the Diagram pane. In case of errors, the corresponding
diagram element (along with its selection) disappears. The Message window
displays enabling you jump to the error-prone code and correct it.
Together is primarily a visual modeling tool as opposed to a
programming tool. Together's Text pane is mainly a convenience that
enables you to make quick "tweaks" to your code. It is possible to create
an entire class in the Text pane, but you must then specify its full, complete
declaration and definition. The same applies to operations - you must fully
create its code (as for C++ in two places, declaration and definition).
You will probably find it more productive to create classes and members
using Together's visual tools, or, if you really prefer to typewrite
code, with a third-party source code editor or IDE.
Tips for using the
Text pane
|
Select a source file icon in the navigation Pane to display its code
in the Text pane. |
|
Select an element in a diagram (e.g. a node or link icon, or a Class
or Interface member) to display its declaration source code, if applicable.
Note: C++ elements can have definitions. Shift + click an element to
display its definition source code. |
|
Scroll the pane using its scrollbars. |
|
Resize the pane vertically by dragging its upper edge (also the lower
edge of the Diagram pane). |
|
Resize the pane horizontally by dragging the separator located between
the Toolbar and the Navigation/Inspector region, or by resizing the Browser
window. |
|
Show or hide the pane using the main menu commands: View | Diagram
only, View | Text only and View | Diagram and Text. |
|
Use the basic hot keys to speed
your work in the Text pane. |
International Keyboard notes
Text editing is compatible with different keyboard layouts if you are using
the Microsoft Virtual Machine. All characters that can be entered with
AltGr-num are entered correctly.
-
AltGr-num is now not equal to Ctrl-num.
-
In Norwegian & Deutch layouts (layouts in which characters that can
be entered as Alt-num presently) pressing & releasing AltGr
(without pressing any other key while holding AltGr) leads to switching
to the host window.
-
In English layout this feature is not present any more.