This extension is designed to streamline JavaScript development for STIBO STEP systems. It provides developers with powerful snippets and code transformations to enhance productivity and maintain code quality.
Features
Dynamic Snippet Insertion: Type a number followed by binds (e.g., 3binds) to insert a customizable comment block with that number of variable slots.
Uppercase Transformation: Automatically converts variable names within Binds comment blocks to uppercase when the document is saved.
Multiple .showAlert() Detection: Warns you if there are multiple .showAlert() calls in your code when saving a document, helping to prevent potential issues from duplicate alerts.
Diagnostic Collection: Maintains a diagnostic collection for .showAlert() calls, providing visual feedback within the editor.
Snippets
The extension includes the following snippets for rapid development:
binds: Inserts a comment block for variable bindings. Type 1binds, 2binds, etc., to generate a block with the corresponding number of variable slots.
showAlert: Inserts a template for the .showAlert() method call.
executeInContext: Inserts a scaffold for executing code within a specific context.
info: Inserts a template for the log.info() method call.
Requirements
This extension requires Visual Studio Code to run. No additional software is necessary.
Extension Settings
Currently, this extension does not require any additional settings. It works out of the box once installed.
Release Notes
v0.0.36
Initial release of JavaScript Snippets for STIBO STEP.
Added dynamic binds snippet insertion based on the number prefix.
Implemented uppercase transformation on save for variables within the Binds comment block.
Introduced warning and diagnostics for multiple .showAlert() calls in the document on save.
Added diagnostics to ensure the Binds comment block is at the top of the file.
Improved the user experience by adding popup warnings for multiple .showAlert() calls and Binds comment block issues.
Following Extension Guidelines
This extension adheres to the best practices outlined by Visual Studio Code for extension development.