@Override public SearchMatch newDeclarationMatch(ASTNode node, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) { return super.newDeclarationMatch(node, element, elementBinding, accuracy, length, locator); } @Override
@Override public SearchMatch newDeclarationMatch(ASTNode node, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) { return super.newDeclarationMatch(node, element, elementBinding, accuracy, length, locator); } @Override
private void reportMatchingAutoModule(ModuleDeclaration module, IJavaElement parent, int accuracy) throws CoreException { IModuleDescription autoModule = new AbstractModule.AutoModule( this.currentPossibleMatch.openable, this.currentPossibleMatch.autoModuleName, true); SearchMatch match = this.patternLocator.newDeclarationMatch(module, autoModule, module.binding, accuracy, module.moduleName.length, this); report(match); }
if (report != null) { if (report.booleanValue()) { return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator);
if (report != null) { if (report.booleanValue()) { return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator);
if (report != null) { if (report.booleanValue()) { return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator);
if (report != null) { if (report.booleanValue()) { return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator);
if (report != null) { if (report.booleanValue()) { return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator);
if (report != null) { if (report.booleanValue()) { return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); return super.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator);
public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) { PatternLocator closestPattern = null; int level = IMPOSSIBLE_MATCH; for (int i = 0, pl = this.patternLocators.length; i < pl; i++) { PatternLocator patternLocator = this.patternLocators[i]; int newLevel = patternLocator.referenceType() == 0 ? IMPOSSIBLE_MATCH : patternLocator.resolveLevel(reference); if (newLevel > level) { closestPattern = patternLocator; if (newLevel == ACCURATE_MATCH) break; level = newLevel; } } if (closestPattern != null) { return closestPattern.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); } // super implementation... return locator.newDeclarationMatch(element, elementBinding, accuracy, reference.sourceStart, length); } public int resolveLevel(ASTNode node) {
@Override public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) { PatternLocator closestPattern = null; int level = IMPOSSIBLE_MATCH; for (int i = 0, pl = this.patternLocators.length; i < pl; i++) { PatternLocator patternLocator = this.patternLocators[i]; int newLevel = patternLocator.referenceType() == 0 ? IMPOSSIBLE_MATCH : patternLocator.resolveLevel(reference); if (newLevel > level) { closestPattern = patternLocator; if (newLevel == ACCURATE_MATCH) break; level = newLevel; } } if (closestPattern != null) { return closestPattern.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); } // super implementation... return locator.newDeclarationMatch(element, elementBinding, accuracy, reference.sourceStart, length); } @Override
public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) { PatternLocator closestPattern = null; int level = IMPOSSIBLE_MATCH; for (int i = 0, pl = this.patternLocators.length; i < pl; i++) { PatternLocator patternLocator = this.patternLocators[i]; int newLevel = patternLocator.referenceType() == 0 ? IMPOSSIBLE_MATCH : patternLocator.resolveLevel(reference); if (newLevel > level) { closestPattern = patternLocator; if (newLevel == ACCURATE_MATCH) break; level = newLevel; } } if (closestPattern != null) { return closestPattern.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); } // super implementation... return locator.newDeclarationMatch(element, elementBinding, accuracy, reference.sourceStart, length); } public int resolveLevel(ASTNode node) {
public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) { PatternLocator closestPattern = null; int level = IMPOSSIBLE_MATCH; for (int i = 0, pl = this.patternLocators.length; i < pl; i++) { PatternLocator patternLocator = this.patternLocators[i]; int newLevel = patternLocator.referenceType() == 0 ? IMPOSSIBLE_MATCH : patternLocator.resolveLevel(reference); if (newLevel > level) { closestPattern = patternLocator; if (newLevel == ACCURATE_MATCH) break; level = newLevel; } } if (closestPattern != null) { return closestPattern.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); } // super implementation... return locator.newDeclarationMatch(element, elementBinding, accuracy, reference.sourceStart, length); } public int resolveLevel(ASTNode node) {
public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) { PatternLocator closestPattern = null; int level = IMPOSSIBLE_MATCH; for (int i = 0, pl = this.patternLocators.length; i < pl; i++) { PatternLocator patternLocator = this.patternLocators[i]; int newLevel = patternLocator.referenceType() == 0 ? IMPOSSIBLE_MATCH : patternLocator.resolveLevel(reference); if (newLevel > level) { closestPattern = patternLocator; if (newLevel == ACCURATE_MATCH) break; level = newLevel; } } if (closestPattern != null) { return closestPattern.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); } // super implementation... return locator.newDeclarationMatch(element, elementBinding, accuracy, reference.sourceStart, length); } public int resolveLevel(ASTNode node) {
public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) { PatternLocator closestPattern = null; int level = IMPOSSIBLE_MATCH; for (int i = 0, pl = this.patternLocators.length; i < pl; i++) { PatternLocator patternLocator = this.patternLocators[i]; int newLevel = patternLocator.referenceType() == 0 ? IMPOSSIBLE_MATCH : patternLocator.resolveLevel(reference); if (newLevel > level) { closestPattern = patternLocator; if (newLevel == ACCURATE_MATCH) break; level = newLevel; } } if (closestPattern != null) { return closestPattern.newDeclarationMatch(reference, element, elementBinding, accuracy, length, locator); } // super implementation... return locator.newDeclarationMatch(element, elementBinding, accuracy, reference.sourceStart, length); } public int resolveLevel(ASTNode node) {
/** * Visit the given module declaration and report the nodes that match exactly the * search pattern (i.e. the ones in the matching nodes set) */ protected void reportMatching(ModuleDeclaration module, IJavaElement parent, int accuracy, MatchingNodeSet nodeSet, int occurrenceCount) throws CoreException { IModuleDescription moduleDesc = null; Openable openable = this.currentPossibleMatch.openable; if (openable instanceof ITypeRoot) { ITypeRoot typeRoot = (ITypeRoot) openable; try { moduleDesc = typeRoot.getModule(); } catch (JavaModelException e) { // do nothing } } if (moduleDesc == null) // could theoretically happen if openable is ICompilationUnit, but logically having a module should prevent this from happening return; reportMatching(module.annotations, moduleDesc, null, module.binding, nodeSet, true, true); if (accuracy > -1) { // report module declaration SearchMatch match = this.patternLocator.newDeclarationMatch(module, moduleDesc, module.binding, accuracy, module.moduleName.length, this); report(match); } reportMatching(module.requires, module, nodeSet, moduleDesc); reportMatching(module.exports, nodeSet, moduleDesc); reportMatching(module.opens, nodeSet, moduleDesc); reportMatching(module.services, module, nodeSet, moduleDesc); reportMatching(module.uses, module, nodeSet, moduleDesc); }
reportMatching(module.annotations, moduleDesc, null, module.binding, nodeSet, true, true); if (accuracy > -1) { // report module declaration SearchMatch match = this.patternLocator.newDeclarationMatch(module, moduleDesc, module.binding, accuracy, module.moduleName.length, this); report(match);
SearchMatch match = null; int length = lambdaExpression.arrowPosition() + 1 - nameSourceStart; match = this.patternLocator.newDeclarationMatch(lambdaExpression, enclosingElement, null, accuracy, length, this); if (match != null) { report(match);
SearchMatch match = null; int length = lambdaExpression.arrowPosition() + 1 - nameSourceStart; match = this.patternLocator.newDeclarationMatch(lambdaExpression, enclosingElement, null, accuracy, length, this); if (match != null) { report(match);
SearchMatch match = null; int length = lambdaExpression.arrowPosition() + 1 - nameSourceStart; match = this.patternLocator.newDeclarationMatch(lambdaExpression, enclosingElement, null, accuracy, length, this); if (match != null) { report(match);