/**
* used so that the token is added to the names to ignore...
*/
protected void addToNamesToIgnore(SimpleNode node, boolean finishClassScope, boolean checkBuiltins) {
SourceToken token = AbstractVisitor.makeToken(node, "");
if (checkBuiltins) {
if (checkCurrentScopeForAssignmentsToBuiltins()) {
String rep = token.getRepresentation();
if (builtinTokens.contains(rep)) {
// Overriding builtin...
onAddAssignmentToBuiltinMessage(token, rep);
}
}
}
ScopeItems currScopeItems = scope.getCurrScopeItems();
Found found = new Found(token, token, scope.getCurrScopeId(), scope.getCurrScopeItems());
com.aptana.shared_core.structure.Tuple<IToken, Found> tup = new com.aptana.shared_core.structure.Tuple<IToken, Found>(token, found);
addToNamesToIgnore(token, currScopeItems, tup);
//after adding it to the names to ignore, let's see if there is someone waiting for this declaration
//in the 'probably not defined' stack.
for (Iterator<Found> it = probablyNotDefined.iterator(); it.hasNext();) {
Found n = it.next();
GenAndTok single = n.getSingle();
int foundScopeType = single.scopeFound.getScopeType();
//ok, if we are in a scope method, we may not get things that were defined in a class scope.
if (((foundScopeType & Scope.ACCEPTED_METHOD_AND_LAMBDA) != 0)
&& scope.getCurrScopeItems().getScopeType() == Scope.SCOPE_TYPE_CLASS) {
continue;
}
IToken tok = single.tok;
String rep = tok.getRepresentation();
if (rep.equals(token.getRepresentation())) {
//found match in names to ignore...
if (finishClassScope && foundScopeType == Scope.SCOPE_TYPE_CLASS
&& scope.getCurrScopeId() < single.scopeFound.getScopeId()) {
it.remove();