Together comes with a multi-page built-in code/text editor with a set of standard and extended features. You can switch between tabs by clicking on tab's header, located right under the editor.

These commands are available from the main Edit menu, or the speedmenu of Editor. You can use hot-key combinations to speed up access to a particular command.
|
Command |
Function |
Hot-key |
|
Undo |
Rolls back last several changes. |
Ctrl-Z |
|
Redo |
Reinstates last Undo operations. |
Ctrl-Y |
|
Cut * |
Cuts selected text to Clipboard. |
Ctrl-X |
|
Copy * |
Copies selected text to Clipboard. |
Ctrl-C |
|
Paste * |
Pastes text from Clipboard at the cursor position. |
Ctrl-V |
|
Delete |
Deletes selected text. (Restore with Undo) |
Del |
|
Select All |
Selects all the text in the currently focused file |
(none) |
|
Insert Text From File |
Displays standard "Open File" dialog to pick up the file containing the text to be inserted. |
(none) |
|
Go To Line |
Displays dialog to specify a line number, then jumps to the specified line number |
Ctrl-G |
Editor speedmenu commands
The Editor speedmenu contains a number of commands, some of which are self-explanatory or highly intuitive (Save, Save As, Cut, Copy, Paste, Select All, Close, Close All), while others require some brief explanation.
New: Creates and focuses a new Editor tab with a new, untitled file in memory. The typing is in plain text. Leaves other open editor tabs open.
Open: Displays a standard "Open File" dialog. If the selected source file is part of the currently open project, it will be opened in the active tab, and text in active tab will be replaced. If the selected file is not part of the project, it will open in a new tab.
Preserve Tab: Appears on the page tab speedmenu and the Editor speedmenu of source files that are part of the current project. It is not present in the speedmenus of other files opened in the Editor. This allows you to prevent the contents of active tab from being replaced with another file when you use the "Open..." command. When you select this command, another "Untitled" tab is opened and then you can safely use "Open..." menu command.
Format Source: Performs syntax formatting of the source code in active tab.
Tools: Contains a sub-menu with a list of tools you can apply to active tab. You can configure tools using "Tools" tab of Together Options Dialog.
Commands for the Integrated Debugger
The Editor interacts with the Integrated Debugger by means of several speedmenu commands:
Toggle breakpoint (F5): Toggles breakpoint to the current line of source code.
Disable/Enable breakpoint: Disables or restores a set breakpoint.*
Breakpoint properties: Allows you to edit breakpoint's properties.*
Run to cursor (F4): This begins or continues program execution till the current line of source code.
*(Hidden when no breakpoints are set in the file)
The Editor provides the following advanced features:
Rectangular blocks
(Ctrl-L): Gives you the capability to work with
rectangular blocks. Ctrl-L key combination toggles rectangular block
capabilities on and off. Any time you need to work with a rectangular
block, press Ctrl-L, then select the desired block of text with your
mouse, or by holding down the Shift key and using arrow keys. When
rectangular block capabilities are no longer needed, press Ctrl-L
again to switch to normal block mode.
User
defined code template expansion (Ctrl-F9):You
can define as many code templates as you wish and then use them
easily in your code by typing the template name and then pressing
Ctrl-F9. See Defining Code Templates
in this chapter.
Code
Sense (Ctrl-Space):This allows you to auto-complete
methods of standard Java classes. See Using
Code Sense in this chapter.
Browse symbol allows
to pass on to the source code of a class, attribute or operation.
Bookmarks: mark specific lines in files and navigate to them from any file in the project.
Note: you can change the hot keys for extended features using "Editor" tab of the Options dialog. See Configuring the Editor for more information.
You can configure the Editor using the Options dialog at any of the multiple configuration levels. On the Main menu choose Options | [level ], where level is the configuration level at which the settings will apply ( Default for example) . Select the Editor tab (displays as Text Editor in some builds). You will see the following nodes representing the main categories of configuration options for the Editor:
Options:
General Editor configuration options
Keyboard: a
set of options for customizing Editor hot-key combinations
Schemes: a set of options with sub-options enabling you to customize colors, indentation, and text formatting for text editing and programming languages.

