{
bReachingTransitionBearsConflicts = true;
}
else
{
TCGEvent oTCGEvent = createTCGEvent(in_oEvent, in_bCreateTCGEventIfEventIsNull);
TCGTransition oTransition = createTCGPart(in_oTCGNode,
(oTCGEvent != null ? oTCGEvent.getName() : Configuration.getDefaultTransitionName()));
// remember original expression
oTransition.getTargetNode().setOriginalExpression(in_oExpression);
if(oTransition != null)
{
boolean bResult = true;
// adapt all parameters of all expressions of the conjunction
for(TCGOCLExpression oExpression : oConjunction.getExpressions())
{
adaptTCGOCLExpression(oExpression, oTransition, oTCGEvent, in_oContextClass);
if(oTransition.getPrecondition().getConjunctions().isEmpty())
oTransition.getPrecondition().getConjunctions().add(
GeneratedFactory.eINSTANCE.createTCGConjunction());
oTransition.getPrecondition().getConjunctions().get(0).getExpressions().add(oExpression);
bResult = bResult && adaptDomainForNonPostcondition(oExpression, oTransition.getTargetNode(), oTransition.getTargetNode());
}
if(bResult == false)
{
removeTransition(oTransition);
bReachingTransitionBearsConflicts = true;
}
else
{
// mark node as its purpose is just to negate an expression
if(!oConjunction.isPositiveSubExpressionOfOriginal())
oTransition.getTargetNode().setCorrespondsNegativeExpression(true);
colNodes.add(oTransition.getTargetNode());
}
}
}
}
}
// expression results in no new nodes and no conflicts found? -> add default node
if(colNodes.isEmpty() && !bReachingTransitionBearsConflicts)
{
TCGEvent oTCGEvent = createTCGEvent(in_oEvent, true);
TCGTransition oTransition = createTCGPart(in_oTCGNode, oTCGEvent.getName());
if(oTransition != null)
{
addEvent(null, oTransition, oTCGEvent, in_oContextClass);
colNodes.add(oTransition.getTargetNode());
}