A Visual Studio Code extension for OBDb signal editing tooling.
Features
- Hover Information: Hover over signal IDs in JSON files to see which model years support the specific signal
Requirements
- VS Code version 1.99.0 or higher
- A project structure that includes model year test cases in
tests/test_cases/[year]
directories
Installation
From VSIX File
- Download the latest
.vsix
file from the releases page
- In VS Code, go to Extensions view (Ctrl+Shift+X)
- Click "..." at the top of the Extensions view
- Select "Install from VSIX..." and choose the downloaded file
In devcontainers
Add to your devcontainer.json:
"customizations": {
"vscode": {
"extensions": [
"https://github.com/OBDb/vscode-obdb/releases/download/v[VERSION]/signalid-hover-info-[VERSION].vsix"
]
}
}
Replace [VERSION]
with the actual version number.
How It Works
The extension:
- Detects when you hover over an ID in a JSON file within the signalsets directory
- Scans the project structure for matching signal IDs in test cases across different model years
- Displays a hover card showing all model years that support the specific signal ID
Development
Setup
# Install dependencies
npm install
# Compile the extension
npm run compile
# Watch mode during development
npm run watch
The project includes a command-line tool for working with signalsets outside of VS Code.
Building the CLI
# Compile the CLI
npm run compile:cli
Or use the VSCode task:
- Press
Cmd+Shift+P
(macOS) or Ctrl+Shift+P
(Windows/Linux)
- Type "Tasks: Run Task"
- Select "compile-cli"
Running the CLI
After building, you can run the CLI in several ways:
Using node directly:
node dist/cli.js optimize <workspace-path>
Using npm link (for development):
# Link the CLI globally
npm link
# Now you can use it anywhere
obdb optimize <workspace-path>
Example:
# Parse and display the root node of the signalset
obdb optimize /path/to/your/workspace
The CLI will look for a signalset at <workspace-path>/signalsets/v3/default.json
and print the parsed root node to the console.
Build & Package
# Prepare for publishing
npm run vscode:prepublish
# Package as VSIX
npm install -g @vscode/vsce
vsce package
Release Process
This extension uses GitHub Actions for automated builds and releases:
- Create and push a tag with format
v*.*.*
(e.g., v0.1.0
)
- The CI will automatically build, package, and create a GitHub release
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.