use of org.drools.workbench.screens.guided.dtable.client.wizard.column.NewGuidedDecisionTableColumnWizard in project drools-wb by kiegroup.
the class ColumnsPagePresenter method openNewGuidedDecisionTableColumnWizard.
void openNewGuidedDecisionTableColumnWizard() {
if (!isColumnCreationEnabledToActiveDecisionTable()) {
return;
}
getActiveDecisionTable().ifPresent(dt -> {
final NewGuidedDecisionTableColumnWizard wizard = wizardManagedInstance.get();
wizard.init(dt);
wizard.start();
});
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.NewGuidedDecisionTableColumnWizard in project drools-wb by kiegroup.
the class InsertMenuBuilder method openNewGuidedDecisionTableColumnWizard.
void openNewGuidedDecisionTableColumnWizard(final GuidedDecisionTableModellerView.Presenter modeller) {
final NewGuidedDecisionTableColumnWizard wizard = wizardManagedInstance.get();
final Optional<GuidedDecisionTableView.Presenter> activeDecisionTable = modeller.getActiveDecisionTable();
activeDecisionTable.ifPresent(dt -> {
wizard.init(dt);
wizard.start();
});
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.NewGuidedDecisionTableColumnWizard in project drools-wb by kiegroup.
the class InsertMenuBuilderTest method testOnAppendColumnWhenModellerIsPresent.
@Test
public void testOnAppendColumnWhenModellerIsPresent() {
final NewGuidedDecisionTableColumnWizard wizard = mock(NewGuidedDecisionTableColumnWizard.class);
doReturn(wizard).when(wizardManagedInstance).get();
when(modeller.getActiveDecisionTable()).thenReturn(Optional.of(dtPresenter));
builder.setModeller(modeller);
builder.onAppendColumn();
verify(builder).openNewGuidedDecisionTableColumnWizard(modeller);
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.NewGuidedDecisionTableColumnWizard in project drools-wb by kiegroup.
the class InsertMenuBuilderTest method testOnAppendColumnWhenActiveDecisionTableIsNotPresent.
@Test
public void testOnAppendColumnWhenActiveDecisionTableIsNotPresent() {
final NewGuidedDecisionTableColumnWizard wizard = mock(NewGuidedDecisionTableColumnWizard.class);
when(wizardManagedInstance.get()).thenReturn(wizard);
when(modeller.getActiveDecisionTable()).thenReturn(Optional.empty());
builder.setModeller(modeller);
builder.onAppendColumn();
verify(wizard, never()).init(any(GuidedDecisionTableView.Presenter.class));
verify(wizard, never()).start();
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.NewGuidedDecisionTableColumnWizard in project drools-wb by kiegroup.
the class ColumnsPagePresenterTest method testOpenNewGuidedDecisionTableColumnWizardWhenColumnCreatingIsNotEnabled.
@Test
public void testOpenNewGuidedDecisionTableColumnWizardWhenColumnCreatingIsNotEnabled() {
final NewGuidedDecisionTableColumnWizard wizard = mock(NewGuidedDecisionTableColumnWizard.class);
doReturn(false).when(presenter).isColumnCreationEnabledToActiveDecisionTable();
doReturn(wizard).when(wizardManagedInstance).get();
presenter.openNewGuidedDecisionTableColumnWizard();
verify(wizard, never()).init(any());
verify(wizard, never()).start();
}
Aggregations