class CaseManagementCanvasHighlightVisitor extends CanvasHighlightVisitor {

    @Override
    @SuppressWarnings("unchecked")
    protected void prepareVisit(Command command) {
        final Graph graph = canvasHandler.getDiagram().getGraph();

        new ChildrenTraverseProcessorImpl(new TreeWalkTraverseProcessorImpl())
                .traverse(graph,
                          new ChildrenTraverseCallback<Node<View, Edge>, Edge<Child, Node>>() {
                              @Override
                              public boolean startNodeTraversal(List<Node<View, Edge>> parents, Node<View, Edge> node) {
                                  addShape(node.getUUID());
                                  return true;
                              }

                              @Override
                              public void startGraphTraversal(Graph<DefinitionSet, Node<View, Edge>> graph) {

                              }

                              @Override
                              public void startEdgeTraversal(Edge<Child, Node> edge) {

                              }

                              @Override
                              public void endEdgeTraversal(Edge<Child, Node> edge) {

                              }

                              @Override
                              public void startNodeTraversal(Node<View, Edge> node) {
                                  addShape(node.getUUID());
                              }

                              @Override
                              public void endNodeTraversal(Node<View, Edge> node) {

                              }

                              @Override
                              public void endGraphTraversal() {
                                  command.execute();
                              }

                              private void addShape(final String uuid) {
                                  final Shape shape = canvasHandler.getCanvas().getShape(uuid);
                                  if (null != shape) {
                                      shapes.add(shape);
                                  }
                              }
                          });
    }

}