return new Found(token, token, scope.getCurrScopeId(), scope.getCurrScopeItems());
}
protected IToken findNameTok(IToken token, String tokToCheck) {
if (token instanceof SourceToken) {
SourceToken s = (SourceToken) token;
SimpleNode ast = s.getAst();
String searchFor = FullRepIterable.getLastPart(tokToCheck);
while (ast instanceof Attribute) {
Attribute a = (Attribute) ast;
if (((NameTok) a.attr).id.equals(searchFor)) {
return new SourceToken(a.attr, searchFor, "", "", token.getParentPackage());
} else if (a.value.toString().equals(searchFor)) {
return new SourceToken(a.value, searchFor, "", "", token.getParentPackage());
}
ast = a.value;
}
}
return token;