Commit 123c3c32 authored by Johannes Eder's avatar Johannes Eder

context menu entry for delete action

Issue-Ref: 4004
Issue-Url: https://af3-developer.fortiss.org/issues/4004Signed-off-by: Johannes Eder's avatarJohannes Eder <eder@fortiss.org>
parent 8bba4e87
ContextMenuUtil.java 6d270ba4c239c35ee487192427d02797e73ee109 GREEN
ContextMenuUtil.java 2b862d2e5784115e30f76aa740a18f23a0e57b5e YELLOW
CurvedLinkLayoutedContentAnchorangeController.java e22faedbe98c3dab660b5d2df8ebd004e116c5ba GREEN
CurvedLinkLayoutedDiagramAnchorangeController.java f2e5e2a7cc9b6a070871e200e57371286bb15222 GREEN
EObjectDiagramController.java 18cbb2f092409adeb728233dae6e084faf357d6d GREEN
......
......@@ -70,6 +70,21 @@ public final class ContextMenuUtil {
return result;
}
/** Creates a delete menu entry */
public static MenuItem createDeleteMenu(EObject target) {
IElementCompositorService ecs = IElementCompositorService.getInstance();
ICommandStackService css = ICommandStackService.getInstance();
MenuItem deleteMenuItem = new MenuItem("Delete");
deleteMenuItem.setOnAction(evt -> {
css.runAsCommand(target, () -> {
ecs.decompose(target);
});
});
return deleteMenuItem;
}
/** Creates an auto-layout menu entry for {@link IHierarchicElement}s. */
public static MenuItem createAutoLayoutMenu(IHierarchicElement target) {
final String MENU_NAME = "Automatic layout";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment