Ox for Visual Studio Code (Beta Version)
This extension provides rich language support for Ox.
If you are new to VS Code see Getting started with Visual Studio Code
After installation, the extension setting
oxmetricsFolder must be set to the folder path of oxmetrics.
- Windows :
- MacOs :
You can change the extension setting via :
OxCode (see Setting)
A reload of Visual Studio Code is needed to complete installation.
- Command to run a
.ox code (right click, and click
- Syntax Highlighting
- A problem matcher is implemented to quickly jump to errors.
- Documentation generation (javadoc style)
- region folding ( via
Autocompletion is provided as you type, after
[.] (while calling a function ) or
[this.] (inside a member function).
Signature Help is given after a parenthesis
(. If the function declaration is documented with a javadoc comment, then the documentation is displayed.
A basic linter rule is currently supported :
- Check for unused local variables.
To run the linter, right click an ox file, click
Show All Commands and
OX Lint my code.
Go To Implementation
Go To Implementation (or Peek) is supported for functions (
CTRL + Shift + F12).
Go To Definition
Go To Definition (or Peek) is supported for functions:
||parallel for loop
||initialize an ox code
Documentation for function can automatically be inserted by inserting
The extension provides several commands in the Command Palette for working with Ox files:
OX Compile and Link to compile the current ox file and link
OX Compile to compile the current ox file
OX Stop to stop the running ox session
OX Clean .bak files to delete .bak files that are in the current directory
OX Lint my code to lint the current file
OX Help to open the official ox help
OX Open file with oxmetrics to open a file in oxmetrics
OX Run to run the current file
OX OxRun to run the current file using OxRun (for graphics)
OX Run in terminal to run the current file via a terminal
You can access all of the above commands from the command palette (
This extension contributes the following settings:
oxcode.astyleOptions: see Astyle options (default :
--pad-header --break-blocks --pad-oper --style=java --delete-empty-lines --unpad-paren)
oxcode.oxmetricsFolder: The path to the root folder of oxmetrics .
oxcode.checkSyntaxOnSave: If true, check the syntax on save (default : false).
oxcode.completion: True to enable completion (default : true).
oxcode.signature: True to enable signature Help (default : true).
- Does this extension use any online services?
- No, this extension is self contained. It doesn't use any telemetry services.
- How to report a bug ?
- via the github repository. If you can fix it, feel free to send us pull requests.
- Does this extension support prior version of OxMetrics ?
- It has not been tested, but it should work.
Tips and Tricks
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"label": "Run ox",
Format Document doesn't work properly when the ox file contains a nested comment.
This extension: The MIT License (MIT)
OxLinter : copyright Prolept, this extension relies heavily on a command line executable named
OxLinter (freeware) that is bundled with this extension.
Please note that futures versions of this extension may be commercialized.