Lines 994-999
Link Here
|
994 |
if (type.exists()) return type; |
994 |
if (type.exists()) return type; |
995 |
return null; |
995 |
return null; |
996 |
} |
996 |
} |
|
|
997 |
/* |
998 |
public SearchMatch newConstructorReferenceMatch( |
999 |
IJavaElement enclosingElement, |
1000 |
int accuracy, |
1001 |
int offset, |
1002 |
int length, |
1003 |
ASTNode reference, |
1004 |
boolean synthetic) { |
1005 |
SearchParticipant participant = getParticipant(); |
1006 |
IResource resource = this.currentPossibleMatch.resource; |
1007 |
boolean insideDocComment = (reference.bits & ASTNode.InsideJavadoc) != 0; |
1008 |
return new ConstructorReferenceMatch(enclosingElement, accuracy, offset, length, insideDocComment, synthetic, participant, resource); |
1009 |
} |
1010 |
*/ |
997 |
public SearchMatch newDeclarationMatch( |
1011 |
public SearchMatch newDeclarationMatch( |
998 |
IJavaElement element, |
1012 |
IJavaElement element, |
999 |
int accuracy, |
1013 |
int accuracy, |
Lines 1064-1074
Link Here
|
1064 |
int accuracy, |
1078 |
int accuracy, |
1065 |
int offset, |
1079 |
int offset, |
1066 |
int length, |
1080 |
int length, |
|
|
1081 |
boolean isConstructor, |
1082 |
boolean isSynthetic, |
1067 |
ASTNode reference) { |
1083 |
ASTNode reference) { |
1068 |
SearchParticipant participant = getParticipant(); |
1084 |
SearchParticipant participant = getParticipant(); |
1069 |
IResource resource = this.currentPossibleMatch.resource; |
1085 |
IResource resource = this.currentPossibleMatch.resource; |
1070 |
boolean insideDocComment = (reference.bits & ASTNode.InsideJavadoc) != 0; |
1086 |
boolean insideDocComment = (reference.bits & ASTNode.InsideJavadoc) != 0; |
1071 |
return new MethodReferenceMatch(enclosingElement, accuracy, offset, length, insideDocComment, participant, resource); |
1087 |
return new MethodReferenceMatch(enclosingElement, accuracy, offset, length, isConstructor, isSynthetic, insideDocComment, participant, resource); |
1072 |
} |
1088 |
} |
1073 |
|
1089 |
|
1074 |
public SearchMatch newPackageReferenceMatch( |
1090 |
public SearchMatch newPackageReferenceMatch( |
Lines 1342-1348
Link Here
|
1342 |
} |
1358 |
} |
1343 |
if (encloses(enclosingElement)) { |
1359 |
if (encloses(enclosingElement)) { |
1344 |
int length = scanner.currentPosition - nameSourceStart; |
1360 |
int length = scanner.currentPosition - nameSourceStart; |
1345 |
SearchMatch match = newDeclarationMatch(enclosingElement, accuracy, nameSourceStart, length); |
1361 |
// SearchMatch match = newDeclarationMatch(enclosingElement, accuracy, nameSourceStart, length); |
|
|
1362 |
SearchMatch match = this.patternLocator.newDeclarationMatch(method, enclosingElement, accuracy, length, this); |
1346 |
report(match); |
1363 |
report(match); |
1347 |
} |
1364 |
} |
1348 |
} |
1365 |
} |
Lines 1534-1540
Link Here
|
1534 |
// report the type declaration |
1551 |
// report the type declaration |
1535 |
if (accuracy > -1 && encloses(enclosingElement)) { |
1552 |
if (accuracy > -1 && encloses(enclosingElement)) { |
1536 |
int offset = type.sourceStart; |
1553 |
int offset = type.sourceStart; |
1537 |
SearchMatch match = newDeclarationMatch(enclosingElement, accuracy, offset, type.sourceEnd-offset+1); |
1554 |
// SearchMatch match = newDeclarationMatch(enclosingElement, accuracy, offset, type.sourceEnd-offset+1); |
|
|
1555 |
SearchMatch match = this.patternLocator.newDeclarationMatch(type, enclosingElement, accuracy, type.sourceEnd-offset+1, this); |
1538 |
report(match); |
1556 |
report(match); |
1539 |
} |
1557 |
} |
1540 |
|
1558 |
|