feat(editors): Cameo plugin running models on OpenSysML - #470
Merged
Merged
Conversation
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>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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>
…ialog Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # .github/workflows/pr.yml # scripts/ci-changed-areas-test.sh # scripts/ci-changed-areas.sh
…on and calc parsing Co-Authored-By: jason.han <hanhuijun@gmail.com>
…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
Co-Authored-By: jason.han <hanhuijun@gmail.com>
… mode Co-Authored-By: jason.han <hanhuijun@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Phase 1 of
docs/internals/design/cameo-plugin.md: a Resource Manager-installable plugin undereditors/cameo/that lets Cameo Systems Modeler 2026x Refresh1 (2024x Refresh3 as the minimum) run models on OpenSysML.verifyRequirement/verifySatisfaction/verifyConstraintfrom the symbol's kind.SysMLTextualNotationService.exportTextual; a SysML v1 element leaves as a.mdzip(the saved file when the project is clean, otherwiseProjectsManager.exportModuleof the primary model) and goes throughConnection.convertFile(…, "sysml"). Both continue withparseSourcesand the operation.ProjectWindowper project with outcomes, diagnostics, final time and state schedule; double-click opens the element in the containment tree. Verdicts are posted asAnnotations (passed → info, failed → error, error/cancelled → warning), replacing the previous run's.ProgressStatusRunnerwith cancel. Cancel closes the connection (aborting the in-flight RPC); the next run reopens it.sysml-grpcstarts on the first run, not at plugin load, andclose()stops it.openapi-stubs/holds compile-only signatures of thecom.nomagic.*/com.dassault_systemes.*API the plugin touches (every body throwsUnsupportedOperationException("compile-only stub")); it is aprovideddependency and never packaged.scripts/compile-against-cameo.shcompiles against a real installation viaCAMEO_HOME.mvn -f editors/cameo/pom.xml -Dopensysml.version=vX.Y.Z packagedownloads the fivesysml-grpcrelease assets, verifies each against the digest table the Java client jar ships (unpinned version or mismatch fails the build), generatesplugin.xmlwith a<library>per runtime jar, and zipsplugins/org.openmbee.opensysml.cameo/{plugin.xml,*.jar,lib/,bin/}plusdata/resourcemanager/.cameo-pluginjob (also triggered byclient/java/changes) wired into thebuild-and-testgate;scripts/ci-changed-areas.shgains acameoarea.Deviations from the design document (recorded in §11.1 of the doc)
client/java; the client is consumed as an installed artifact.plugin-v2is folded intoplugin(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.Convertdoes 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.RuleViolationResultbridge is not.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).PipelineEndToEndTestagainst the realbin/sysml-grpc: a.mdzipbuilt fromtests/migrate/testdata/xmi/vehicle.xmi→V1MdzipSource→ convert → parse → verify'Vehicle Design'::Vehicle::'positive mass'(passes) andRequirements::'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 verifyproducedOpenSysML_Cameo_v0.3.0.zipwith all five platform binaries and a generatedplugin.xml;-Dopensysml.version=v0.8.1fails withversion 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 testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelog