| 245 | This section assumes basic understanding of writing and running semantic queries. The Eclipse !RefactorErl plugin provides an interface, called code investigations interface, to work with semantic queries in a graphical, traceable and persistable manner. |
| 246 | |
| 247 | A short and dense description of the feature: |
| 248 | * When you use the investigations interface, all of your queries are stored in a tree-like data structure. |
| 249 | * Every node of that tree stores one query result out of all the results of some query. This result is displayed as a small code section (e.g. a body of a function), and you can start a new query, based on a position in this code section. (Of course the query will be run against the whole database, the displayed code section is just a graphical aid.) |
| 250 | * For every results of this new query you selected, a new node will be created and these nodes, in turn, will be the child nodes of the original node. |
| 251 | * This way you build, starting from the root node, a tree, where every node corresponds to a result of a query, which was based on the result of that node's parent. |
| 252 | * Investigation trees can be stored and restored later. Investigations built on other !RefactorErl interfaces can also be restored in the Eclipse !RefactorErl investigations interface and vica versa. //(Current implementation of the !RefactorErl plugin has no 2D layout data, so investigations built with the plugin and restored in other !RefactorErl interfaces will have to be layed out manually.)// |
| 253 | |
| 254 | To create a new investigations tree, click **!RefactorErl > Investigations > New investigation** in the top menu. In the appearing window, you can specify, with the aid of autocompletion, a name and a starting function. The root node is special in the sense, that it simply holds the code for the body of the supplied function, and not a result of a query. |
| 255 | Only those functions will be accepted, whose containing modules were previously added to the database. |
| 256 | After pressing OK, an investigation editor tab will appear. |
| 257 | |
| 258 | You can list all previously created investigations by clicking **!RefactorErl > Investigations > Investigations list**. By right clicking on an item, you can load or delete the selected investigation. Double click also be used to load investigations. |
| 259 | |
| 260 | [[Image(inv.png, width=800, align=center)]] |
| 261 | |
| 262 | The investions editor has two parts. On the left side you can see and select nodes of the whole investigations tree. On the right side are the details of the selected node, and also buttons for the actions that can be performed on this node. |
| 263 | |
| 264 | The investigations editor is similar to most Eclipse editors in that modifications are not saved on disk until you indicate your intent by pressing one of the **Save** buttons or hit the appropriate keyboard shortcut (**Ctrl-S** by default). |
| 265 | |
| 266 | Undo/redo features are not yet present in the current implementation. |
| 267 | |
| 268 | To start a query from a node, just left click in the code text on the right side. You can specify your (position based) semantic query in the appearing query dialog. This query will be based on the position you clicked in the code text beforehand. |
| 269 | After the query was completed, a dialog window will appear, where you can select which results would you like to include as nodes in the tree. All of these new nodes will be the child nodes of the original query. |
| 270 | |
| 271 | Here, we describe the additional elements in the details side of the investigations editor: |
| 272 | * **Name** - You can give an arbitrary name to the selected node. |
| 273 | * **Show** - //(Not used.)// This will set wheter the node will be shown in the 2D tree representation of other !RefactorErl interfaces. |
| 274 | * **Add memo** - Memo nodes are special text-only nodes to hold comments and notes about the parent of the memo node. |
| 275 | * **Delete node** - Removes the selected node. If the selected node had child nodes, those will be recursively removed as well. |
| 276 | * **New investigation with node** - Creates a new investigation tree with the selected node as its only element (and root). |
| 277 | * **New investigation with subtree** - Copies the whole subtree, rooted in the selected node, to a new investigation. |