Note that KB Explorer:
- is specifically for internal use only
- should not be used by customers without express permission from CAST
- is not officially supported and therefore CAST will not fix any issues that are found, nor make any feature updates or improvements
Introduction
KB Explorer is an internal tool that can be used to explore the content of any CAST analysis schema (*_local) stored on a local or remote CAST Storage Service/PostrgreSQL instance:
- Objects within the schema can be accessed as projects, modules, transactions, or metrics via the Object Tree, and directly through a dedicated search dialog box.
- Links are also accessible through dedicated search dialog boxes.
Objects/links within the schema can be organized in a Graphical View:
- properties are displayed in a specific table
- the associated code is displayed in a dedicated code viewer
Click to enlarge
Current release
Current version is 0.9.4 (02 August 2023). See KB Explorer - Release Notes.
First run
- Find the CAST-KBExplorer.exe and double click it.
- A new file called KBExplorer.preferences will be created in the same folder:
- The tool will then load (you may need to resize the main window to fit your display):
- You should start by connecting to your target CAST Storage Service/PostgreSQL instance using the Connection dialog box, then put some objects onto the Graphical View.
- You can also open the Preferences dialog box (from the menu bar: Edit/Edit Preferences...) and change some global preferences.
Connection dialog box
The Connection dialog box allows you to configure a connection to the required schema. You can access it using the F2 key, or by selecting the following icon:
You can create a new connection, by inputting the URL and user credentials, then either input the schema name, or select it from the drop down list (to fill in the list, click Look Up Schemas). You can also select a previous connection from the list:
URL | This is the JDBC url for the CAST Storage Service/PostgreSQL instance where the target schema (*_local) is stored. The syntax is as follows: jdbc:postgresql://<ip_address_or_hostname>:<port>/postgres Change /postgres if the target schema is not stored in the default postgres database. |
---|---|
User / Password | Enter the credentials that have permission to access the target schema. For the vast majority of CAST Storage Service / PostgreSQL instances, this will be operator/CastAIP . |
Schema | Enter the name of the target schema you want to access, for example |
Look Up Schemas | Click this button to view a list of all schemas on the target CAST Storage Service / PostgreSQL instance, and then select the one you want: Note that all schemas will be listed, but KB Explorer is only able to connect and explore schemas with the suffix _local . |
Search dialog box
The Search dialog box allows you to retrieve objects from the target schema, using various search criteria. You can access it using CTRL+F key combination, or by selecting the following icon:
Click to enlarge
Left hand panel
Configure the search string and other options in this panel:
Search KB | Enter the string you want to search for. |
---|---|
Match field | Choose where the string will be searched:
Click Go! to perform the search. Results are displayed in the right hand panel. Previous searches are stored and can be accessed using the drop down: |
Match mode | Choose the mode used to perform the search:
|
Case sensitive | Select this option if you want to match the case of the search string. For instance, if you enter "SyS" and check the option, all instances of "SYS" will be ignored. |
Right hand panel
Search results are displayed in this panel:
Clear results | Clears the results from the panel. |
---|---|
Add to view | Adds the selected item or items (i.e. in the list of results) to the Graphical View. Multiple items can be selected using CTRL/SHIFT + mouse. |
Add all to view | Adds all the items in the results panel to the Graphical View. |
Object Tree
The Object Tree is used to hierarchically navigate the items in the target schema, starting from a project, from a module, from a transaction, or from a metric (rule/measure/distribution):
Right clicking a node will give you access to a contextual menu, that allows you to add/remove the node to the Graphical View (you can also drag and drop the node onto the Graphical View):
Hotkeys/Accelerators
- <CTRL+P> - selects the Projects tab
- <CTRL+M> - selects the Modules tab
- <CTRL+T> - selects the Transactions tab
- <CTRL+E> - selects the Metrics tab
Information Tabs
When a node is selected in the Object Tree, or some nodes/links/transactions/metrics are selected in the Graphical View, the associated pieces of information about the item are displayed in the Information Tabs located below the Graphical View:
Hotkeys/Accelerators
- <F9> - selects the Identity tab
- <F12> -selects the Properties tab
- <F11> - selects the Code tab
- <F10> - selects the Links tab
- <F7> - selects the Violations tab
Identity
The Identity tab displays all pieces of information that could be used to identify a selected item:
It can also display similar pieces of information for a selected link:
It can also display similar pieces of information for a selected metric:
Properties
The Properties tab displays all properties associated to a selected item:
It can also display similar pieces of information for a selected link:
Code
The Code tab displays the source code associated with the most recently selected object (it currently does not support multi-selection on objects):
It can also display the code bookmarks of the most recently selected object (it currently does not support multi-selection on links):
Links
The Links tab list the links associated to the selected objects:
It can also list links for a selected link:
Violations
The Violations tab list the violations (of rules) associated to a selected object (either in the Object Tree, or in the Graphical View):
It is also possible to select a metric in the Object Tree and view all objects that violate that rule:
Graphical View
The Graphical View displays objects and links selected (or dragged/dropped) from the Object Tree, or from the search dialog boxes: each node/item corresponds to one object in the target schema, and each link to one link in the target schema (either physical - i.e., stored in the Acc table, or logical - i.e., stored in another table: KeyPar, ObjPro, ...). It is also possible to associate comments to a node:
Commands toolbar
The toolbar contains commands that apply to the whole graph:
- Auto Layout Objects Graph - to reposition nodes for a better display.
- Fit Graph to Screen -to display all the nodes, by shifting/rescaling the graph.
- Layout graph on selected objects only - when checked, the scope for the two commands above is limited to selected nodes.
- Restore View from XML File - to load a Graphical View from a previously saved .kbviewxml file
- Save View to XML File - to save the Graphical View to a .kbviewxml file
- Change graph origin X - to change/display the horizontal graph origin
- Change graph origin Y - to change/display the vertical graph origin
- Change graph scale - to change/display the graph scale
- Select adjustment unit - to activate the auto adjustment of nodes
- Select after Adding to View - to select (automatically) all newly added nodes
Hotkeys/Accelerators
- <Shift-Left> - shift the Graphical View one digit left
- <Shift-Right> - shift the Graphical View one digit right
- <Shift-Up> - shift the Graphical View one digit up
- <Shift-Down> - shift the Graphical View one digit down
- <CTRL-Left> -shift the Graphical View ten digits left
- <CTRL-Right> - shift the Graphical View ten digits right
- <CTRL-Up> - shift the Graphical View ten digits up
- <CTRL-Down> - shift the Graphical View ten digits down
- <CTRL-F> - search for an object
- <CTRL-O> - opens a graph from a .kbviewxml file
- <CTRL-S> - saves the current graph as a .kbviewxml file
- <Shift-Delete> - removes the selected nodes/edges from the Graphical View
- <+> - inflate the selected nodes/edges
- <-> - deflate the selected nodes/edges
- <space> - toggle selection on the node/edge holding the focus
- <C> - opens the color selection dialog box on the node/edge holding the focus
- <Q> - toggle the grid on/off
Contextual menus
Right clicking on a node, an edge, a comment, or the background will display a contextual menu.
Node contextual menu
The following commands are available in the contextual menu accessed when right clicking a node:
- Remove Node(s):to remove the selected nodes from the view
- Find Children: to retrieve the children of the selected node (does not support the multi-selection)
- Find Callers: to retrieve the callers of the selected node (does not support the multi-selection)
- Find Callees: to retrieve the callees of the selected node (does not support the multi-selection)
- Find Parents: to retrieve the parents of the selected node (does not support the multi-selection)
- Find Links Between Selected Objects: to retrieve the links between the selected nodes
- Change Color: to change the color of the selected nodes
- Change Background Color: to change the background color of the selected nodes
- Add Comment: to add a comment to the selected node:
- Zoom in: to increase the size of the selected nodes
- Zoom out: to decrease the size of the selected nodes
- Horizontal Alignment: to align objects horizontally
- Vertical Alignment: to align objects vertically
- Horizontal Distribution: to evenly distribute objects horizontally
- Vertical Distribution: to evenly distribute objects vertically
All the objects retrieved using one of the Find ... commands are displayed in dialog box similar to the Search dialog box, allowing the user to add a part of the results onto the Graphical View:
The links retrieved by the Find Links Between Selected Objects command are displayed in a dedicated dialog box, allowing the user to add a part of the results onto the Graphical View:
Edge/link contextual menu
The following commands are available in the contextual menu accessed when right clicking an edge or link:
- Remove Edge(s) - to remove the selected edges from the view
- Change Color - to change the color of the selected edges
- Zoom in - to increase the width of the selected edges
- Zoom out - to decrease the width of the selected edges
Comment contextual menu
The following commands are available in the contextual menu accessed when right clicking a comment in the view:
- Remove Comment - removes the comment from the view
- Change Text - to change the text of the comment
- Change Font - to change the font of the comment: family (Arial, Calibri, Tahoma, ...), size (4 to 72), bold, italic
- Increase Font Size - to increase the font size (up to 72)
- Decrease Font Size - to decrease the font size (down to 4)
- Toggle Font Italic - to toggle the italic style of the font
- Toggle Font Bold - to toggle the bold style of the font
- Change Color - to change the color of the selected comments
- Change Background Color - to change the background color of the selected comments
- Zoom in - to increase the width of the selected comments
- Zoom out - to decrease the width of the selected comments
Background contextual menu
Following commands are available from the background contextual menu:
- Show grid: to show/hide the view grid
- Move left: to move the view to the left from one pixel
- Move right: to move the view to the right from one pixel
- Move up: to move the view up from one pixel
- Move down: to move the view down from one pixel
- Run left: to move the grid to the view from ten pixels
- Run right: to move the view to the right from ten pixels
- Run up: to move the view up from ten pixels
- Run down: to move the view down from ten pixels
Saving/Restoring views into/from XML files
The views can be saved and restored using the Save View to XML File/Restore View from XML File commands.
Good to know
A view can be restored on a schema different from the one it has been created on, provided that some of the corresponding schema objects are present in the target schema. This allows you to compare the results between two versions of the same schema.
Preferences dialog box
Some global preferences can be set in this screen:
Product root path | The path to the installation location of AIP Core. This insures that the object type icons are correctly displayed in the Object Tree and in the Graphical View. For icons provided by extensions, the CastGlobalSettings.ini file is used to determine how KB Explorer should access the extension storage folder. |
---|---|
Select copy/paste format | The format of the data copied/pasted from the Information Tabs tables:
|
Include column headers in copy/paste | When checked, the table headers are included in the data copied/pasted from the Information Tabs tables. |
Auto format columns | When checked, the columns from the Information Tabs tables will be automatically formatted. |
Syntax highlighting | When checked, the code viewer will use syntax highlighting. |
Select newly added nodes | When checked, the nodes added to the Graphical View are automatically selected. Can be overridden using the same option available in the Graphical View toolbar. |
Auto layout on selection only | When checked, only the selected nodes are relocated when using the Auto Layout Objects Graph command available in the Graphical View toolbar. |
Debug mode | When checked, technical pieces of information are displayed in the Object Tree and in the Graphical View. |