Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 39 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,57 @@ concurrency:
cancel-in-progress: true

jobs:
test:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 20.x
cache: npm

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
run: npx eslint src/

unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm

- name: Install dependencies
run: npm ci

- name: Unit Tests
run: npm run test:unit

integration-tests:
runs-on: ubuntu-latest
needs: [lint, unit-tests]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm

- name: Install dependencies
run: npm ci

- name: Test (Extension Host)
- name: Integration Tests (Extension Host)
run: xvfb-run -a npm test
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,33 @@ concurrency:
cancel-in-progress: false

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: npm

- name: Install dependencies
run: npm ci

- name: Lint
run: npx eslint src/

- name: Unit Tests
run: npm run test:unit

- name: Integration Tests (Extension Host)
run: xvfb-run -a npm test

release:
runs-on: ubuntu-latest
needs: [test]

steps:
- name: Checkout
Expand Down
10 changes: 5 additions & 5 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A VS Code extension providing SysML v2.0 language support with interactive visua
│ │ │ * Diagnostics & keyword typos │ │
│ │ │ * Completions / signature help │ │
│ │ │ * Hover / go-to-def / references │ │
│ │ │ * Semantic tokens / CodeLens │ │
│ │ │ * Semantic tokens / CodeLens │ │
│ │ │ * Rename / linked editing │ │
│ │ │ * Inlay hints / document links │ │
│ │ │ * Type & call hierarchy │ │
Expand All @@ -40,10 +40,10 @@ A VS Code extension providing SysML v2.0 language support with interactive visua
│ ┌──────┴──────────────────────────────────────────────────────┐ │
│ │ Extension Features │ │
│ │ │ │
│ │ ┌────────────┐ ┌───────────────┐ ┌────────────────────┐ │ │
│ │ │ Model Tree │ │ LSP Model │ │ Model Dashboard │ │ │
│ │ │ Explorer │ │ Provider │ │ Panel │ │ │
│ │ └────────────┘ └───────────────┘ └────────────────────┘ │ │
│ │ ┌────────────┐ ┌───────────────┐ ┌────────────────────┐ │ │
│ │ │ Model Tree │ │ LSP Model │ │ Model Dashboard │ │ │
│ │ │ Explorer │ │ Provider │ │ Panel │ │ │
│ │ └────────────┘ └───────────────┘ └────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────────────────────────────────────┐ │
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,41 @@ All notable changes to the SysML v2.0 Language Support extension will be documen
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.25.0]

### Added

- **Comprehensive test suite** — new test files covering CodeLens, diagram buttons, editing features, MCP server, Model Explorer integration, performance and visualization panel (224 tests total, 176 unit + 48 integration)
- **CI pipeline restructured** — split into 3 parallel jobs: `lint`, `unit-tests`, and `integration-tests` (runs after lint + unit pass)
- **Release pipeline test gate** — `test` job must pass before the `release` job runs

### Changed

- Updated `sysml-v2-lsp` dependency from 0.5.1 to 0.6.0
- Makefile: `make test` runs unit tests only; `make test-integration` runs the full Extension Host suite

### Fixed

