}
}
clearErrorLabelText();
try {
BSHDecisionModel decisionModel = new BSHDecisionModel(variables);
for (int i = 0; i < transitionNames.size(); i++) {
IfExpr ifExpr;
if (labels[i].getText().equals(defaultTransitionCombo.getText())) {
ifExpr = new IfExpr(labels[i].getText());
} else {
Variable var1 = (Variable) comboBoxes[i][0].getData(DATA_VARIABLE_KEY);
String operationName = comboBoxes[i][1].getItem(comboBoxes[i][1].getSelectionIndex());
String lexem2Text = comboBoxes[i][2].getText();
Object lexem2;
Variable var2 = getVariableByName(lexem2Text);
if (var2 != null) {
lexem2 = var2;
} else {
lexem2 = lexem2Text;
}
BSHTypeSupport typeSupport = BSHTypeSupport.getByFormat(var1.getFormat());
ifExpr = new IfExpr(labels[i].getText(), var1, lexem2, Operation.getByName(operationName, typeSupport));
}
decisionModel.addIfExpr(ifExpr);
}
styledText.setText(decisionModel.generateCode());
} catch (RuntimeException e1) {
DesignerLogger.logError(e1);
setErrorLabelText(Messages.getString("BSHEditor.error.construct"));
}
}