Skip to content
Snippets Groups Projects
Commit f71c7b2f authored by Stekelenburg, A.V. (Alexander, Student )'s avatar Stekelenburg, A.V. (Alexander, Student )
Browse files

Add developer and user manual

parent 79feede5
No related branches found
No related tags found
No related merge requests found
...@@ -9,3 +9,4 @@ vsc-extension-quickstart.md ...@@ -9,3 +9,4 @@ vsc-extension-quickstart.md
**/.eslintrc.json **/.eslintrc.json
**/*.map **/*.map
**/*.ts **/*.ts
docs/**
docs/dot_options.png

20.3 KiB

docs/dot_view.png

33.4 KiB

docs/sidebar.png

25.1 KiB

<meta charset="utf-8">
**User manual**
Design project group 14
2021-3-19
****************************************************
* .--------. *
* / \ *
* / \ *
* / \ *
* .--------. \ / *
* / \ \ / *
* / \ \ / *
* / \ '--------' *
* \ / .--------. *
* \ / / \ *
* \ / / \ *
* '--------' / \ *
* \ / *
* \ / *
* \ / *
* '--------' *
****************************************************
Introduction
============
This is the user manual for the Modest Toolset VSCode extension.
Installation
============
Before installing the Modest Toolset VSCode extension make sure you have downloaded the Modest Toolset and extracted it somewhere.
Start by installing the Modest Toolset VSCode extension from the VSCode marketplace or by adding the provided vsix file to your workspace and right clicking it and clicking `Install Extension VSIX`.
After the extension has been installed open a modest file or the extension's sidebar. You will get an error message with a button that will take you to the settings. There you should enter the location where you installed the Modest Toolset. Make sure to provide the path the executable itself, called `modest.exe` on Windows and `modest` on Linux and macOS.
!!! WARNING
On macOS you may need to allow the Modest Toolset executable to run in the settings if you are not using a notarized version
## Optional: Enabling the DOT viewer (Graphviz)
To be able to use the DOT viewer you need to [install Graphviz](https://graphviz.org/download/). If Graphviz was added to your `Path` environment variable it should be possible for the extension to find it. If that is not the case edit the `Externals.defaults` file in the Modest Toolset installation location and set the `dot-path` option.
Features
========
- Syntax highlighting
- Error highlighting
- Brace matching/collapsing
- Autocomplete keywords
- Autocomplete variables
- Display the structure of a file in an outline
- Display information about certain words when hovering over it
- Renaming of variable, function and process names
- Code formatting
- Refactoring support (extract constant/function/process/variable, surround with if/while/etc..) (See section [Refactoring])
- Document symbol highlighting
- Graphical user interface to run tools on files (see section [Sidebar])
- Automatically extract all possible parameters of every tool and populate the sidebar with corresponding input boxes to set these parameters.
- Display a DOT file generated by Modest for the current file, updated in real time. (see section [DOT view])
- Process output to allow it to be interactively shown. (see section [Analysis Results])
Usage
=====
## Sidebar
The sidebar found by clicking the Modest Toolset logo in the bar on the left is used to run tools from the Modest Toolset on your files.
![Figure [sidebar]: The sidebar](sidebar.png)
### Tool selection
Next to the run button there is a dropdown that is automatically populated with the available tools.
### Open constants and extra parameters
Below the tool selection there is an expandable section containing the constants in your file that do not have an assigned value. The values specified here will be passed to the tool using it's experiment parameter. Below the open constants section there is a section where additional parameters like intervals for sampling expressions may be provided. The open constants and extra paramters are saved for each file seperately.
### Parameters
Below the additional parameters section the tool-specific parameters are shown. The available paramaters are automatically gathered from your Modest Toolset installation. The parameters are saved for each tool seperately.
## DOT view
When a Modest file is opened a button will apear on the top right which opens the DOT view. This button will open a side-by-side view of the currently opened file and a DOT file generated by the Modest Toolset. You can also `Alt+Click` on the button open the DOT view in a regular, larger window.
![Figure [dot_view]: The DOT view](dot_view.png)
### Navigating the DOT view
By clicking and dragging the mouse you can pan around. To zoom the view in and out you can scroll up and down.
You can also zoom by clicking either of the zoom buttons on the top right of the window. If you're lost and can't find the DOT anymore (for example by changing one of the DOT options), press the Reset Location button on the top right to reset the view to the initial position.
### DOT Options
![Figure [dot_options]: The DOT options](dot_options.png)
## Analysis Results
There are two ways to view analysis results in the analysis results view. Open results JSON file, or run Modest file.
Second view is called Analysis Results Comparison View. Load results JSON file, or move the results from Analysis Results view.
In the analysis view, save results to a JSON or text file, open the JSON file directly in the editor (open in editor), clear view.
For each item in the analysis results, copy item which copies a text representation of the item, copy value copies the value if there is one, highlight item is to remember/quickly see where an item was in the tree. Values that can be plotted such as CDF can be plotted by pressing 'Plot value'.
## Refactoring
Refactoring options are accessed by selecting modest code, right clicking, and selecting "Refactor..." in the drop down menu (keyboard shortcut: `Ctrl+Shift+R`).
### Refactoring options
- You can surround your selection with an if, while, for, block -statement or surround it with parenthesis.
- There are also options to extract your selection to a constant, function, process, or variable. This can be extracted to the current scope, or to the main scope (if you are not in the main scope already).
There will be no refactoring options if your selection is empty, or if your selection is entirely within a comment.
## Renaming symbols
You can rename symbols by selecting a symbol, right clicking, and selecting "Rename Symbol" in the drop down menu (keyboard shortcut: `F2`).
Once you enter a new name it will change all occurrences of the symbol selected.
<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="markdeep.min.js" charset="utf-8"></script><script src="https://morgan3d.github.io/markdeep/latest/markdeep.min.js" charset="utf-8"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment