Skip to content

feat(editors): Cameo plugin running models on OpenSysML - #470

Merged
HuiJun merged 10 commits into
developfrom
feature/cameo-plugin
Sep 21, 2026
Merged

HuiJun merged 10 commits into
developfrom
feature/cameo-plugin

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

What and why

Phase 1 of docs/internals/design/cameo-plugin.md: a Resource Manager-installable plugin under editors/cameo/ that lets Cameo Systems Modeler 2026x Refresh1 (2024x Refresh3 as the minimum) run models on OpenSysML.

  • Context menu. An OpenSysML group on the containment-tree and diagram context menus with Instantiate, Execute action, Execute state machine, Verify requirement/constraint, Evaluate calc and Run analysis, offered for exactly one selected element. Verify picks verifyRequirement / verifySatisfaction / verifyConstraint from the symbol's kind.
  • Two model paths. A SysML v2 element (2026x) is exported through SysMLTextualNotationService.exportTextual; a SysML v1 element leaves as a .mdzip (the saved file when the project is clean, otherwise ProjectsManager.exportModule of the primary model) and goes through Connection.convertFile(…, "sysml"). Both continue with parseSources and the operation.
  • Results. A docking OpenSysML Results ProjectWindow per project with outcomes, diagnostics, final time and state schedule; double-click opens the element in the containment tree. Verdicts are posted as Annotations (passed → info, failed → error, error/cancelled → warning), replacing the previous run's.
  • Off the EDT. Export and identity indexing run on the EDT; the service call runs under ProgressStatusRunner with cancel. Cancel closes the connection (aborting the in-flight RPC); the next run reopens it. sysml-grpc starts on the first run, not at plugin load, and close() stops it.
  • Licence-free CI. openapi-stubs/ holds compile-only signatures of the com.nomagic.* / com.dassault_systemes.* API the plugin touches (every body throws UnsupportedOperationException("compile-only stub")); it is a provided dependency and never packaged. scripts/compile-against-cameo.sh compiles against a real installation via CAMEO_HOME.
  • Distribution. mvn -f editors/cameo/pom.xml -Dopensysml.version=vX.Y.Z package downloads the five sysml-grpc release assets, verifies each against the digest table the Java client jar ships (unpinned version or mismatch fails the build), generates plugin.xml with a <library> per runtime jar, and zips plugins/org.openmbee.opensysml.cameo/{plugin.xml,*.jar,lib/,bin/} plus data/resourcemanager/.
  • CI. New cameo-plugin job (also triggered by client/java/ changes) wired into the build-and-test gate; scripts/ci-changed-areas.sh gains a cameo area.

Deviations from the design document (recorded in §11.1 of the doc)

  • Maven instead of Gradle, matching client/java; the client is consumed as an installed artifact.
  • plugin-v2 is folded into plugin (package …cameo.v2): the KerML/textual classes are stubbed like the rest, so nothing forces a second module. The v2 path is taken only when the textual service class loads and the selection is a KerML element.
  • Identity is by qualified name on both paths, since Convert does not return the migration report yet; every candidate for an ambiguous name is annotated, and unmatched names are shown in the results window without an element link.
  • Six per-operation actions instead of a Run dialog; sweep, schedule policy and Reveal converted model are deferred.
  • The results window and annotations (phase 2 in the doc) are included; the RuleViolationResult bridge is not.
  • One lazily opened connection with cancel-by-close, rather than two connections with different deadlines.

Deferred

Step debugging, units, migration-report identity (needs the service change), RuleViolationResult / validation-suite bridge, sweeps.

How it was verified

  • mvn -f editors/cameo/pom.xml verify -Dopensysml.requireService=true — 24 tests: path selection, qualified-name normalization, identity index (ambiguity, quoted v1 names, IDs, instance-path prefixes), results mapping for all eight client result types, annotation severities, ownership walking, host-binary naming, descriptor generation, binary staging (valid, tampered, unpinned).
  • PipelineEndToEndTest against the real bin/sysml-grpc: a .mdzip built from tests/migrate/testdata/xmi/vehicle.xmiV1MdzipSource → convert → parse → verify 'Vehicle Design'::Vehicle::'positive mass' (passes) and Requirements::'Mass Requirement' (no evaluable condition → error → warning annotation); a v2 textual fixture → verify pass/fail with asserted annotation severities, instantiate, execute state (schedule), evaluate calc, missing-symbol error, cancellation before/during a run and reconnect afterwards.
  • mvn -f editors/cameo/pom.xml -Dopensysml.version=v0.3.0 verify produced OpenSysML_Cameo_v0.3.0.zip with all five platform binaries and a generated plugin.xml; -Dopensysml.version=v0.8.1 fails with version is not pinned.
  • scripts/ci-changed-areas-test.sh, python3 scripts/changelog.py check, python3 scripts/check-doc-ids.py, go vet ./..., gofmt -l . clean.

Checklist

  • make test and make lint pass locally
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved (compliance rows need nothing: the census is counted at docs build)
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

A Resource Manager-installable plugin for Cameo Systems Modeler 2026x Refresh1 (2024x
Refresh3 minimum) that runs the selected element on sysml-grpc through the Java client:
Instantiate, Execute action, Execute state machine, Verify requirement/constraint, Evaluate
calc and Run analysis from the browser and diagram context menus. SysML v2 projects leave
through the textual notation service, SysML v1 projects as a .mdzip migrated by Convert.
Results land in a docking window and as validation annotations, matched by qualified name.
The build compiles against compile-only OpenAPI stubs; the dist step stages the
digest-pinned service binaries for every platform and generates plugin.xml.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review September 20, 2026 18:41
devin-ai-integration[bot]

This comment was marked as resolved.

Filter the Resource Manager descriptor so the release version is
resolved, close a temporary v1 export when indexing fails, ignore
double-clicks on output rows without an element, report inconclusive
verification bodies as INCONCLUSIVE (warning annotation) instead of
FAILED, and show a calc's single named output as its value.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration[bot]

This comment was marked as resolved.

…ialog

Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration Bot and others added 2 commits September 20, 2026 18:52
Co-Authored-By: jason.han <hanhuijun@gmail.com>

# Conflicts:
#	.github/workflows/pr.yml
#	scripts/ci-changed-areas-test.sh
#	scripts/ci-changed-areas.sh
devin-ai-integration[bot]

This comment was marked as resolved.

…on and calc parsing

Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration Bot and others added 2 commits September 20, 2026 20:26
…lures; recurse Cameo jars when compiling

Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>

# Conflicts:
#	scripts/ci-changed-areas-test.sh
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

… mode

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@HuiJun
HuiJun merged commit d29fa1f into develop Sep 21, 2026
15 checks passed
@HuiJun
HuiJun deleted the feature/cameo-plugin branch September 21, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant