use of org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.DecisionTableColumnPlugin in project drools-wb by kiegroup.
the class SummaryPage method openPage.
void openPage(final String selectedItemText) {
if (selectedItemText.isEmpty() || presenter.isReadOnly()) {
return;
}
final DecisionTableColumnPlugin plugin = findPluginByIdentifier(selectedItemText);
wizard.start(plugin);
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.DecisionTableColumnPlugin in project drools-wb by kiegroup.
the class SummaryPageView method loadPluginList.
@Override
public void loadPluginList(final List<DecisionTableColumnPlugin> plugins) {
pluginsList.clear();
for (final DecisionTableColumnPlugin plugin : plugins) {
pluginsList.addItem(plugin.getTitle(), plugin.getIdentifier());
}
pluginsList.setVisibleItemCount(pluginsList.getItemCount());
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.DecisionTableColumnPlugin in project drools-wb by kiegroup.
the class PluginHandler method edit.
public void edit(final ActionCol52 column) {
final DecisionTableColumnPlugin plugin;
if (column instanceof ActionWorkItemSetFieldCol52 || column instanceof ActionWorkItemInsertFactCol52) {
plugin = actionWorkItemSetFieldPlugin.get();
} else if (column instanceof ActionInsertFactCol52 || column instanceof ActionSetFieldCol52) {
plugin = actionSetFactPlugin.get();
} else if (column instanceof ActionRetractFactCol52) {
plugin = actionRetractFactPlugin.get();
} else if (column instanceof ActionWorkItemCol52) {
plugin = actionWorkItemPlugin.get();
} else if (column instanceof BRLActionColumn) {
plugin = brlActionColumnPlugin.get();
} else {
return;
}
plugin.setOriginalColumnConfig52(column);
openWizard(plugin);
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.DecisionTableColumnPlugin in project drools-wb by kiegroup.
the class PluginHandlerTest method testOpenWizardWhenTableIsReadOnly.
@Test
public void testOpenWizardWhenTableIsReadOnly() throws Exception {
final DecisionTableColumnPlugin plugin = mock(DecisionTableColumnPlugin.class);
final NewGuidedDecisionTableColumnWizard wizard = mock(NewGuidedDecisionTableColumnWizard.class);
doReturn(true).when(presenter).isReadOnly();
doReturn(wizard).when(wizardManagedInstance).get();
pluginHandler.openWizard(plugin);
verify(wizard, never()).init(presenter);
verify(wizard, never()).start(plugin);
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.DecisionTableColumnPlugin in project drools-wb by kiegroup.
the class PluginHandlerTest method testOpenWizardWhenTableIsNotReadOnly.
@Test
public void testOpenWizardWhenTableIsNotReadOnly() throws Exception {
final DecisionTableColumnPlugin plugin = mock(DecisionTableColumnPlugin.class);
final NewGuidedDecisionTableColumnWizard wizard = mock(NewGuidedDecisionTableColumnWizard.class);
doReturn(false).when(presenter).isReadOnly();
doReturn(wizard).when(wizardManagedInstance).get();
pluginHandler.openWizard(plugin);
verify(wizard).init(presenter);
verify(wizard).start(plugin);
}
Aggregations