Search in sources :

Example 1 with SetInstanceHeaderCommand

use of org.drools.workbench.screens.scenariosimulation.client.commands.actualcommands.SetInstanceHeaderCommand in project drools-wb by kiegroup.

the class ScenarioSimulationEventHandler method onEvent.

@Override
public void onEvent(SetInstanceHeaderEvent event) {
    if (context.getAbstractScesimGridModelByGridWidget(event.getGridWidget()).isSameInstanceType(event.getClassName())) {
        return;
    }
    context.getStatus().setFullPackage(event.getFullPackage());
    context.getStatus().setClassName(event.getClassName());
    if (((ScenarioGridColumn) context.getAbstractScesimGridModelByGridWidget(event.getGridWidget()).getSelectedColumn()).isInstanceAssigned()) {
        org.uberfire.mvp.Command okPreserveCommand = () -> commonExecution(new SetInstanceHeaderCommand(event.getGridWidget()), true);
        deletePopupPresenter.show(ScenarioSimulationEditorConstants.INSTANCE.changeTypeMainTitle(), ScenarioSimulationEditorConstants.INSTANCE.changeTypeMainQuestion(), ScenarioSimulationEditorConstants.INSTANCE.changeTypeText1(), ScenarioSimulationEditorConstants.INSTANCE.changeTypeTextQuestion(), ScenarioSimulationEditorConstants.INSTANCE.changeTypeTextDanger(), ScenarioSimulationEditorConstants.INSTANCE.changeType(), okPreserveCommand);
    } else {
        commonExecution(new SetInstanceHeaderCommand(event.getGridWidget()), true);
    }
}
Also used : ScenarioGridColumn(org.drools.workbench.screens.scenariosimulation.client.widgets.ScenarioGridColumn) SetInstanceHeaderCommand(org.drools.workbench.screens.scenariosimulation.client.commands.actualcommands.SetInstanceHeaderCommand)

Aggregations

SetInstanceHeaderCommand (org.drools.workbench.screens.scenariosimulation.client.commands.actualcommands.SetInstanceHeaderCommand)1 ScenarioGridColumn (org.drools.workbench.screens.scenariosimulation.client.widgets.ScenarioGridColumn)1