The Component-Watch tool describes the components and structure of java programs. It is based on the six following concepts:
Those five concepts maps to the five main tabs of the Component-Watch tool.
The Component-Watch tool is composed of
View button)Note: the list and detail view are read-only. Any edition must be triggered by a toolbar button (or the edit button in some detail view) and is performed in a separate popup window.
The Project tab shows the status of the currently open project. If a project is opened, the tab shows a list of messages describing project status. This list contains at least one information message showing the number of components defined in the project.
After an analysis, this list shows the number of classes in the classpath plus all warnings/errors encountered.
When you select a row in the message list, the associated object is shown in the right details pane.
The project details view shows the following fields
If you choose Directory as location, you should provide a base directory and the tool will analyse all the jar files found under this directory (recursively).
If you choose Maven as location, the tool will get the jar to analyse from your local maven repository. Ensure that the Maven repository directory global setting (available from menu Action/edit settings) is correctly set.
The components and diagrams of the project are shown as sub-list in the project details for completeness but the content of those two lists is the same as the content of the list in the "Component" and "Diagrams" main tabs.
In the toolbar and menu, the following actions are applying to the project:
Save project: Save the current project as a XML file.
Save project as: Save the current project under a new file name (only in 'File' menu).
Reload project: Reload the current project from the XML file. If the project is modified, a dialog is shown warning that all modification will be lost.
New project: Create a new empty project.
Edit project: Edit the current project definition.
Open project: Open a project from a previously saved XML project definition.
Re-open project: Re-open a project used recently (only in 'File' menu).
Close project: Close the current project definition.
Analyse: Launch the project analysis. The analyse evaluates the classapth, parses all the classes in all the jars to recreate all the relations between classes and deduces relations between components. After that, all the diagrams are recreated to display the actual relations.As you might have guessed from its name, the component is the central object in the tool. It is the base block used to build the project.
Each component has a unique name and a type. The type is any string (by default "component") allowing categories of components (like "layer", "subsystem", "interface", "sub-component"...).
The component is used in two ways:
The two can be combined (but it is rarely the case).
The "Components" tab shows the list of all components defined in the project.
After an analysis, the analysed components (those containing analysed classes) are shown in black, while the non-analysed components (not containing an analysed class) are shown in grey.
The component definition is the set of field of the component object that can be edited. They are grouped in the "Definition" tab of the Component details view. All other fields of the component are calculated during analysis and, hence, are read-only.
The "Definition" tab of component details view shows the following fields
In the toolbar and menu, the following actions are applying to the components:
Add component: Add a new component.
Edit component: Edit the selected component definition.
Delete component(s): Delete selected component(s).
Auto-create components from classpath: Launch a helper proposing to create one component per jar file (not yet mapped) in the classpath. If a jar is already mapped (i.e. if the classes of this jar are already owned by a component), the jar is ignored. This helper is useful to quickly create components for an existing application.
Partition components: Launch a helper to partition (in the mathematical sense of set theory) a set of selected components into bigger components. This helper is useful, for example, to create layers and put each existing component into a single layer.The fields outside the "Definition" tab of the component details view show the result of the analysis and are not editable. Those fields show the state of the component and its link to other components & classes. All links can be browsed by clicking on the
View button or double-clicking in the lists.
TODO.
TODO.
TODO.
TODO.