Creating and opening a project

This section explains how to open an existing Together project and create new projects. If you are new to Together, please read Project basics before you create or open a project.

IMPORTANT: If you are opening a project that was created with Together 2.x using version 3.x (or above) for the first time, do not open any project until you have read Important Info for Together 2.x Users.

Opening existing projects

To open an existing Together project:

  1. Start Together if not already running.

  2. From the Main menu, choose File | Open Project to display the file selection dialog for your operating system.

  3. Navigate to the primary root directory containing the project (.tpr) file.

  4. Select the project file (e.g. myProject.tpr) and click Open or Save (depending on OS)

Together opens the project and displays the contents in the Model tab of the Explorer. If the Saved Desktop option is enabled in your configuration options, any diagrams that were open when the project was closed re-open in the Diagram pane.

Tip: You can also navigate to a project file in the Directory tab of the Explorer
and double-click to open it (or use the speedmenu).

New projects

You can create a new Togeher project "from scratch", from an existing code base, or some of both.

New projects "from scratch"

When there is no extsting code to reverse engineer, project creation is quite simple. In many cases you need only specify a primary root directory for the project. You can do this in the defaulot mode of the New Project dialog. If you decide you want the new project under version control, or if you want any external resources (headers, libraries, etc.) to be available to the project, you'll need to specify this in the dialog's Advanced mode (see Advanced Mode below).

New projects using existing code

When creating a Together project for an existing code base, think first about what you want as modifiable content, and what you want as read-only content, i.e., shown in diagrams but not modified from within Together. Also think about what content should be round-trip engineered.

For example, in a Java project where some of your classes extend Java classes or some component classes, you might want to show those dependencies in your visual model, but you would not modify the parent classes. You might also want to include some or all of the classes residing on your Java classpath in your diagrams, or you might want to see classes or diagrams from another Together project but not modify them in the new project. If you compile classes from inside Together, you need all the recources required by your compiler available to the project, but not necessarily parsed during round-trip engineering.

The resources available to the project are specified as paths. Content can include classes and/or Together diagrams residing in different physical directories on one device, or on different devices. For each resource you define, you can specify whether or not to allow modification. If you want classes form a physical directory but not all of the subdirectories under it, you can exclude specific

Together provides this kind of flexibility when creating new projects, and when modifying existing projects. You can add or remove project resources as needed (without deleting any physical files), and you can control what resources can be modified within the context of the project. You will find this especially useful when dealing with extremely large code bases with dozens of directories and hundreds of classes. (See User's Guide: Project Management: Large Projects).

Basic and Advanced dialog modes

The New Project dialog offers two modes: basic (the default mode) and Advanced. Use basic mode when...

Use Advanced mode to...

Creating a new project

To begin creating a new project:

  1. From the Main menu choose File | New Project to display the New Project dialog. The dialog displays in Basic mode.

Using basic mode

The basic mode of the New Project dialog is fairly self-explanatory.

  1. Enter a name for the project in the Project Name field. This should be a legal filename for your operating system. The Location field now displays a default path. This is where Together will create the project file and initial and default diagrams. If you want to change the location click Browse and navigate to an existing directory where you want to store the project file and default project diagram. You can also use the dialog to create a new directory for the project (on most OS platforms).

  2. If necessary use Browse to specify the location of the project directory. This can be any existing directory, or you can use the dialog to create a new one. Remember that basic mode's default means everything in and under the project directory is at least reverse engineered, and is modifiable (unless it's read-only at the OS level).

  3. If you want to create an initial diagram (other than the <default> package view diagram) along with the new project, select the type in the Initial diagram list. Otherwise, select None. (Note: Together Whiteboard will only create a Class diagram.)

  4. If you have a multi-language product, specify the target programming language for the project in Default Language. When you choose a language, any language-specific options available display next to the language selection.

  5. The project now contains one root directory- the primary root as specified in steps 1 and 2. If you don't need to include any other directories as part of the project, click OK to create the project. If you want to specify other directories as part of the project or remove some added with language options, proceed to Advanced mode.

If you clicked OK at this point, the project file with the filename you specified and the initial diagram (with the same name) are created in the specified directory (called the project directory). The project file has a .tpr extension and displays with the icon in the Explorer. At a later time, you can modify the project, adding additional resource roots, etc. from the Project Properties dialog (File | Project Properties).

Using Advanced mode

The New Project dialog's Advanced mode lets you control what resources are available to, and included as part of, the new project and how these resources are treated dring round-trip engineering. You can also specify which project in your configured version control system to use for source files that are part of the new Together project.

To use Advanced mode:

  1. Follow steps 1-4 in Basic Mode above.

  2. Click the Advanced button in the New Project dialog to toggle Advanced mode.

Adding or removing resources

The Project Paths and Search/Classpath tabs display the lists of the directories and/or archive files currently included as resources available to the project. By default, the path specified in Location (near the top of the dialog) is present in the Project Paths, and the path to the standard libraries are present in the Search/Classpath list. Checking "Include Classpath" adds your classpath directories to the list. For editions that include components, the Include Components box is enabled and checking it adds the component directories to the list.

Items in the Project Paths list are considered as project roots. Roots contain compiled or source classes and/or Together diagrams. Project roots are parsed during reverse engineering and treated as modifiable unless you specify otherwise in the other controls (see Resource options below).

The Search/Classpath list displays resources that reside on the classpath (as defined in your envionemt) and on any other paths you want Together to search for resources. These resources are available to show in diagrams but are not part of the project. They are not parsed, and do not show as project content in the Explorer unless they are added to a diagram as a shortcut. Also, their content is not modifiable within the project context.

Tip: If you will use an integrated compiler/debugger, make sure all the resources needed by the tool are included in the Search/Classpath list .

To add a resource directory to the project:

  1. Click the Add Path button to display the Select Path dialog.

  2. Navigate to the directory you want to include in the project.

  3. Click Open or Select, depending on the OS you are running on.

Note that all subdirectories of the specified resource directory are included by default. You can exclude some specific subdirectories by either of two following ways.

In Java projects, some project resources may reside in compressed Zip or JAR archive files.

To add an archive file as a project resource:

  1. Slelect either the Project Paths or Search/Classpath tab of the Resources section of New Project (or Project Properties) dialog

  2.  

    Click the Add Zip/JAR button to display the Select Path dialog.

  3. Navigate to the directory containing the archive file.

  4. Select the desired file.

  5. Click Open or Select, depending on the OS you are running on.

Removing resources

You can remove any resource from the Project Paths list or the Search/Classpath list by selecting it and clicking the Remove button. This is useful if, for example, you included your full Java classpath but that contains some directories that you really don't need in the new project. Removed resources are not deleted from disk... they are just not available to the project. If you need them again, you can add them later using File | Project Properties (Advanced mode).

Setting Resource options

After you have added resources to the project you can set some options that control how they are parsed and how you access them when modeling. By default, parsing of all the paths in the Project Paths list includes all recognized file types, and all resources are parsed as part of the project and display in the Explorer's Model tab. If that default behavior is not what you want, you can modify the treatment of each of the resources in the Project Paths list.

To set options for a resource, select it in the Project Paths list and modify any or all of the following:

See also: