Klocwork Architect user interface reference

From Insight-9.2

Contents

The Project Tree view

The Project Tree view in the left pane shows the hierarchical structure of your software system, and is visible whenever Klocwork Architect is started. Through this view you can easily see containment of entities within various architectural levels.

Project Tree view Entity pop-up menu

Right-click on any entity displayed in the Project Tree view to open the Entity pop-up menu.

Note: Various commands are unavailable (grayed out) for some types of entities. Most commands are grayed out for read-only models.

Cut (Ctrl+X) removes one or more selected entities from the model and pastes them onto the clipboard. The entities remain on the clipboard until you paste them (once) or cut another entity. Entities can only be cut from one level at a time.

Paste Into pastes the previously cut entities into the selected entity.

Group... (Ctrl+G) places one or more selected entities or subsystems into a new architectural block. All relationships to the individual entities go to the new block. To select more than one entity to group, Ctrl-click the entities. The Group Blocks dialog prompts you to name the new block.

Rename... (Ctrl+Shift+C) opens the Rename dialog, in which you can enter a new name for the selected block. The block name may be a maximum of 80 characters. The block name cannot contain spaces. It can include symbols, except for the following: / " \’ The Rename command is not enabled at the file level or lower.

Delete (Delete) removes the selected entity or entities from the displayed model. Deleted entities are not saved to the clipboard and cannot be re-pasted into a diagram. For such operations, use Cut.

Explode (Ctrl+Shift+K) deletes the selected entity or entities and moves the contents, including relationships, up to the currently displayed architectural level. In a model, the Explode command cannot be used on file-level entities. In a custom diagram, you can Explode any level of entity.

Show... opens the Show... submenu.

Find in Block... opens the Find in Block dialog, that allows you to search for an entity contained within a specific entity.

Access icons

The following icons describe how accessible some entities in your source code are. The access icons appear to the right of the entity icons in the Project Tree to give you information about fields, methods, variables, and functions.

Access icons

Icon Name

Icon access implemented.gif

Implemented

Icon access implementing.gif

Implementing

Icon-access local.gif

Local

Icon access overriden.gif

Overridden

Icon access overriding.gif

Overriding

Icon access private.gif

Private

Icon access protected.gif

Protected

Icon access public.gif

Public

Icon entity class-data-member static.gif

Example of a static icon (class data member)

A static icon is a small x in the lower right corner of an entity icon. The following entities can present static icons:

C/C++

CLASS-DATA-MEMBER

CLASS-METHOD

Java

CLASS

CLASS-DATA-MEMBER

CLASS-METHOD

Note: Other entities in the database can have static linkage.

Model pop-up menu

To open the Model pop-up menu, right-click any custom diagram name or model name in the Project Tree view.

New ... opens the Set Model Name dialog, allowing you to create a new model by copying the selected model.

Open opens a Graphic view of the currently selected model or Custom Diagram.

Share allows you to specify whether other Architect users or Source Cross-Reference users can view the models you’ve created. This command is only available if you are the owner of the model. Note that if you want to view your own models in Source Cross-Reference, you must share your models first.

Compare With... opens the Generate Differences dialog. Once you’ve edited an architecture model, you can compare it with the System model or another architecture model (including other users’ models). Architect will give you a list of the changes that must be carried out on the existing model to make it conform to the target model. You can use this list as a guide for what changes you need to make to the software system itself. You can also compare two custom diagrams.

Delete... deletes the currently selected model, as long as it is a model you own. If a Graphic view of the model was open, it closes.

Show Annotations opens an Annotations tab that displays information about a selected block drawn from the Klocwork database and from user-added annotations.

Graphic view Entity pop-up menu

To open the Entity pop-up menu, right-click any entity displayed in the Graphic view.

Note: Various commands are unavailable (dimmed in the menu) for some types of entities.

Highlight Users highlights in red all currently displayed relationships going to a selected entity or entities. All other displayed relationship lines change to light gray. To turn off the red highlighting, click Reset Highlighting in the pop-up menu. If there are no relationships to the selected entities, the Highlight Users command is unavailable.