Expand the Options node to view and modify general configuration options for the Editor.
Expand this node to view the current settings for keyboard shortcuts that invoke Editor commands. You can redefine the settings to fully customize keyboard shortcuts for the Editor.
This node presents a tree of option subnodes. Use these options to tune the Editor for working with different contents:
Plain: for plain text files
Java:
for Java source code files
C++: for
C++ source code files
IDL: for Interface Definition Language files
For each of these types of text you can set up color schemes, Code Templates for programming languages, and common Editor parameters such as Tab Size, Right Margin, etc. The Editor will automatically pick up the particular scheme depending on type of file is loaded and focused in the Editor.
Use code templates to significantly speed up the process of
developing your applications. Define as many templates as you want.
Then, while coding in the Editor, you type the name of the template
and press Ctrl-F9 to insert the entire block of code contained in the
template. There are already several default templates for common
constructs in each supported language: if,
for, while, etc.
Don't confuse Code Templates with Blueprints. Blueprints allow you to set up global defaults, including default code fragments, like "/*Generated by Together*/". Blueprints work automatically and all the time, but you invoke Code Templates whenever you want, as needed.
Defining your own templates
Open Options Dialog by choosing Options | Default... menu item.
Select the Editor (or Text Editor) tab.
Expand the Schemes option node in the tree of options.
Expand the node for the programming language you
want to configure to work with templates (C++, Java, or IDL).
Select the Code Template option node to display the Code Template Editor dialog.

Select one of the existing templates listed at left, or click the "+"
(plus) button to add a new template.
If adding a new template, give it a name.
Edit or add the actual code that you want inserted
in your source files when you invoke this template as you work later on.
Define additional properties using Space Expand field.
Click OK when done.
Deleting templates
Complete steps 1-5 listed above.
Select the template name you no longer need at the left.
Click the "-" (minus) button. The selected template is permanently deleted.
The Code Sense feature is currently available in products with Java language support. It helps you to auto-complete references to standard Java classes in Java code, significantly speeds up your coding and helps you avoid syntax errors. Code sense works in two modes: it is invoked by a hotkey stroke (CTRL-SPACE by default), or activated upon delay. This is defined in the Editor tab of the Options dialog, Code Sense and Keyboard nodes.
Example 1
Type System.
With the insertion point cursor placed after the second period character, press Ctrl-Space. The list of available methods for this class is displayed.

Select the desired method with mouse or arrow keys and press Enter. The name of the selected method is inserted into the line.
Example 2
Type System.out.p
With the insertion point cursor placed after the letter p, press "Ctrl-Space". The list of available methods for this class beginning with the letter p is displayed.

Select the desired method with mouse or arrow keys and press Enter. The name of the selected method is inserted into the line.
When you click on a class name or attribute name, Browse Symbol opens the source code of this class and highlights declaration. When you click on an operation name, the source code of the corresponding class opens, highlighting the method signature.
By default, Browse Symbol works with the project classes only. To work with the library classes, it needs additional customization of the $SOURCEPATH$.
In the Tools page of the Options
dialog select the field "Sourcepath" and specify path to
the JDK source jar file. If you JDK home directory is C:\jdk1.2.2,
then the sourcepath will be $SOURCEPATH$$PS$C:\JDK1.2.2\src.jar!/src.
Alternatively,
you can unzip src.jar and specify
path to the source library: $SOURCEPATH$$PS$C:\JDK1.2.2\src.
You can press the Browse button to invoke the Sourcepath dialog. Press "Add Path" button and select the required path from the file chooser.

If you wish to add jar file this way, you will need to edit the field
and append "!/src"
to the end of the sourcepath string.
Press Apply to apply the changes and OK to close
the Options dialog.
The library classes open in read-only tabbed pages.

