|Re: [mdt-papyrus.dev] Modeling Assistants & VisualID|
Did you managed to reach either Christian or Maged?
Christian implemented most of the Assistant framework and Maged was the one to deprecate ModelingAssistantUtil.isVisualID method.
Element type representing stereotypes use qualified name for hint (Ex: The hint for Requirement ElementType is UML::Class)
Maybe this is the kind non visual hint? Did you test with it ?
In any case, I never managed to specialize assistants for a DSML, so SysML 1.4 won’t be impacted.
De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx]
De la part de Camille Letavernier
While migrating a project to Oxygen, I've noticed an issue with the model-based Modeling Assistants. If they reference an Element Type with a Semantic Hint, Modeling Assistants are supposed to use that hint to instantiate the proper representation. If the hint is not specified, the Modeling Assistants will generate the cross-product of all possible representations.
However, the code is still based on Integer VisualIDs, so in practice, the cross-product will always be generated (Which results in many duplicate assistants). There is a test checking whether the Semantic Hint corresponds to a VisualID pattern (Checking that it is a 4+ digits). I wonder why this test was even required to begin with? Wouldn't it be sufficient to check that there is a non-null, non-empty Semantic Hint, regardless of its actual form?
My proposed patch does just that, but since I don't know why the test was initially there, I'd like to confirm that it doesn't break any other customization. Does anyone have an ElementTypeSet using Semantic Hints, which are not used as a visual hint? (If in doubt, please try my patch below   , and check that your modeling assistants work as expected - with no duplicates, and no missing entry).
Also, if someone knows why the VisualID test was initially there, please comment on the Bugzilla, as it might help figuring out if the patch may actually cause bad side effects.
 Bug 525204: [Modeling Assistants] Model-based modeling assistants rely on the deprecated Integer VisualIDs
 Oxygen patch: https://git.eclipse.org/r/#/c/105779/
 Photon patch: https://git.eclipse.org/r/#/c/105936/
Senior Software Engineer
Phone: +33 1 85 41 09 21
EclipseSource France SAS
7 rue de la Croix Martre
General Manager: Remi Schnekenburger
Registered Office: 7 rue de la Croix Martre, 91120 Palaiseau, France
Commercial Register 824 977 516 R.C.S. EVRY
Back to the top