Highlight Uses highlights in red all currently displayed relationships going from selected entities to other entities. All other displayed relationship lines change to light gray. To turn off the red highlighting, click Reset Highlighting in the pop-up menu. If there are no relationships from the selected entities, the Highlight Users command is unavailable.

Reset Highlighting removes from displayed relationship connectors the red highlighting that was set using View > Highlight Users or View > Highlight Uses.

Users Detail is available only when relationships are being displayed in the Graphic view. If you right-click any entity with incoming connectors (denoting that the entity is used by another entity), choosing Users Detail displays details about the users of the selected entity in the Relationship Viewer. The Relationship Viewer opens in the mode for which it was last used (to show either relationships or interfaces). If the selected entity has no incoming connectors, this menu item is disabled.

Uses Detail is available only when relationships are being displayed in the Graphic view. If you right-click any entity with outgoing connectors (denoting that the entity uses other entities), Uses Detail displays details about the entities used by the selected entity in the Relationship Viewer. The Relationship Viewer opens in the mode for which it was last used (to show either relationships or interfaces). If the selected entity has no outgoing connectors, this menu item is disabled.

Cut (Ctrl+X) removes one or more selected entities from the model and pastes them onto the clipboard. The entities remain on the clipboard until you paste them (once) or cut another entity. Entities can only be cut from one level at a time.

Paste Into pastes the previously cut entities into the selected entity.

Group... (Ctrl+G) places one or more selected entities or subsystems into a new architectural block. All relationships to the individual entities go to the new block. To select more than one entity to group, Ctrl-click the entities. The Group Blocks dialog prompts you to name the new block.

Rename... (Ctrl+Shift+C) opens the Rename dialog, in which you can enter a new name for the selected block. The block name may be a maximum of 80 characters. The block name cannot contain spaces. It can include symbols, except for the following: / " \’ The Rename command is not enabled at the file level or lower.

Delete (Delete) removes the selected entity or entities from the displayed model. Deleted entities are not saved to the clipboard and cannot be re-pasted into a diagram. For such operations, use Cut.

Explode (Ctrl+Shift+K) deletes the selected entity or entities and moves the contents, including relationships, up to the currently displayed architectural level. In a model, the Explode command cannot be used on file-level entities. In a custom diagram, you can Explode any level of entity.

Expand (Ctrl+K) enlarges and makes transparent a selected entity to show its interior entities and relationships. You cannot edit the contents within the expanded entity unless you move to that lower level of the hierarchy (by double-clicking on an entity within the expanded entity view).

Contract collapses an expanded entity to its original size and color and hides the entity’s contents.

Show... opens the Show... submenu.

Find in Block... opens the Find in Block dialog, that allows you to search for an entity contained within a specific entity.

The Graphic view

The Graphic view in the right pane shows you editable diagrams of a software system. It also shows you interactions between entities, including messages passed between entities, access to globally defined variables, and "uses" and "includes" interactions. The Graphic view can also show you source files of your software system or Java documentation.

To open the Graphic view, double-click a custom diagram or a model in the Project Tree.

Show... submenu

The Show... menu item on the Entity pop-up menu leads to a sub-menu. Use the commands on the Show... sub-menu to navigate to other Architect views where you can see more information about a selected identifier.

Note: Various commands are unavailable (dimmed in the menu) for some types of entities.

Show Flowchart opens or updates a Flowchart view to display where the selected identifier is located in the source code. The identifier is highlighted in grey or with a green dot, depending on the zoom level. Flowcharts are only displayed for identifiers that appear in the source code.

Note: In mixed language projects (C or C++ and Java), Flowchart can only show flowcharts for entities that are of the language that the project was declared to be when it was created.

Show Definition opens or updates a Search tab to display the file name and line number in which a selected identifier or block is defined. It also opens Flowchart to display the identifier or block. If the identifier is a definition of a function, class, method or template, it is displayed in an entity flowchart. If it is a variable or type definition, it is displayed in a file-level flowchart. The identifier is highlighted at the place where it is defined in the flowchart.

Show Usage opens or updates a Search tab to list the locations (file name and line number) where the selected identifier is used.

Show Inheritance (enabled only for object-oriented languages) opens or updates a Search tab to display the classes that inherit properties from the selected class.

Show Superclass (enabled only for classes and interfaces) opens or updates a Search tab to display the superclass of the selected class.

Show Attributes (Ctrl+T) opens or updates a Search tab that displays the attributes (type and value) for a selected entity. If no attribute information exists for the entity, a "no information" message is displayed.

Show Annotations opens an Annotations tab that displays information about a selected block drawn from the Klocwork database and from user-added annotations.

Show Architecture opens or updates an Architecture tab in the Graphic view to display where the selected identifier, file, or entity is located in the software system architecture. The identifier appears as a highlighted block. For class methods and class data members that reside on the class level, Show Architect displays the location on the class level.

Show Javadoc (appears only for Java models) opens a Javadoc view that links to Java documentation. Note: For the Show Javadoc feature to work, your Klocwork Administrator must have set the Javadoc Location project property in the Klocwork Administration Console (KMC), or the "javadoc.url" project property with kwadmin set-project-property. Your Klocwork Administrator may, for example, set the Javadoc location to the Java 1.6 API specification, or to your company’s custom Java documentation.

Show Source File opens a tab in the right pane that shows a Source File view of source code associated with the entity you selected. The selected entity is highlighted in the Source File view. The name of the tab is the name of the selected entity.

Graphic view pop-up menu

The Graphic view pop-up menu is displayed when you right-click any empty space in the Graphic view.

Reset Highlighting removes from displayed relationship connectors the red highlighting that was set using View > Highlight Users or View > Highlight Uses.

Edit Relationships Profiles... (Ctrl+R) opens the Relationship Profile Editor dialog, from which you build profiles that you can use and reuse when you look at different Architect models or custom diagrams. The profiles are sets of inter-entity relationships. The list of relationship types displayed depends on the programming language and structure of your source code.

Note: You select (apply) a relationship profile through the list of relationship profiles dropdown box on the Main toolbar.

Paste (Ctrl+V) places one or more previously cut blocks into the active Graphic view. Blocks can only be pasted once. In models, blocks cut from within a file can only be pasted in a file-level block. In custom diagrams, blocks cut from within a file can be pasted at any level you choose; custom diagrams do not need to be bound by system hierarchy.

New Block... (Ctrl+Insert) opens the New Block dialog in which you specify the name and type of a block that you want to add to the custom diagram or model displayed in Architect.

Undo (Ctrl+Z) reverses your last executed command or action. It can be used repeatedly to undo several actions.

Redo (Ctrl+Shift+Z) reverses the action of the Undo command.

Select All (Ctrl+A) selects all blocks on the current Graphic view of a custom diagram or model.

The Flowchart view

Flowchart lets you view source code in the form of flowcharts. It generates flowcharts of software files and entities (functions, methods, classes, and templates), while preserving the code and comments.

Flowchart pop-up menu

To open the Flowchart pop-up menu, right-click anywhere in a Flowchart diagram. (To open a Flowchart diagram, select Show Flowchart from the Show... sub-menu.)

Tip: You can also double-click any entity or line number in an Entity search results list to open a Flowchart diagram.

Use the commands on the Flowchart pop-up menu to navigate to other Architect views to see more information about a selected identifier currently displayed in Flowchart. Valid identifiers include: functions, classes, methods, templates, global variables, type definitions, global method variables, and constants.

Show Architecture opens or updates an Architecture tab in the Graphic view to display where the selected identifier, file, or entity is located in the software system architecture. The identifier appears as a highlighted block. For class methods and class data members that reside on the class level, Show Architect displays the location on the class level.

Show Definition opens or updates a Search tab to display the file name and line number in which a selected identifier or block is defined. It also opens Flowchart to display the identifier or block. If the identifier is a definition of a function, class, method or template, it is displayed in an entity flowchart. If it is a variable or type definition, it is displayed in a file-level flowchart. The identifier is highlighted at the place where it is defined in the flowchart.

Show Usage opens or updates a Search tab to list the locations (file name and line number) where the selected identifier is used.

Show Inheritance (enabled only for object-oriented languages) opens or updates a Search tab to display the classes that inherit properties from the selected class.

Show Superclass (enabled only for classes and interfaces) opens or updates a Search tab to display the superclass of the selected class.

Show Javadoc (appears only for Java models) opens a Javadoc view that links to Java documentation. Note: For the Show Javadoc feature to work, your Klocwork Administrator must have set the Javadoc Location project property in the Klocwork Administration Console (KMC), or the "javadoc.url" project property with kwadmin set-project-property. Your Klocwork Administrator may, for example, set the Javadoc location to the Java 1.6 API specification, or to your company’s custom Java documentation.

Show Source File opens a tab in the right pane that shows a Source File view of source code associated with the entity you selected. The selected entity is highlighted in the Source File view. The name of the tab is the name of the selected entity.

The List view

The List view displays the four List tools: Search (including attribute searches), Relationship Viewer, Annotations and Differences.

The Search tab

The Search tab displays the results of searches for automatically extracted identifiers. Identifiers are source code entities such as functions, classes, global variables, type definitions, global function variables and constants. These identifiers are navigation targets whose locations within the system can be displayed in other Architect views. Use the search functionality to search for identifiers, track them throughout the system, and navigate cross-references within source files.

Tip: You can sort information in List views by clicking any of the column headers. The Sort arrow indicates which column has been used for sorting, as well as the direction of the sorting.

The columns displayed in the Search tab depend on whether you searched for entities, attributes, or both.

Entity search

If you searched for entities, the following columns are displayed in the Search tab:

Entity displays the entity that matches the search criteria entered in the text field and selected from the Entity or Attribute pull-down menus. If the found entity is a file, the File field is empty.

File displays the name of the file in which the found identifier is defined.

Line number displays the line number at which the selected entity is found.

Tip: If you double-click on any entity or line number in the Entity search results, Flowchart opens and highlights the entity listed in the first column.

Attribute search or combined Entity/Attribute search

If you searched for entities or entities and attributes, the following columns are displayed in the Search tab:

Entity displays the entity that matches the search criteria entered in the text field and selected from the Entity or Attribute pull-down menus.

Attribute lists the attribute of the identifier in the first column.

Value lists the value of the attribute for the entity in the first column.

Search list pop-up menu

To open the Search list pop-up menu, right-click any identifier in the Search tab.

Use the commands on the Search list pop-up menu to navigate to other Architect views to see more information about a selected identifier.

Show Architecture opens or updates an Architecture tab in the Graphic view to display where the selected identifier, file, or entity is located in the software system architecture. The identifier appears as a highlighted block. For class methods and class data members that reside on the class level, Show Architect displays the location on the class level.

Show Flowchart opens or updates a Flowchart view to display where the selected identifier is located in the source code. The identifier is highlighted in grey or with a green dot, depending on the zoom level. Flowcharts are only displayed for identifiers that appear in the source code.

Note: In mixed language projects (C or C++ and Java), Flowchart can only show flowcharts for entities that are of the language that the project was declared to be when it was created.

Show Definition opens or updates a Search tab to display the file name and line number in which a selected identifier or block is defined. It also opens Flowchart to display the identifier or block. If the identifier is a definition of a function, class, method or template, it is displayed in an entity flowchart. If it is a variable or type definition, it is displayed in a file-level flowchart. The identifier is highlighted at the place where it is defined in the flowchart.

Show Usage opens or updates a Search tab to list the locations (file name and line number) where the selected identifier is used.

Show Forward opens or updates a Search tab to list the entities to which the selected file identifier has relationships. Applicable only to files. Note that a file will have relationships to macros and other files, not to variables, functions, etc.

Show Calls opens or updates a Search tab to list what functions are called by a selected identifier. Note that Show Calls is enabled only for functions.

Show Interfaces (appears only for Java projects) opens or updates a Search tab to display a list of implemented interfaces in the selected class identifier.

Show Inheritance (enabled only for object-oriented languages) opens or updates a Search tab to display the classes that inherit properties from the selected class.

Show Superclass (enabled only for classes and interfaces) opens or updates a Search tab to display the superclass of the selected class.

