@Test public void testAddSave() { final MenuItem menuItem = mock(MenuItem.class); when(versionRecordManager.newSaveMenuItem(any(ParameterizedCommand.class))) .thenReturn(menuItem); presenter.addSave(fileMenuBuilder); verify(fileMenuBuilder).addSave(menuItem); }
protected void addSave(final FileMenuBuilder fileMenuBuilder) { final ParameterizedCommand<Boolean> onSave = withComments -> { saveWithComments = withComments; saveAction(); }; fileMenuBuilder.addSave(versionRecordManager.newSaveMenuItem(onSave)); }
KieEditor extends BaseEditor<T, Metadata> implements KieEditorWrapperView.KieEditorWrapperPresenter { protected void addSave(final FileMenuBuilder fileMenuBuilder) { final ParameterizedCommand<Boolean> onSave = withComments -> { saveWithComments = withComments; saveAction(); }; fileMenuBuilder.addSave(versionRecordManager.newSaveMenuItem(onSave)); } }
KieEditor extends BaseEditor<T, Metadata> implements KieEditorWrapperView.KieEditorWrapperPresenter { protected void addSave(final FileMenuBuilder fileMenuBuilder) { final ParameterizedCommand<Boolean> onSave = withComments -> { saveWithComments = withComments; saveAction(); }; fileMenuBuilder.addSave(versionRecordManager.newSaveMenuItem(onSave)); } protected  KieEditor(); protected  KieEditor(final KieEditorView baseView); }
KieEditor extends BaseEditor<T, Metadata> implements KieEditorWrapperView.KieEditorWrapperPresenter { protected void addSave(final FileMenuBuilder fileMenuBuilder) { final ParameterizedCommand<Boolean> onSave = withComments -> { saveWithComments = withComments; saveAction(); }; fileMenuBuilder.addSave(versionRecordManager.newSaveMenuItem(onSave)); } protected  KieEditor(); protected  KieEditor(final KieEditorView baseView); void onShowDiagramEditorDocks(@Observes PlaceGainFocusEvent event); void onHideDocks(@Observes PlaceHiddenEvent event); void showDocks(); void hideDocks(); boolean verifyEventIdentifier(AbstractPlaceEvent event); @Override void setOriginalHash(Integer originalHash); boolean mayClose(Object object); @OnClose void onClose(); void addDownloadMenuItem(final FileMenuBuilder fileMenuBuilder); @Override Validator getRenameValidator(); void setSelectedTab(int index); IsWidget getWidget(); void onRepositoryRemoved(final @Observes RepositoryRemovedEvent event); @Override boolean mayClose(Integer currentHash); @Override void onOverviewSelected(); @Override void onSourceTabSelected(); @Override void onEditTabSelected(); @Override void onEditTabUnselected(); void addTabBarWidget(final IsWidget customWidget); }
KieEditor extends BaseEditor<T, Metadata> implements KieEditorWrapperView.KieEditorWrapperPresenter { protected void addSave(final FileMenuBuilder fileMenuBuilder) { final ParameterizedCommand<Boolean> onSave = withComments -> { saveWithComments = withComments; saveAction(); }; fileMenuBuilder.addSave(versionRecordManager.newSaveMenuItem(onSave)); } protected  KieEditor(); protected  KieEditor(final KieEditorView baseView); void onShowDiagramEditorDocks(@Observes PlaceGainFocusEvent event); void onHideDocks(@Observes PlaceHiddenEvent event); void showDocks(); void hideDocks(); boolean verifyEventIdentifier(AbstractPlaceEvent event); @Override void setOriginalHash(Integer originalHash); boolean mayClose(Object object); @OnClose void onClose(); void addDownloadMenuItem(final FileMenuBuilder fileMenuBuilder); @Override Validator getRenameValidator(); void setSelectedTab(int index); IsWidget getWidget(); void onRepositoryRemoved(final @Observes RepositoryRemovedEvent event); @Override boolean mayClose(Integer currentHash); @Override void onOverviewSelected(); @Override void onSourceTabSelected(); @Override void onEditTabSelected(); @Override void onEditTabUnselected(); void addTabBarWidget(final IsWidget customWidget);  }