There is more then one way to open a new Factbase Inspector.
Simply right-click on the file you want to open in the Factbase Inspector and choose “Open in Factbase Inspector” from the context menu
Select the part of the source code which you want to inspect in the Factbase Inspector and right-click in the Java Editor to open the context menu. Choose “Open in Factbase Inspector”.
The selection doesn't need to be exact.A heuristic will find the first element that includes your selection and open the corresponding fact. As you can see in the screenshot below, we selected a method, so our root in the Factbase Inspector is the corresponding methodT fact.
If you did not select anything, the whole file will be opened in the Factbase Inspector,so the result will be equal to opening the factbase inspector from the Package Explorer.
The linking between Factbase Inspector and Java Editor works also the other way around, meaning that you can select the source code corresponding to a Node from the Factbase Inspector. See context menu - Show Source Code
To open a Factbase Inspector from the Prolog Console we first need an ID. For example you can open a Factbase Inspector from the result of a querry. Consider this simple querry:
?- classT(Id, Pkg, 'B', Members).
This querry matches the class with the name 'B' . The result will be something similar to:
Id = 37953, Pkg = 37091, Members = [49394, 49395, 49396, 49397, 49398, 37954, 49399, 49400, 49401|...] ;
Note that the precise IDs might be different on your system.
Now select the returned as the Id for the class “B” and in the context menu select “Open In Factbase Inspector”:
If we expand a Factbase Inspector we will see different types of Nodes. In the first level of expansion we see (for example as in the screenshot above) 3 folders.1) Folders are used to group nodes of the same type, in this example we have:
Depending on the type of the expanded node, there can be other groups (for example, “block”, a group that includes all the PEFs inside the block of a loop).
Each node has a symbol that indicates the state of this node.
For example, a green block indicates that the element has a piece of corresponding source code. A red block means, that there is no corresponding source code (for example the implicit constructor). The red greater (“>”) and smaller (“<”) signs in the icon tell you that the shown element has been modified. The following screenshots shows how a Factbase Inspector could look like after a transformation has been applied:
By clicking on the “Factbase Inspector Help” Icon, which is indicated by the red circle in the upper screenshot, you can see a description for all node status icons used in the Factbase Inspector.
You can bring up the context menu of a node by right-clicking on the node. The Context Menu entries are selection-sensitive – depending on the selected node some actions will be active, deactivated or replaced by a node-specific variant. The context menu includes the following entries:
A sub menu allowing you to navigate the PEF model “upwards”, to an enclosing element of the currently selected node. In our example, a methodT fact is enclosed by a class, a compilation unit and a package.
Opens an editor2) and highlights the source code that this fact represents.
Shows the source code from the selected node, re-engineered from the fact representation. The following screenshot shows a popup with the re-engineered source of a method after an encapsulate Field transformation (see CTs/Encapsulate Field). Above you can see the original source (without getter and setter calls).
Get a textual representation of the selected node, which you can paste into a Prolog file, as a template for a query or transformation. See Source Templates for Conditions and Transformations for detailed information's.
For example in the screenshot above it would copy the NodeTerm “methodT(17411, 17404, myMethod, , type(basic, void, 0), , 17412)” to your clipboard.
Displays a dialog for opening a new Factbase Inspector.
The Factbase Inspector Options let you customize your Factbase Inspector behavior and appearance.