Show Javadoc (appears only for Java models) opens a Javadoc view that links to Java documentation. Note: For the Show Javadoc feature to work, your Klocwork Administrator must have set the Javadoc Location project property in the Klocwork Administration Console (KMC), or the "javadoc.url" project property with kwadmin set-project-property. Your Klocwork Administrator may, for example, set the Javadoc location to the Java 1.6 API specification, or to your company’s custom Java documentation.

Show Source File opens a tab in the right pane that shows a Source File view of source code associated with the entity you selected. The selected entity is highlighted in the Source File view. The name of the tab is the name of the selected entity.

Edge pop-up menu

To open the Edge pop-up menu, right-click any relationship arrow.

Two menu items are displayed, allowing you to select the relationship direction. If the relationship you clicked on is uni-directional, one of the menu items will be grayed out.

When you select an item from the Edge pop-up menu, a Relationship Viewer tab opens in the List View and displays a report on the selected relationships between two entities.

The Differences tab

The Differences tab displays a list of differences between two models. To compare two models, use the Tools > Compare With... command.

Tip: You can sort information in List views by clicking any of the column headers. The Sort arrow indicates which column has been used for sorting, as well as the direction of the sorting.

The Differences list consists of five sortable columns:

Operation: the operation that must be carried out on the base model to achieve the target. Possible operations are Add, Delete, Move, and Rename.

Entity: the entity that the operation in Column 1 must be performed on.

Kind: the entity type of the entity in Column 2.

Source: <source custom diagram name> or <source model name>: the custom diagram or model that was active when you clicked Tools > Compare With... (typically the System model, or the custom diagram or model that you want to edit).

Target: <target custom diagram name> or <target model name>: the custom diagram or model you selected in the Generate Differences dialog (typically the custom diagram or model that you have edited).

Differences list pop-up menu

To open the Differences list pop-up menu, right-click any item in the Differences list.

Use the commands on the Differences list pop-up menu to navigate to other Architect views to see more information about a selected identifier currently displayed in the list of model differences.

Show Architecture opens or updates an Architecture tab in the Graphic view to display where the selected identifier, file, or entity is located in the software system architecture. The identifier appears as a highlighted block. For class methods and class data members that reside on the class level, Show Architect displays the location on the class level.

Show Flowchart opens or updates a Flowchart view to display where the selected identifier is located in the source code. The identifier is highlighted in grey or with a green dot, depending on the zoom level. Flowcharts are only displayed for identifiers that appear in the source code.

Note: In mixed language projects (C or C++ and Java), Flowchart can only show flowcharts for entities that are of the language that the project was declared to be when it was created.

Show Definition opens or updates a Search tab to display the file name and line number in which a selected identifier or block is defined. It also opens Flowchart to display the identifier or block. If the identifier is a definition of a function, class, method or template, it is displayed in an entity flowchart. If it is a variable or type definition, it is displayed in a file-level flowchart. The identifier is highlighted at the place where it is defined in the flowchart.

Show Usage opens or updates a Search tab to list the locations (file name and line number) where the selected identifier is used.

Show Forward opens or updates a Search tab to list the entities to which the selected file identifier has relationships. Applicable only to files. Note that a file will have relationships to macros and other files, not to variables, functions, etc.

Show Calls opens or updates a Search tab to list what functions are called by a selected identifier. Note that Show Calls is enabled only for functions.

Show Inheritance (enabled only for object-oriented languages) opens or updates a Search tab to display the classes that inherit properties from the selected class.

Show Superclass (enabled only for classes and interfaces) opens or updates a Search tab to display the superclass of the selected class.

Show Javadoc (appears only for Java models) opens a Javadoc view that links to Java documentation. Note: For the Show Javadoc feature to work, your Klocwork Administrator must have set the Javadoc Location project property in the Klocwork Administration Console (KMC), or the "javadoc.url" project property with kwadmin set-project-property. Your Klocwork Administrator may, for example, set the Javadoc location to the Java 1.6 API specification, or to your company’s custom Java documentation.

Show Source File opens a tab in the right pane that shows a Source File view of source code associated with the entity you selected. The selected entity is highlighted in the Source File view. The name of the tab is the name of the selected entity.

