From e7713ee096129730c465d3abbb66613ca1d416f5 Mon Sep 17 00:00:00 2001 From: Tobias Ortmayr Date: Wed, 12 Jun 2024 07:58:09 +0200 Subject: [PATCH] Configure fork and join nodes as not resizable (#232) Update type hints configuration for workflow example to make fork and join nodes not resizable => we have test cases for both resizable and non-resizable elements in the diagram --- .../workflow/WorkflowDiagramConfiguration.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/WorkflowDiagramConfiguration.java b/examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/WorkflowDiagramConfiguration.java index aa5f894f..bb28db4d 100644 --- a/examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/WorkflowDiagramConfiguration.java +++ b/examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/WorkflowDiagramConfiguration.java @@ -68,14 +68,18 @@ public Map getTypeMappings() { @Override public List getShapeTypeHints() { List nodeHints = new ArrayList<>(); - nodeHints.add(new ShapeTypeHint(MANUAL_TASK, true, true, true, true)); - nodeHints.add(new ShapeTypeHint(AUTOMATED_TASK, true, true, true, true)); - ShapeTypeHint catHint = new ShapeTypeHint(CATEGORY, true, true, true, true); + nodeHints.add(createDefaultShapeTypeHint(MANUAL_TASK)); + nodeHints.add(createDefaultShapeTypeHint(AUTOMATED_TASK)); + ShapeTypeHint catHint = createDefaultShapeTypeHint(CATEGORY); catHint.setContainableElementTypeIds( Arrays.asList(TASK, ACTIVITY_NODE, CATEGORY)); nodeHints.add(catHint); - nodeHints.add(createDefaultShapeTypeHint(FORK_NODE)); - nodeHints.add(createDefaultShapeTypeHint(JOIN_NODE)); + ShapeTypeHint forkHint = createDefaultShapeTypeHint(FORK_NODE); + forkHint.setResizable(false); + nodeHints.add(forkHint); + ShapeTypeHint joinHint = createDefaultShapeTypeHint(JOIN_NODE); + joinHint.setResizable(false); + nodeHints.add(joinHint); nodeHints.add(createDefaultShapeTypeHint(DECISION_NODE)); nodeHints.add(createDefaultShapeTypeHint(MERGE_NODE)); return nodeHints;