}
@Override
public void emitBinaryOperator(IBinaryOperatorNode node)
{
ASTNodeID id = node.getNodeID();
if (id == ASTNodeID.Op_InID
|| id == ASTNodeID.Op_LogicalAndAssignID
|| id == ASTNodeID.Op_LogicalOrAssignID)
{
super.emitBinaryOperator(node);
}
else if (id == ASTNodeID.Op_IsID || id == ASTNodeID.Op_AsID)
{
emitIsAs(node.getLeftOperandNode(), node.getRightOperandNode(), id, false);
}
else if (id == ASTNodeID.Op_InstanceOfID)
{
getWalker().walk(node.getLeftOperandNode());
write(ASEmitterTokens.SPACE);
writeToken(ASEmitterTokens.INSTANCEOF);
IDefinition dnode = (node.getRightOperandNode()).resolve(project);
if (dnode != null)
write(dnode.getQualifiedName());
else
getWalker().walk(node.getRightOperandNode());
}
else
{
IExpressionNode leftSide = node.getLeftOperandNode();
IExpressionNode property = null;
int leftSideChildCount = leftSide.getChildCount();
if (leftSideChildCount > 0)
{
IASNode childNode = leftSide.getChild(leftSideChildCount - 1);
if (childNode instanceof IExpressionNode)
property = (IExpressionNode) childNode;
else
property = leftSide;
}
else
property = leftSide;
IDefinition def = null;
if (property instanceof IIdentifierNode)
def = ((IIdentifierNode) property).resolve(getWalker()
.getProject());
boolean isSuper = false;
if (leftSide.getNodeID() == ASTNodeID.MemberAccessExpressionID)
{
IASNode cnode = leftSide.getChild(0);
ASTNodeID cId = cnode.getNodeID();
isSuper = cId == ASTNodeID.SuperID;
}
String op = node.getOperator().getOperatorText();