The Relationship Viewer tab

  1. To open the Relationship Viewer, in a Graphic view, right-click any relationship arrow.
    The Edge pop-up menu opens. It shows two menu items, allowing you to select the relationship direction. If the relationship you clicked on is uni-directional, one of the menu items will be grayed out.
  2. Select an item from the Edge pop-up menu.
    A Relationship Viewer tab opens in the List View and displays a report on the selected relationships between two entities.

The Relationship Viewer tab lists detailed information about the relationships between entities shown in architecture diagrams.

Tips:

  • You can sort information in List views by clicking any of the column headers. The Sort arrow indicates which column has been used for sorting, as well as the direction of the sorting.
  • You will not be able to sort the results in the Relationship Viewer if you’re displaying more than 3000 records. However, you can export the list and view it in an external viewer by clicking the Export icon Architect export icon.gif in the List view toolbar.

The columns displayed in the Relationship Viewer tab depend on whether you’re displaying relationships or interfaces. By default, Architect displays relationship information. An interface is a list of unique identifiers from one component used by another component. This list of interfaces is useful for doing architectural restructuring. It is also useful when the list of usage relationships is very large but consists only of a few symbols used many times.

Relationships

If you are displaying relationships, the following columns are displayed in the Relationship Viewer tab:

Relationship Type displays the type of relationship.

Identifier displays the name of the identifier.

in File displays the name of the file in which the identifier in column 2 is found.

uses Identifier displays the name of the identifier used by the identifier in column 2.

in File displays the name of the file in which the identifier in column 4 is found.

Interfaces

To see interfaces, click the Interfaces icon Architect view interfaces icon.gif in the List view toolbar. If you are displaying interfaces, the following columns are displayed in the Relationship Viewer tab:

uses Identifier displays the name of the identifier used by the first (or only) identifier in the title of the Relationship Viewer tab.

in File displays the name of the file in which the identifier in Column 1 is found.

Density displays the number of like relationship type relationships between the two entities.

Relationship Viewer pop-up menu

To open the Relationship Viewer pop-up menu, right-click an entity in the Identifier, in File, and uses Identifier columns while displaying relationship details, or right-click an entity in the uses Identifier or the in File columns while displaying interface details.

Use the commands on the Relationship Viewer pop-up menu to navigate to other Architect views to see more information about a selected identifier.

Show Architecture shows you the selected entity in the architecture diagram.

Show Flowchart shows for relationships, the selected entity highlighted in a flowchart diagram.

Highlight Edges shows in red all edges on the current diagram that contain relationships to or from a selected entity.

For entities in the second or third column in "Relationships" mode, all edges on the current diagram that contain relationships from the given entity are highlighted. For entities in the fourth or fifth column in "Relationships" mode or for entities in the first or second column in "Interfaces" mode, all edges on the current diagram that contain relationships to the given entity are highlighted.

Show Details (available only when viewing interface details) switches the Relationship Viewer to "Relationships" mode to show you details on the selected relationship (click the Interfaces icon Architect view interfaces icon.gif in the List view toolbar to return to the complete list of interfaces).

Show Definition shows you, in the Search tab, the name of the file and the line number in which the selected identifier is defined and shows you, in Flowchart, the selected entity highlighted in a flowchart diagram.

Show Usage shows you, in the Search tab, the name of the files and the line numbers in which the selected identifier is used.

Show Inheritance shows you, in the Search tab, the class inheritance of the selected identifier (for object-oriented languages only).

Show Superclass shows you, in the Search tab, the superclass of the selected identifier.

Show Javadoc (appears only for Java models) opens a Javadoc view that links to Java documentation. Note: For the Show Javadoc feature to work, your Klocwork Administrator must have set the Javadoc Location project property in the Klocwork Administration Console (KMC), or the "javadoc.url" project property with kwadmin set-project-property. Your Klocwork Administrator may, for example, set the Javadoc location to the Java 1.6 API specification, or to your company’s custom Java documentation.

Show Source File opens a tab in the right pane that shows a Source File view of source code associated with the entity you selected. The selected entity is highlighted in the Source File view. The name of the tab is the name of the selected entity.

See also