use of com.python.pydev.analysis.visitors.Found in project Pydev by fabioz.
the class ScopeAnalyzerVisitorWithoutImports method onAfterEndScope.
@Override
protected void onAfterEndScope(SimpleNode node, ScopeItems m) {
ASTEntry parent = popParent(node);
if (hitAsUndefined == null) {
for (String rep : new FullRepIterable(this.completeNameToFind, true)) {
List<Found> foundItems = m.getAll(rep);
for (Found found : foundItems) {
if (checkFound(found, parent) != null) {
return;
}
}
}
} else {
// (hitAsUndefined != null)
String foundRep = hitAsUndefined.getSingle().generator.getRepresentation();
if (foundRep.indexOf('.') == -1 || FullRepIterable.containsPart(foundRep, nameToFind)) {
// we cannot get the locals
for (Found f : this.undefinedFound) {
if (f.getSingle().generator.getRepresentation().startsWith(foundRep)) {
if (foundOccurrences.size() == 1) {
Tuple3<Found, Integer, ASTEntry> hit = foundOccurrences.get(0);
Tuple3<Found, Integer, ASTEntry> foundOccurrence = new Tuple3<Found, Integer, ASTEntry>(f, hit.o2, hit.o3);
addFoundOccurrence(foundOccurrence);
}
}
}
}
}
}
Aggregations