Skip to content

Commit 4486ccf

Browse files
Rob Strykermickaelistria
authored andcommitted
Clean up / revert some unnecessary changes in jdt.core
Signed-off-by: Rob Stryker <[email protected]>
1 parent 5e703c4 commit 4486ccf

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,6 @@ protected void locateMatchesDefaultImpl(JavaProject javaProject, PossibleMatch[]
13371337
possibleMatch.cleanUp();
13381338
}
13391339
}
1340-
13411340
if (mustResolve)
13421341
this.lookupEnvironment.completeTypeBindings();
13431342

@@ -1531,7 +1530,7 @@ public int compare(Object a, Object b) {
15311530
}
15321531
previousJavaProject = javaProject;
15331532
}
1534-
PossibleMatch possibleMatch = createPossibleMatch(this, resource, openable, searchDocument,this.pattern.mustResolve);
1533+
PossibleMatch possibleMatch = new PossibleMatch(this, resource, openable, searchDocument,this.pattern.mustResolve);
15351534
matchSet.add(possibleMatch);
15361535
if (pathString.endsWith(TypeConstants.AUTOMATIC_MODULE_NAME)) {
15371536
IPath path = resource.getFullPath();
@@ -1566,12 +1565,6 @@ public int compare(Object a, Object b) {
15661565
this.bindingsByName = null;
15671566
}
15681567
}
1569-
1570-
protected PossibleMatch createPossibleMatch(MatchLocator locator, IResource resource, Openable openable, SearchDocument document, boolean mustResolve) {
1571-
return new PossibleMatch(locator, resource, openable, document, mustResolve);
1572-
}
1573-
1574-
15751568
private IJavaSearchScope getSubScope(String optionString, long value, boolean ref) {
15761569
if (this.subScope != null)
15771570
return this.subScope;
@@ -3326,8 +3319,7 @@ protected void reportMatching(TypeParameter[] typeParameters, IJavaElement enclo
33263319
if (level != null) {
33273320
if (level.intValue() > -1 && encloses(enclosingElement)) {
33283321
int offset = typeParameter.sourceStart;
3329-
int len = typeParameter.sourceEnd-offset+1;
3330-
SearchMatch match = this.patternLocator.newDeclarationMatch(typeParameter, enclosingElement, binding, level.intValue(), len, this, false);
3322+
SearchMatch match = this.patternLocator.newDeclarationMatch(typeParameter, enclosingElement, binding, level.intValue(), typeParameter.sourceEnd-offset+1, this);
33313323
report(match);
33323324
}
33333325
}

org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PatternLocator.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,7 @@ protected void matchReportReference(ASTNode reference, IJavaElement element, IJa
468468
matchReportReference(reference, element, elementBinding, accuracy, locator);
469469
}
470470
public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) {
471-
return locator.newDeclarationMatch(element, elementBinding, accuracy, reference.sourceStart, length, true);
472-
}
473-
public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator, boolean overrideFromElement) {
474-
return locator.newDeclarationMatch(element, elementBinding, accuracy, reference.sourceStart, length, overrideFromElement);
471+
return locator.newDeclarationMatch(element, elementBinding, accuracy, reference.sourceStart, length);
475472
}
476473
protected int referenceType() {
477474
return 0; // defaults to unknown (a generic JavaSearchMatch will be created)

0 commit comments

Comments
 (0)