class TreeExplorerView extends Composite implements TreeExplorer.View {

    @Override
    public void init(final TreeExplorer presenter) {
        this.presenter = presenter;
        initWidget(uiBinder.createAndBindUi(this));

        handlerRegistration = tree.addSelectionHandler(selectionEvent ->
                                                       {
                                                           final TreeItem item = selectionEvent.getSelectedItem();
                                                           final String uuid = item.getUuid();
                                                           final Shape shape = presenter.getCanvasHandler().getCanvas().getShape(uuid);

                                                           if (shape != null) {
                                                               presenter.onSelect(uuid);
                                                           }
                                                       });
    }

    @Inject public  TreeExplorerView(final Tree<TreeItem> tree);
      TreeExplorerView(final TreeExplorer presenter,
                     final Tree<TreeItem> tree,
                     final HandlerRegistration handlerRegistration
    );

}