Breakpoints specify where to stop code execution during debugging to permit inspection of variables, expressions, class members, etc.
There are several ways to set breakpoints in the Editor. In every case, place the insertion point cursor at the beginning of the line of code at which execution should stop, and then...
Click on the extreme left margin next to the line, or...
Press F5, or...
Right-click on the line and choose Toggle Breakpoint from the Editor speedmenu.
When a breakpoint is set, a red dot appears in the extreme left margin.
To remove a breakpoint, place the insertion point cursor at the beginning of the line that has the breakpoint, then use any of the techniques listed above to remove the breakpoint.
Once set, a breakpoint can be disabled or re-enabled using the speedmenu commands Disable Breakpoint and Enable Breakpoint.
You can edit properties of a breakpoint by placing the insertion point in the line containing the breakpoint and choosing the speedmenu command Breakpoint Properties.
You don't need to set a breakpoint that you think you will need only once. Instead you can use the Run to Cursor option to run your application up to a specific line in your program.
To use Run to Cursor:
Place the insertion point cursor at the line where execution should stop.
Press F4 (or choose the Run to Cursor speedmenu command).
You can set bookmarks in your source code files and navigate to them from any open file that is part of your project. You can view, edit, classify, and navigate to bookmarks in the project using the Bookmarks dialog. Once set, the bookmarks are stored in the project profile and will be re-used when the project opens next time.
Bookmarks have lower priority then the breakpoints. It means that if you set a breakpoint and a bookmark on the same line, the breakpoint will override the bookmark and executable line icon.
To set bookmarks:
Open the file to be bookmarked in the Editor.
Scroll to the line where you want to set a bookmark
and place the insertion cursor anywhere on the line.
Right-click and choose Toggle Bookmark from the speedmenu. (Note that the menu command displays a keyboard shortcut which is user-defined in Text Editor options.)
The default bookmark icon displays in the margin. A default bookmark description is saved using up to the first 50 characters of the line. You can edit this description if you wish (see Viewing, Editing, and Classifying Bookmarks below).
To remove a bookmark:
Navigate to the line in the open
file where the bookmark has been set.
Right-click and choose Toggle Bookmark from the speedmenu. (Note that this menu command displays a keyboard shortcut which is user-defined in Text Editor options.)
You
can also remove bookmarks from the Bookmarks dialog (see next section).
Undo/Redo does not apply to bookmarks.
The Bookmarks dialog displays a list of all the bookmarks currently set in files in the current project. In this dialog you can:
Edit the default bookmark description
Reorder the list of bookmarks
Visually classify bookmarks using different icons
Delete individual bookmarks
To display the Bookmarks dialog:
Open any file in the project in
the Editor.
Right-click and choose Show Bookmarks on the speedmenu. (Note that this menu command displays a keyboard shortcut which is user-defined in Text Editor options.)
By default, the Description field for a bookmark contains the characters of the bookmarked line (up to maximum 50 characters). The field has in-place editing, or you can use the Edit Bookmark dialog (invoked from the Bookmarks dialog toolbar) to change the description.
Note: You cannot edit the Line and File fields.
You can change the list order of any bookmark by selecting its row in the Bookmarks dialog and using the Up/Down icons on the dialog's toolbar to reposition the bookmark in the list.
The Bookmark dialog enables you to classify the various bookmarks in your project. A set of icons is provided for this purpose. You can use this icon set to devise any sort of classification scheme that is meaningful to you.
For example, you might use one icon only for bookmarking constructors, another for start of business methods, another for JavaBean getter/setter methods, etc.
When you select a bookmark in the Bookmarks dialog, you can change its associated icon in either of two ways:
In place: click the Icon field
in the list and pause for the drop-down list of available icon variants.
Edit Bookmarks dialog: invoke from the Bookmark dialog's toolbar, then use the Icon drop-down list to change the icon.
The icon you select for each bookmark displays in the margin of the Editor next to the bookmarked line.
Once bookmarks have been set, you can use them to navigate from any open file in the project, to any bookmarked line in other project files.
To navigate to a bookmarked line:
Open the Bookmarks dialog (as
previously described).
Select the
target bookmark in the list.
Click the Go To button.
If the target file is not open, it opens in a new Editor tab and the cursor moves to the bookmarked line. No diagram is opened... just the file.
If the target file is already open in the Editor, the insertion cursor moves to the start of the bookmarked line.
If you have a small number of bookmarks, you can navigate within a single file using hotkeys. CTRL/Grey+ moves forward, CTRL/Grey- moves backwards. Hotkeys do not work for the entire project.