- **`end port` validation false positive** ([#15](https://github.com/daltskin/VSCode_SysML_Extension/issues/15)) — parser erroneously rejected `end port`, `end part`, `end item`, and other `end <keyword>` syntax in interface/connection definitions; root cause was a stale DFA snapshot in the LSP server that didn't cover the new grammar paths
- **DFA snapshot robustness** — LSP parser now retries with a cleared DFA when pre-seeded states produce parse errors, preventing stale snapshots from causing silent failures

## [0.24.0]

### Changed

- Updated `sysml-v2-lsp` dependency from 0.5.0 to 0.5.1 (enhanced code actions with structured diagnostic data, qualified name resolution)
- Simplified CI configuration by removing Node.js version matrix

## [0.23.0]

### Changed

- Updated `sysml-v2-lsp` dependency from 0.4.1 to 0.5.0

### Fixed

- Removed `minimatch` override from `package.json`

## [0.22.0]

### Added
Expand Down
24 changes: 14 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ help:
@echo " $(GREEN)install$(NC) - Install dependencies"
@echo " $(GREEN)compile$(NC) - Compile TypeScript to JavaScript"
@echo " $(GREEN)watch$(NC) - Watch and compile on changes"
@echo " $(GREEN)test$(NC) - Run all tests"
@echo " $(GREEN)test$(NC) - Run unit tests (fast, no VS Code required)"
@echo " $(GREEN)test-integration$(NC) - Run full integration tests (requires VS Code)"
@echo " $(GREEN)test-syntax$(NC) - Test syntax and compilation (no VS Code required)"
@echo " $(GREEN)test-unit$(NC) - Run unit tests only"
@echo " $(GREEN)install-test-deps$(NC) - Install system dependencies for testing"
@echo " $(GREEN)lint$(NC) - Run linting"
@echo " $(GREEN)lint-fix$(NC) - Fix linting issues automatically"
Expand Down Expand Up @@ -72,12 +72,19 @@ watch: $(NODE_MODULES)
@echo "$(BLUE)Press Ctrl+C to stop$(NC)"
npm run watch

# Run tests
# Run unit tests (fast — no VS Code instance required)
.PHONY: test
test: compile
@echo "$(YELLOW)Running tests...$(NC)"
@echo "$(YELLOW)Running unit tests...$(NC)"
npm run test:unit
@echo "$(GREEN)Unit tests completed!$(NC)"

# Run full integration tests (requires VS Code / Electron)
.PHONY: test-integration
test-integration: compile
@echo "$(YELLOW)Running integration tests...$(NC)"
@if npm run test; then \
echo "$(GREEN)Tests completed successfully!$(NC)"; \
echo "$(GREEN)Integration tests completed successfully!$(NC)"; \
else \
exit_code=$$?; \
if [ $$exit_code -eq 127 ]; then \
Expand Down Expand Up @@ -115,12 +122,9 @@ install-test-deps:
exit 1; \
fi

# Run unit tests only
# Legacy alias — kept for backwards compatibility
.PHONY: test-unit
test-unit: compile
@echo "$(YELLOW)Running unit tests...$(NC)"
npm run test:unit
@echo "$(GREEN)Unit tests completed!$(NC)"
test-unit: test

# Run linting
.PHONY: lint
Expand Down
41 changes: 14 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,33 +63,20 @@ For single-folder workspaces, files are parsed lazily when opened.

## Screenshots

### General View

![General View](assets/general_view.png)

### Interconnection View

![Interconnection View](assets/interconnection_view.png)

### Action Flow View

![Action Flow View](assets/action_flow_view.png)

### State Transition View

![State Transition View](assets/state_view.png)

### Hierarchy View

![Hierarchy View](assets/hierarchy_view.png)

### Graph View

![Graph View](assets/graph_view.png)

### Tree View

![Tree View](assets/tree_view.png)
<table>
<tr>
<td align="center"><strong>General</strong><br><img src="assets/general_view.png" width="250" alt="General View"></td>
<td align="center"><strong>Interconnection</strong><br><img src="assets/interconnection_view.png" width="250" alt="Interconnection View"></td>
<td align="center"><strong>Action Flow</strong><br><img src="assets/action_flow_view.png" width="250" alt="Action Flow View"></td>
<td align="center"><strong>State Transition</strong><br><img src="assets/state_view.png" width="250" alt="State Transition View"></td>
</tr>
<tr>
<td align="center"><strong>Hierarchy</strong><br><img src="assets/hierarchy_view.png" width="250" alt="Hierarchy View"></td>
<td align="center"><strong>Graph</strong><br><img src="assets/graph_view.png" width="250" alt="Graph View"></td>
<td align="center"><strong>Tree</strong><br><img src="assets/tree_view.png" width="250" alt="Tree View"></td>
<td></td>
</tr>
</table>

## Installation

Expand Down
Loading