diff --git a/examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/model/WorkflowNavigationTargetResolver.java b/examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/model/WorkflowNavigationTargetResolver.java index c683705c..f20cd9ff 100644 --- a/examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/model/WorkflowNavigationTargetResolver.java +++ b/examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/model/WorkflowNavigationTargetResolver.java @@ -20,6 +20,7 @@ import java.util.Set; import org.eclipse.glsp.example.workflow.wfgraph.TaskNode; +import org.eclipse.glsp.graph.GLabel; import org.eclipse.glsp.server.features.navigation.NavigationTarget; import org.eclipse.glsp.server.features.navigation.NavigationTargetResolution; import org.eclipse.glsp.server.features.navigation.NavigationTargetResolver; @@ -36,7 +37,8 @@ public NavigationTargetResolution resolve(final NavigationTarget navigationTarge if (navigationTarget.getArgs().containsKey("name")) { String name = navigationTarget.getArgs().get("name"); Set taskNodes = modelState.getIndex().findAll(modelState.getRoot(), TaskNode.class); - Optional element = taskNodes.stream().filter(node -> name.equals(node.getName())).findFirst(); + Optional element = taskNodes.stream().filter(node -> node.getChildren().stream() + .anyMatch(child -> child instanceof GLabel && ((GLabel) child).getText().equals("Push"))).findFirst(); if (element.isPresent()) { return new NavigationTargetResolution(Arrays.asList(element.get().getId())); }