Lines 1380-1403
Link Here
|
1380 |
|
1380 |
|
1381 |
getMethodBodies(unit); |
1381 |
getMethodBodies(unit); |
1382 |
|
1382 |
|
1383 |
if (bindingsWereCreated && ((InternalSearchPattern)this.pattern).mustResolve && unit.types != null) { |
1383 |
boolean mustResolve = ((InternalSearchPattern)this.pattern).mustResolve; |
1384 |
if (BasicSearchEngine.VERBOSE) |
1384 |
if (bindingsWereCreated && mustResolve) { |
1385 |
System.out.println("Resolving " + this.currentPossibleMatch.openable.toStringWithAncestors()); //$NON-NLS-1$ |
1385 |
if (unit.types != null) { |
1386 |
|
1386 |
if (BasicSearchEngine.VERBOSE) |
1387 |
reduceParseTree(unit); |
1387 |
System.out.println("Resolving " + this.currentPossibleMatch.openable.toStringWithAncestors()); //$NON-NLS-1$ |
1388 |
|
1388 |
|
1389 |
if (unit.scope != null) { |
1389 |
reduceParseTree(unit); |
1390 |
// fault in fields & methods |
1390 |
|
1391 |
unit.scope.faultInTypes(); |
1391 |
if (unit.scope != null) { |
|
|
1392 |
// fault in fields & methods |
1393 |
unit.scope.faultInTypes(); |
1394 |
} |
1395 |
unit.resolve(); |
1396 |
} else if (unit.isPackageInfo()) { |
1397 |
if (BasicSearchEngine.VERBOSE) |
1398 |
System.out.println("Resolving " + this.currentPossibleMatch.openable.toStringWithAncestors()); //$NON-NLS-1$ |
1399 |
unit.resolve(); |
1392 |
} |
1400 |
} |
1393 |
unit.resolve(); |
|
|
1394 |
|
1395 |
reportMatching(unit, true); |
1396 |
} else { |
1397 |
reportMatching(unit, ((InternalSearchPattern)this.pattern).mustResolve); |
1398 |
} |
1401 |
} |
|
|
1402 |
reportMatching(unit, mustResolve); |
1399 |
} catch (AbortCompilation e) { |
1403 |
} catch (AbortCompilation e) { |
1400 |
// could not resolve: report innacurate matches |
1404 |
// could not resolve: report inaccurate matches |
1401 |
reportMatching(unit, true); // was partially resolved |
1405 |
reportMatching(unit, true); // was partially resolved |
1402 |
if (!(e instanceof AbortCompilationUnit)) { |
1406 |
if (!(e instanceof AbortCompilationUnit)) { |
1403 |
// problem with class path |
1407 |
// problem with class path |
Lines 1853-1858
Link Here
|
1853 |
if (nodeSet.matchingNodes.elementSize == 0) return; // no matching nodes were found |
1857 |
if (nodeSet.matchingNodes.elementSize == 0) return; // no matching nodes were found |
1854 |
|
1858 |
|
1855 |
boolean matchedUnitContainer = (this.matchContainer & PatternLocator.COMPILATION_UNIT_CONTAINER) != 0; |
1859 |
boolean matchedUnitContainer = (this.matchContainer & PatternLocator.COMPILATION_UNIT_CONTAINER) != 0; |
|
|
1860 |
|
1861 |
// report references in javadoc |
1862 |
if (unit.javadoc != null) { |
1863 |
ASTNode[] nodes = nodeSet.matchingNodes(unit.javadoc.sourceStart, unit.javadoc.sourceEnd); |
1864 |
if (nodes != null) { |
1865 |
if (!matchedUnitContainer) { |
1866 |
for (int i = 0, l = nodes.length; i < l; i++) |
1867 |
nodeSet.matchingNodes.removeKey(nodes[i]); |
1868 |
} else { |
1869 |
IJavaElement element = createTypeHandle(new String(unit.getMainTypeName())); |
1870 |
for (int i = 0, l = nodes.length; i < l; i++) { |
1871 |
ASTNode node = nodes[i]; |
1872 |
Integer level = (Integer) nodeSet.matchingNodes.removeKey(node); |
1873 |
if (encloses(element)) |
1874 |
this.patternLocator.matchReportReference(node, element, null/*no binding*/, level.intValue(), this); |
1875 |
} |
1876 |
} |
1877 |
} |
1878 |
} |
1879 |
|
1856 |
if (matchedUnitContainer) { |
1880 |
if (matchedUnitContainer) { |
1857 |
// Currently a no-op |
1881 |
// Currently a no-op |
1858 |
// ImportReference pkg = unit.currentPackage; |
1882 |
// ImportReference pkg = unit.currentPackage; |