Skip to content

dehilsterlexis/vscode-ecl

 
 

Repository files navigation

ECL for Visual Studio Code

For list of latest changes, please see the Change Log at the main GitHub repository.

This extension adds rich language support for HPCC Systems ECL language (for the HPCC-Platform) to VS Code, including:

  • Syntax highlighting
  • Auto completion
  • Client tools discovery and integration
  • HPCC-Platform server support

Installation

  • Install Visual Studio Code.
  • In VS-Code, open the command palette (ctrl/cmd + shift + p) and select Install Extension. Enter ecl to filter the available extensions and choose ECL Language by HPCC Systems.
  • Locate and install the appropriate ECL Client Tools from hpccsystems.com

ECL

ECL Commands

The following ECL specific commands are available. Note: These commands will not be active until an ECL file has been opened (as this triggers the extension to load). To activate a command either use its associated hotkey or press ctrl/cmd + shift + p and type ECL this will present a filtered list of the ECL specific commands:

Global:

  • Syntax Check all files [shift + F7] - Save All + check syntax of all files.
  • Syntax Clear [ctrl + F7] - Clear all previously reported ECL Syntax Check results.
  • Language Reference Website - Opens the ECL language reference website in external browser.
  • Terminal - Opens ECL Client Tools Terminal Session.

Within the ECL Code Editor:

  • Syntax Check [F7] - Save + check syntax of current file.
  • Language Reference Lookup [shift + F1] - For the currently selected text, search the online ECL language reference.

Within the ECL Activity Pane:

Right click on item

  • Workunit Details - Opens ECL Watch Workunit Details for the selected Workunit.

Within the Status Bar

Click on ECL Client Tools Version

  • Select Client Tools Version: Select Client Tools Version from available options.

ECL Settings

The following Visual Studio Code settings are available for the ECL extension. These can be set in user preferences (ctrl/cmd + ,) or directly in your current workspace (.vscode/settings.json):

  // eclcc syntax check arguments.
  "ecl.syntaxArgs": ["-syntax"],

  // Run 'eclcc -syntax' on save.
  "ecl.syntaxCheckOnSave": true

  // Run 'eclcc -syntax' on load.
  "ecl.syntaxCheckOnLoad": true

  // Additional folders to use when resolving IMPORT statements.
  "ecl.includeFolders": []

  // Override eclcc auto detection.
  "ecl.eclccPath": ""

  // Add '-legacy' argument to eclcc.
  "ecl.legacyMode": false

  // Open Workunits in external browser.
  "ecl.WUOpenExternal": true

  // Automatically open Workunits on creation.
  "ecl.WUAutoOpen": false

  // Debug level logging (requires restart).
  "ecl.debugLogging": false
  

ECL Launch Settings

Submitting ECL using VS-Code requires specifying the target environment within the VS Code launch.json (pressing F5 will prompt you to auto create a skeleton file if none exists):

// Default ECL Launch Configuration
{
  "name": "play-hthor-submit",
  "type": "ecl",
  "request": "launch",
  "mode": "submit",
  "workspace": "${workspaceRoot}",
  "program": "${file}",
  "protocol": "https",
  "serverAddress": "play.hpccsystems.com",
  "port": 18010,
  "rejectUnauthorized": false,
  "targetCluster": "hthor",
  "eclccPath": "${config:ecl.eclccPath}",
  "eclccArgs": [],
  "includeFolders": "${config:ecl.includeFolders}",
  "legacyMode": "${config:ecl.legacyMode}",
  "resultLimit": 100,
  "timeoutSecs": 60,
  "user": "vscode_user",
  "password": ""
}

Building and Debugging the Extension

To set up a development environment for debugging the ECL for VS Code extension:

cd /Some/Dev/Folder/
git clone https://github.com/hpcc-systems/vscode-ecl
cd vscode-ecl
npm install

At which point you can open the vscode-ecl folder within VS Code.

Next start the background build process by running the following command within a terminal session:

npm run watch

At which point you can edit the sources and launch debug sessions via F5 and included launch configurations.

KEL

KEL is an optional language that can generate ECL.

KEL Commands

The following KEL specific commands are available. Note: These commands will not be active until a KEL file has been opened (as this triggers the extension to load). To activate a command either use its associated hotkey or press ctrl/cmd + shift + p and type KEL this will present a filtered list of the KEL specific commands:

Within the KEL Code Editor:

  • Syntax Check [F7] - Save + check syntax of current file.
  • Generate ECL [Ff] - Save + generate ECL files.

Within the Status Bar

Click on KEL Client Tools Version

  • Select Client Tools Version - Select Client Tools Version from available options.

KEL Settings

The following Visual Studio Code settings are available for the KEL extension. These can be set in user preferences (ctrl/cmd + ,) or directly in your current workspace (.vscode/settings.json):

  // Java runtime arguments (e.g. -Xmx12G).
  "kel.javaArgs": []

  // Override KEL auto detection
  "kel.kelPath": ""

  // Check syntax on save.
  "kel.syntaxCheckOnSave": true

  // Generated ECL location (Same Folder | Child Folder)."
  "kel.generateLocation": "Same Folder"

  // "Generate ECL on save."
  "kel.generateOnSave": false

  // Check syntax on load.
  "kel.syntaxCheckOnLoad": false
 

License

Apache-2.0

Packages

No packages published

Languages

  • JavaScript 81.3%
  • TypeScript 18.2%
  • Other 0.5%