public boolean isExpressionQualifier() { IASNode p = getParent(); if( p instanceof NamespaceAccessExpressionNode ) { return ((NamespaceAccessExpressionNode) p).getLeftOperandNode() == this; } return false; } }
@Override protected NamespaceAccessExpressionNode copy() { return new NamespaceAccessExpressionNode(this); }
@Override // TODO Remove unnecessary override. public void normalize(boolean fillInOffsets) { super.normalize(fillInOffsets); }
IDefinition d = naen.getLeftOperandNode().resolve(getProject()); IdentifierNode r = (IdentifierNode)(naen.getRightOperandNode()); IDefinition d = naen.getLeftOperandNode().resolve(getProject()); IdentifierNode r = (IdentifierNode)(naen.getRightOperandNode());
@Override boolean isAttributeExpr(ExpressionNodeBase e) { // Determine if e is part of an attribute expression; it is if e is the rhs // of the NamespaceAccessExpression, and the NamespaceAccessExpression is // part of an attribute expression if (e == this.rightOperandNode) { ExpressionNodeBase p = getParentExpression(); if (p != null) return p.isAttributeExpr(this); } return false; }
@Override boolean isAttributeExpr(ExpressionNodeBase e) { // Determine if e is part of an attribute expression; it is if e is the rhs // of the NamespaceAccessExpression, and the NamespaceAccessExpression is // part of an attribute expression if (e == this.rightOperandNode) { ExpressionNodeBase p = getParentExpression(); if (p != null) return p.isAttributeExpr(this); } return false; }
public boolean isExpressionQualifier() { IASNode p = getParent(); if( p instanceof NamespaceAccessExpressionNode ) { return ((NamespaceAccessExpressionNode) p).getLeftOperandNode() == this; } return false; } }
@Override protected NamespaceAccessExpressionNode copy() { return new NamespaceAccessExpressionNode(this); }
@Override ExpressionNodeBase getBaseForMemberRef(ExpressionNodeBase e) { // Get the ExpressionNodeBase representing the Base of a Member access // expression. This would be the Node for 'a' in the expression 'a.c::b', // assuming you asked for the base of 'b'. if (e == this.rightOperandNode) { ExpressionNodeBase p = getParentExpression(); if (p != null) return p.getBaseForMemberRef(this); } return null; }
@Override // TODO Remove unnecessary override. public void normalize(boolean fillInOffsets) { super.normalize(fillInOffsets); }
public boolean isExpressionQualifier() { IASNode p = getParent(); if( p instanceof NamespaceAccessExpressionNode ) { return ((NamespaceAccessExpressionNode) p).getLeftOperandNode() == this; } return false; } }
result = new NamespaceAccessExpressionNode(qualifier, op, right); if (maRight instanceof NamespaceIdentifierNode) ((MemberAccessExpressionNode)left).setRightOperandNode(new NamespaceAccessExpressionNode((NamespaceIdentifierNode)maRight, op, right)); ((MemberAccessExpressionNode)left).setRightOperandNode(new NamespaceAccessExpressionNode(new NamespaceIdentifierNode((IdentifierNode)maRight), op, right)); ((UnaryOperatorNodeBase)maRight).setExpression(new NamespaceAccessExpressionNode((IdentifierNode)((UnaryOperatorNodeBase)maRight).getOperandNode(), op, right)); ((MemberAccessExpressionNode)left).setRightOperandNode(new NamespaceAccessExpressionNode(new QualifiedNamespaceExpressionNode((MemberAccessExpressionNode)maRight), op, right)); result = new NamespaceAccessExpressionNode(left, op, right);
@Override ExpressionNodeBase getBaseForMemberRef(ExpressionNodeBase e) { // Get the ExpressionNodeBase representing the Base of a Member access // expression. This would be the Node for 'a' in the expression 'a.c::b', // assuming you asked for the base of 'b'. if (e == this.rightOperandNode) { ExpressionNodeBase p = getParentExpression(); if (p != null) return p.getBaseForMemberRef(this); } return null; }
public boolean isExpressionQualifier() { IASNode p = getParent(); if( p instanceof NamespaceAccessExpressionNode ) { return ((NamespaceAccessExpressionNode) p).getLeftOperandNode() == this; } return false; } }
result = new NamespaceAccessExpressionNode(qualifier, op, right); if (maRight instanceof NamespaceIdentifierNode) ((MemberAccessExpressionNode)left).setRightOperandNode(new NamespaceAccessExpressionNode((NamespaceIdentifierNode)maRight, op, right)); ((MemberAccessExpressionNode)left).setRightOperandNode(new NamespaceAccessExpressionNode(new NamespaceIdentifierNode((IdentifierNode)maRight), op, right)); ((UnaryOperatorNodeBase)maRight).setExpression(new NamespaceAccessExpressionNode((IdentifierNode)((UnaryOperatorNodeBase)maRight).getOperandNode(), op, right)); ((MemberAccessExpressionNode)left).setRightOperandNode(new NamespaceAccessExpressionNode(new QualifiedNamespaceExpressionNode((MemberAccessExpressionNode)maRight), op, right)); result = new NamespaceAccessExpressionNode(left, op, right);
@Override boolean isPartOfMemberRef(ExpressionNodeBase e) { // Determine if the expression passed in is part of a Member Reference. In // this case, we return true if the expression is the rhs of the // NamesapceAccessExpression and the NamespaceAccessExpression is part of a // member reference. The node for b in a.c::b would return true if // passed to this method. if (e == this.rightOperandNode) { ExpressionNodeBase p = getParentExpression(); if (p != null) return p.isPartOfMemberRef(this); } return false; }
nameExpression = new NamespaceAccessExpressionNode(nameLeft, opToken, placeHolderRightNode); break;
@Override boolean isPartOfMemberRef(ExpressionNodeBase e) { // Determine if the expression passed in is part of a Member Reference. In // this case, we return true if the expression is the rhs of the // NamesapceAccessExpression and the NamespaceAccessExpression is part of a // member reference. The node for b in a.c::b would return true if // passed to this method. if (e == this.rightOperandNode) { ExpressionNodeBase p = getParentExpression(); if (p != null) return p.isPartOfMemberRef(this); } return false; }
nameExpression = new NamespaceAccessExpressionNode(nameLeft, opToken, placeHolderRightNode); break;