Together is highly extensible by means of an open Java API that enables you to write Java programs that use model information from Together, and/or interact with Together itself to extend its native capabilities. Such programs are called modules. Many of Together's own features as implemented this way, and the architecture makes it for you to add your own modules, or modules developed by third parties. Some Together products include modules that enable integration between Together and third-party software products.
Module development can take two forms:
Compiled: Written in Java and compiled using a Java compiler. Compiled modules use the same JVM as Together at runtime. Because this method delivers better performance and more depth (you have the full capabilities of the Java language at your disposal) it is preferred over scripted modules.
Interpreted: Written in TCL or JPython, such modules (referred to as scripts) are interpreted by appropriate Together subsystems at runtime. (Note: support for these scripting languages may be dropped in future releases of Together. Use Java for any long-term extension development.)
Modules are stored in the subdirectories under $TOGETHER_HOME$/modules/com/togethersoft/modules. You can view all of the modules included in your Together installation using the Modules tab of the Explorer. This tab displays several folders:
System: contains all the
modules that are part of Together itself
Sample:
contains sample modules and scripts (including some source files)
Early access: contains modules that are "in the works"...either not fully implemented, undocumented, or both.
The following table shows how modules are represented in the Modules tab.
|
|
Java source file for a module. Can be compiled on the fly from speedmenu "Run" if a compiler is configured. |
|
|
Compiled Java module |
|
|
TCL script. "Run" executes the script in interpreted mode. |
For more information about the Modules tab, see Getting Started Guide: Explorer: Modules tab.
The modules contained in the System folder are incorporated into the Together menu system or run from dialogs. Some, such as those for Rose Import/Export and Documentation Generation appear on the main Tools menu. Others, such as Generate Sequence Diagram, are found on appropriate speedmenus (in this case, the speedmenu of an Operation in a class).
You can run any module (or script) from the Modules tab speedmenu. For modules or scripts that reference or process model information (as most will), you should open a Together project before running.
To run a module (or script):
Navigate to and select the desired module or script (see Getting Started Guide: Explorer: Modules tab) .
Right-click on the node and choose Run.
If you have defined a Java compiler in Tools configuration options (Options | Default - Tools), you also can compile Java source code for a module "on the fly" when you choose run on the speedmenu.
You can also run modules using the command line interface. For more information, see Reference: Command Line Parameters.
You can write your own modules that access model information to generate model and code documentation in custom formats, export to different file formats, or develop patterns and wizards.
If you create your own modules and save them to the any directory under ./modules/com/togethersoft/modules, they will appear in the Modules tab and you can run them from there. You can also add commands for launching your own modules to the menu system by creating a Tool definition in the Options dialog (Options | Default | Tools), or by customizing the ./config/menu.config and/or ./config action.config file.
For more information see Introduction to Module development.