ICompilerProject project)
{
// added super.foo(), wanted to 'this' behind foo
if (node.getParent() instanceof IMemberAccessExpressionNode)
{
IMemberAccessExpressionNode mnode = (IMemberAccessExpressionNode) node
.getParent();
if (mnode.getLeftOperandNode().getNodeID() == ASTNodeID.SuperID)
return false;
IExpressionNode indentFromThis = getIndentFromThis(node);
if (node == indentFromThis)
return true;
// test that this is the base expression
ExpressionNodeBase enode = (ExpressionNodeBase) node;
ExpressionNodeBase baseExpression = enode.getBaseExpression();
if (indentFromThis == null && baseExpression != null
&& baseExpression != node)
return false;
// check to see if the left is a type
ITypeDefinition type = mnode.getLeftOperandNode().resolveType(
project);
// A.{foo} : Left is a Type
// XXX going to have to test packgeName to com.acme.A
if (type instanceof ClassTraitsDefinition
&& mnode.getLeftOperandNode() == node)
{
return false;
}
// this.{foo} : explicit 'this', in js we are ignoring explicit this identifiers
// because we are inserting all of them with the emitter