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);
}
}
Aggregations