I was in the process of adding some logic to remove stereotype references for terminology constraints
It seems we have two hooks being leveraged to support the actions - i wanted to confirm the way forward
We have the org.openhealthtools.mdht.uml.ui.navigator.actions.DeleteUMLAction - which supplies a command that manages all the associations during delete
We have org.openhealthtools.mdht.uml.edit.command.RemoveCommandWrapper which supports managing stereotypes and some properties
while the both leverage commands - they are using to different “hooking” mechanisms
the DeleteUMLAction uses org.eclipse.uml2.common.edit.command.ChangeCommand.ChangeCommand by overwriting the org.eclipse.emf.edit.ui.action.CommandActionHandler in the org.openhealthtools.mdht.uml.ui.navigator.actions.EditCommandsFactory
org.openhealthtools.mdht.uml.edit.command.RemoveCommandWrapper uses the adapter pattern by modifying the org.openhealthtools.mdht.uml.edit.provider.UMLEditingDomainAdapterFactory implementation
I assume we want to leverage the adapter “pattern” but wanted to confirm
currently we only have adapters for a handful of the commands
result.put(AddCommand.class, new AddCommandWrapper()); result.put(CreateCopyCommand.class, new CreateCopyCommandWrapper()); result.put(InitializeCopyCommand.class, new InitializeCopyCommandWrapper()); result.put(RemoveCommand.class, new RemoveCommandWrapper());
We do not have a clean mechanism to allow for domains (CDA but i suppose FHIR will need this as well) to have specialized commands - in this case making sure that deleting an enumeration that is referenced in a constraints does not result in an invalid uml model instances
Dave - have you looked a papyrus recently to see if they built such extensions ?
thanks
Sean
|