{
if(in_oOpExp.getLeft() instanceof TCGOCLOperation)
{
// noch beachten: variable nur mit Negationszeichen!
TCGOCLOperation oOpLeftExp = (TCGOCLOperation)in_oOpExp.getLeft();
OCLTreeExpressionFindObjectVisitor oVisitor = new OCLTreeExpressionFindObjectVisitor(in_oVariable);
OCLTreeExpressionIterator.run(oOpLeftExp.getLeft(), oVisitor);
// variable is on local right side -> exchange on left hand side left and right
if(!oVisitor.isFound())
{
// exchange sides
TCGOCLExpression oLeftSide = oOpLeftExp.getLeft();
oOpLeftExp.setLeft(oOpLeftExp.getRight());
oOpLeftExp.setRight(oLeftSide);
// influence relation operator correspondingly
if(oOpLeftExp.getOperationName().equals("+") || oOpLeftExp.getOperationName().equals("*"))
{
// nothing
}
else if(oOpLeftExp.getOperationName().equals("-"))
{
in_oOpExp.setOperationName(sm_colCorrespondingRelations.get(in_oOpExp.getOperationName()));
in_oOpExp.setRight(ExpressionConverter.negateTCGOCLExpression(in_oOpExp.getRight()));
}
else if(oOpLeftExp.getOperationName().equals("/"))
{
// TODO #### Fallunterscheidung einbauen
}
}
OCLTreeExpressionIterator.run(oOpLeftExp.getLeft(), oVisitor);
// variable is on local left side -> transfer local right side to the right
if(oVisitor.isFound())
{
TCGOCLExpression oLeftSide = oOpLeftExp.getLeft();
oOpLeftExp.setLeft(in_oOpExp.getRight());
in_oOpExp.setRight(oOpLeftExp);
in_oOpExp.setLeft(oLeftSide);
oOpLeftExp.setOperationName(sm_colCorrespondingOperations.get(oOpLeftExp.getOperationName()));
// multiplication or division with a negative number?
if((oOpLeftExp.getOperationName().compareTo("*") == 0) ||
(oOpLeftExp.getOperationName().compareTo("/") == 0))
{
// moved expression was negative
if(expressionIsNegative(oOpLeftExp.getRight()))
{
// exchange relation symbol
in_oOpExp.setOperationName(sm_colCorrespondingRelations.get(in_oOpExp.getOperationName()));
}
}