Source:
private void initActionButtons() { getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.createSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getNewCommand(); } }); List<ActionButtonDefinition<Snapshot>> previewSubActions = new LinkedList<>(); previewSubActions.add(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.customPreviewSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getCustomPreviewCommand(); } }); getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>( getEventBus(), constants.previewSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getPreviewCommand(); } }, new DropdownActionButton<>(previewSubActions, new DropdownActionButton.SelectedItemsProvider<Snapshot>() { @Override public List<Snapshot> getSelectedItems() { return getModel().getSelectedItems(); } })); getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.commitSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getCommitCommand(); } }); getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.undoSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getUndoCommand(); } }); getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.deleteSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getRemoveCommand(); } }); getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.cloneSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getCloneVmCommand(); } @Override public SafeHtml getTooltip() { String tooltip = this.getText(); return SafeHtmlUtils.fromString(tooltip); } }); getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.makeTemplateFromSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getCloneTemplateCommand(); } }); }

Target:
private void initActionButtons() { getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.createSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getNewCommand(); } }); List<ActionButtonDefinition<Snapshot>> previewSubActions = new LinkedList<>(); previewSubActions.add(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.customPreviewSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getCustomPreviewCommand(); } }); getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>( getEventBus(), constants.previewSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getPreviewCommand(); } }, new DropdownActionButton<>(previewSubActions, new DropdownActionButton.SelectedItemsProvider<Snapshot>() { @Override public List<Snapshot> getSelectedItems() { return getModel().getSelectedItems(); } })); getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.commitSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getCommitCommand(); } }); getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.undoSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getUndoCommand(); } }); getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.deleteSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getRemoveCommand(); } }); getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.cloneSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getCloneVmCommand(); } }); getTable().addActionButton(new UiCommandButtonDefinition<Snapshot>(getEventBus(), constants.makeTemplateFromSnapshot()) { @Override protected UICommand resolveCommand() { return getModel().getCloneTemplateCommand(); } }); }