// if(in_oParameter.getReference().equals(in_oReference))
// return in_oParameter;
if(in_oReference instanceof TCGOCLAtom) {
TCGOCLAtom oReferenceAtom = (TCGOCLAtom)in_oReference;
EObject oReferenceAtomReference = oReferenceAtom.getElement();
Parameter oReferencedParameter = null;
if(oReferenceAtomReference instanceof org.eclipse.ocl.uml.Variable) {
oReferencedParameter = ((org.eclipse.ocl.uml.Variable)oReferenceAtomReference).getRepresentedParameter();
}
if(oReferenceAtomReference instanceof org.eclipse.uml2.uml.Property) {
// nothing
}
TCGTransition oTraversedTransition = in_oTransitionInstance.getTransition();
List<Parameter> colMatchedEventParameters = new ArrayList<Parameter>();
colMatchedEventParameters.add(oReferencedParameter);
if(oTraversedTransition != null) {
colMatchedEventParameters.addAll(
TCGEventHelperClass.getEventParameters(oReferencedParameter, oTraversedTransition));
}
if(colMatchedEventParameters.contains(in_oParameter.getReference()))
return in_oParameter;
// TCGEventHelperClass.getMapExprParamToEventParam().get(oReferencedParameter);
// if((oMatchedEventParameter != null &&
// in_oParameter.getReference().equals(oMatchedEventParameter)) ||
// (oReferencedParameter != null &&
// in_oParameter.getReference().equals(oReferencedParameter)))
// return in_oParameter;
}
else if(in_oParameter instanceof TCGComplexParameter) {
TCGComplexParameter oComplexParameter = (TCGComplexParameter)in_oParameter;
for(TCGParameter oSubParameter : oComplexParameter.getParameter())
{
TCGParameter oFoundParameter = findParameterElementMatchingToReference(
oSubParameter, in_oTransitionInstance, in_oReference);
if(oFoundParameter != null)
return oFoundParameter;
}
}
else {
if(in_oReference instanceof Parameter) {
Parameter oReferencedParameter = (Parameter)in_oReference;
TCGTransition oTraversedTransition = in_oTransitionInstance.getTransition();
List<Parameter> colMatchedEventParameters = new ArrayList<Parameter>();
colMatchedEventParameters.add(oReferencedParameter);
if(oTraversedTransition != null) {
colMatchedEventParameters.addAll(