Community
Participate
Working Groups
Build Identifier: This enhancement is inspired by Comment#2 in bug#221443 (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=221443#c2). We should provide an easy way to convert an Entity to a DataType and vice versa. The backbone for artifact conversion in diagrams has been submitted thru the fix for bug#221443. We should be able to use that code to provide this functionality. Reproducible: Always
When refactoring from an Entity to a Datatype, any associations / association classes to the Entity will need to be removed. User should be warned and needs to confirm to continue. Also if the artefact has a parent this will need to be removed as Entities can only have an Entity parent an Datatypes only a Datatype parent.
Activation should be via right click in diagram or explorer. Please also add option to explorer right click menu for Refactor Association <-> Association Class (do here rather than reopening Bug 221443)
Please also see bug#221443 for a similar enhancement that was implemented.
Also need to consider if the artefact has children. Rather than make the logic really complex, it may make sense to require the user to first remove : * parents * children * associations before converting. A more complex solution would be to : * if there is a parent, tell user, and remove it on conversion * if there are children, prompt to either remove them or to convert them as well * if there are associations then prompt the user then delete them I'll leave it to you as to what you think is reasonable.
Created attachment 198253 [details] TS-325174.patch.txt Done. I made this as undoable workspace operation for all diagrams and artifacts in workspace. I also added a dialog to choose what to do if artifacts have parents, children or association.
I've applied the patch.
Verified. Thanks!