(in_oEvent.isDefaultEvent() == true) ||
m_oTestCaseRunnerState.getCurrentTransitionPath().isEmpty())
return ErrorClass.OK;
// current transition instance
TransitionInstance oTransitionInstance =
m_oTestCaseRunnerState.getCurrentTransitionPath().get(
m_oTestCaseRunnerState.getCurrentTransitionPath().size() - 1);
/*
* create new event parameter instances for all referenced parameters:
*/
for(TCGOCLExpression oOCLExp : m_oTestCaseRunnerState.getConditionsToBeSatisfied())
{
// TODO AAA hier die ganze Liste von Eingabeparametern abarbeiten!
// Object oObject = TCGOCLExpressionHelperClass.getInputParametersFromExpression(oOCLExp);
// if(oObject != null)
// {
// if(TCGOCLExpressionHelperClass.getPassiveDependentVariablesAndInputParameters(oOCLExp).size() == 1) {
for(Object oObject : TCGOCLExpressionHelperClass.getInputParametersFromExpression(oOCLExp)) {
for(TCGParameter oTCGParameter : in_oEvent.getParameters())
{
TCGParameter oReferencedTCGParameter =
TCGParameterHelperClass.findParameterElementMatchingToReference(
oTCGParameter, oTransitionInstance, oObject);
// referenced parameter
if(oReferencedTCGParameter != null)
{
ValueTypeRange oValueTypeRange =
OCLExpressionValueTypeRangeFactory.getValueTypeRangeForRightSideOfExpression(
oReferencedTCGParameter, oOCLExp);
if(oValueTypeRange == null)
return ErrorClass.NOSOLUTION;
// return contradiction if integer should be equal to a non-integer value
if(TCGOCLExpressionHelperClass.isLastIntegerComputationWasIncorrect()) {
if (oOCLExp instanceof TCGOCLOperation) {
TCGOCLOperation oCallExp = (TCGOCLOperation) oOCLExp;
if(oCallExp.getOperationName().equals("="))
return ErrorClass.CONTRADICTION;
// if(oCallExp.getOperationName().equals(">=")) {
// oCallExp.setOperationName(">");
// }
}
}
boolean bAdaptationSuccessful = oTransitionInstance.adaptEventParameterValueRanges(
oReferencedTCGParameter, oValueTypeRange);
if(bAdaptationSuccessful) {
// remember the elements that should not be considered from now on
in_oExpressionChangeLog.getRemovedExpressions().add(oOCLExp);
}
else
//return ErrorClass.NOSOLUTION;
return ErrorClass.CONTRADICTION;
}
}
}
}
// }
if(Configuration.isSearchForMutualDependentInputParameters()) {
/*
* create event parameter instances for later evaluated expressions
* - with a reference to the corresponding expression copy
*/
for(LateEvaluationGroup oGroup : m_oTestCaseRunnerState.getLateEvaluationGroups()) {
List<TCGOCLAtom> colRemovedElements = new ArrayList<TCGOCLAtom>();
for(TCGOCLAtom oAtom : oGroup.getElementsToFindPostconditionFor()) {
for(TCGParameter oTCGParameter : in_oEvent.getParameters())
{
TCGParameter oReferencedTCGParameter =
TCGParameterHelperClass.findParameterElementMatchingToReference(
oTCGParameter, oTransitionInstance, oAtom);
// referenced parameter
if(oReferencedTCGParameter != null)
{
// try to find matching eventparameterinstances and reuse them
// TODO: check: klappt das immer?
EventParameterInstance oEPInstance =
oTransitionInstance.getInstanceForTCGParameter(oReferencedTCGParameter);
// if not found: create a new one
if(oEPInstance == null) {
oEPInstance = new EventParameterInstance(oReferencedTCGParameter, oTransitionInstance);
oTransitionInstance.getParameterInstances().add(oEPInstance);
}
// remove the atom from the list of searched elements
colRemovedElements.add(oAtom);
// establish a connection between the atom and the event parameter instance