Community
Participate
Working Groups
Build Identifier: When multiple artifacts are selected in a class diagram the context contains the following actions: - Delete from diagram - Delete from model - Remove from diagram - Remove from model See attached screenshot for more details. Reproducible: Always Steps to Reproduce: Create a new class diagaram > Add two Entity artifacts > Add an association between the artifacts > select all the artifacts in the diagram > right click > see the redundant actions.
Created attachment 174670 [details] Screenshot
Interestingly enough... the association is the one triggering this! "Delete xxx" are the default actions contributed by GMF which don't work properly in our context as our model is not just the "Diagram mode" but the TS model contained in the Artifact Mgr. The others ("Remove...") are the Tigerstripe specific which work properly. I remember we edited the plugin.xml in the diagram plugin to explicitly avoid the "Delete..." flavors. It looks like something still remains when both shapes and edges are selected in a diagram?
Created attachment 175528 [details] Another screenshot I was able to reproduce this problem without an association. Actually selecting ANY artifact along with an Entity artifact will cause this problem.
Also, if you add a Note to your diagram, select all element, you don't get 'Remove from Model' and 'Remove from diagram' actions in the context menu.
Created attachment 176635 [details] Patch
The attached patch takes into account objects that are not of the same kind in the selection. We were filtering out the GMF actions using the 'object class' criteria, but didn't take into account the case where selection could contain different object classes.
Committed Patch. Modified Files: AssociationClassConnectionEditPart AbstractLabelEditPart AbstractArtifactReferencesEditPart Association2EditPart AssociationZEndNameEditPart AssociationClassAEndNameEditPart AssociationClass2EditPart AdaptableTigerstripeConnectionNodeEditPart ManagedEntityArtifactNamePackageEditPart AssociationClassClassStereotypesEditPart AbstractNamePackageEditPart AssociationClassAEndMultiplicityEditPart DatatypeArtifactNamePackageEditPart AssociationClassZEndNameEditPart AssociationClassZEndMultiplicityEditPart AssociationClassClassNamePackageEditPart AttributeNameTypeEditPart AssociationClassAssociatedClassEditPart AssociationClassClassMethodCompartmentEditPart AssociationAEndMultiplicityEditPart AssociationAEndMultiplicityEditPart DatatypeArtifactEditPart AssociationStereotypesEditPart DatatypeArtifactAttributeCompartmentEditPart AssociationAEndNameEditPart AssociationNamePackageEditPart AssociationZEndMultiplicityEditPart AssociationClassClassAttributeCompartmentEditPart DatatypeArtifactMethodCompartmentEditPart org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram/plugin.xml