For the ease of editing large files, the you can split the Editor pane into two or four segments, each one with own scroll bars.
To split the Editor pane horisontally, grab the upper right corner of the pane and the drag splitting line down.
If you grab the lower left corner of the pane and drag the splitting line to the right, you can split it vertically.
Typing in any split pane is reproduced in all the other panes.

To remove split you need only to drag the splitting line away.
When you launch Together, the Editor pane fills the entire right side of the Main Window and displays a single tab. A new file "<Untitled>" is open. You can immediately edit and save this file, or you can use the Directory tab in the Explorer or the Editor speedmenu to open one or more other files (see Opening Files below). Files supported by the Editor pane include the source files of the supported language(s), text type files, and configuration files such as *.properties or *.config.
Although you can open and edit source files without opening any project, most of the time you will probably work with diagrams and files in the context of an open Together project.
Using the Editor with an open project
When a project is open, you can have one or more source-generating diagrams open concurrently in the Diagram pane. As you click on source-generating elements in the current diagram, the contents of the Editor updates to display the source code for the selected element. It displays that same file until you select a different source-generating element in the same or another open source-generating diagram.
You may also open non-source diagrams such as Use Case or State concurrently with source-generating diagrams. When you first open a project, the following default Editor pane behavior is in effect:
When you then open or select the tab of a non-source diagram, the Editor pane hides automatically.
If multiple diagrams, some source-generating and some not, are open concurrently, the Editor pane shows when you select a source-generating diagram in the Diagram pane, and hides when you select any other diagram.
This default behavior prevails unless you override it by using the Main Toolbar or View menu to show the Editor pane while you are focused on a non source-generating diagram. From that point on, until the end of the current session, you control the display of the Editor pane using the View menu or Main Toolbar.
Note: If you have a file already opened in some of the Editor's tabs, Together will open the existing tab on attempt to open that file again.
Using 'Preserve Tab'
As noted above, source code files automatically open, replacing the contents of the active tab, when you select source-generating elements in diagrams (classes for example). You can override this default behavior by checking Preserve Tab in the Editor pane speedmenu while the active tab is selected. The current tab remains and a new tab appears named <untitled>. Your next selection of a source-generating element in the diagram opens its source in this new tab (or you can open some other file using the pane speedmenu).
Checking Preserve Tab for a selected tab doesn't prevent you from closing it later. It only means that if you open another file while the tab is active, the other file will open in a new tab thus preserving the flagged tab. This enables you keep several source files from the same diagram open in the Editor pane.
You can open one or more files for editing. Each file opens in its own tabbed page in the Editor pane.
There are several ways to open files for editing:
Right-click on a file name in the Explorer and select Edit or Edit in New Tab from the speedmenu. The file opens in the Editor pane. (Only source code, configuration, and properties files have these speedmenu commands.)
Right click on a file name in the Explorer and select Tools | External Editor. The file opens in the application configured as External Editor in Options: Tools.
Choose Open on the Editor speedmenu and select file from the Open file dialog. The file opens in the Editor pane. (File must be text, not binary.)
Click on a class (interface, link, member, method) in the Diagram pane. The source code opens in the Editor pane tab, highlighting the line that corresponds to the selected element.
To close a file you don't need anymore, select it and choose Close from the Editor pane speedmenu.
The Editor pane has its own speedmenu for opening and saving files and clipboard operations.
You can easily hide or show this pane using the View menu or the Main toolbar.
The Editor pane may be hidden by default depending on the Workspace Role selected in Options : General
Using the Integrated Debugger
Using compile and make from Together
Using Code Templates