/** * @return true if this ExpressionNodeBase is in a with scope. */ public boolean inWith() { ASScope scope = getASScope(); return scope != null ? scope.isInWith() : false; }
/** * @return true if this ExpressionNodeBase is in a with scope. */ public boolean inWith() { ASScope scope = getASScope(); return scope != null ? scope.isInWith() : false; }
/** * Determine if this node is a reference to a package * * @return true if this node is really a package reference. */ public boolean isPackageReference() { // Return true if we're somewhere that MXML doesn't require packages to be imported if (getTreatAsPackage()) return true; boolean isPackage = false; if (this.getBaseExpression() == null) { // Only check for packages if we don't have a base expression. // in a.b.c, 'a', 'a.b', or 'a.b.c' could be package names, but not 'c' or 'b.c' String ref = this.computeSimpleReference(); if (ref != null) { ASScope scope = getASScope(); if (scope.isPackageName(ref)) isPackage = true; } } return isPackage; }
/** * Determine if this node is a reference to a package * * @return true if this node is really a package reference. */ public boolean isPackageReference() { // Return true if we're somewhere that MXML doesn't require packages to be imported if (getTreatAsPackage()) return true; boolean isPackage = false; if (this.getBaseExpression() == null) { // Only check for packages if we don't have a base expression. // in a.b.c, 'a', 'a.b', or 'a.b.c' could be package names, but not 'c' or 'b.c' String ref = this.computeSimpleReference(); if (ref != null) { ASScope scope = getASScope(); if (scope.isPackageName(ref)) isPackage = true; } } return isPackage; }