if (methodReferenceMatch.isSuperInvocation()) { System.out.print("+SUPER INVOCATION"); //$NON-NLS-1$ if (methodReferenceMatch.isImplicit()) { System.out.print("+IMPLICIT"); //$NON-NLS-1$ if (methodReferenceMatch.isSynthetic()) { System.out.print("+SYNTHETIC"); //$NON-NLS-1$
public MethodReferenceMatch newMethodReferenceMatch( IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, int offset, int length, boolean isConstructor, boolean isSynthetic, ASTNode reference) { SearchParticipant participant = getParticipant(); IResource resource = this.currentPossibleMatch.resource; boolean insideDocComment = (reference.bits & ASTNode.InsideJavadoc) != 0; if (enclosingBinding != null) enclosingElement = ((JavaElement) enclosingElement).resolved(enclosingBinding); boolean isOverridden = (accuracy & PatternLocator.SUPER_INVOCATION_FLAVOR) != 0; return new MethodReferenceMatch(enclosingElement, accuracy, offset, length, isConstructor, isSynthetic, isOverridden, insideDocComment, participant, resource); }
public void acceptSearchMatch(ICompilationUnit unit, SearchMatch match) throws CoreException { if (match instanceof MethodReferenceMatch && ((MethodReferenceMatch) match).isSuperInvocation() && match.getAccuracy() == SearchMatch.A_INACCURATE) { return; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=156491
methodReferenceMatch.setLocalElement(localElement); this.match = methodReferenceMatch; if (this.pattern.findReferences && reference instanceof MessageSend) {
@Override protected void acceptSearchMatch(ICompilationUnit unit, SearchMatch match) throws CoreException { // workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=27236 : if (isConstructor && match instanceof MethodReferenceMatch) { MethodReferenceMatch mrm= (MethodReferenceMatch) match; if (mrm.isSynthetic()) { return; } } collectMatch(match); } };
public void acceptSearchMatch(SearchMatch match) throws CoreException { IJavaElement enclosingElement= (IJavaElement) match.getElement(); if (enclosingElement != null) { if (fIgnorePotentials && (match.getAccuracy() == SearchMatch.A_INACCURATE)) return; boolean isWriteAccess= false; boolean isReadAccess= false; if (match instanceof FieldReferenceMatch) { FieldReferenceMatch fieldRef= ((FieldReferenceMatch) match); isWriteAccess= fieldRef.isWriteAccess(); isReadAccess= fieldRef.isReadAccess(); } else if (match instanceof LocalVariableReferenceMatch) { LocalVariableReferenceMatch localVarRef= ((LocalVariableReferenceMatch) match); isWriteAccess= localVarRef.isWriteAccess(); isReadAccess= localVarRef.isReadAccess(); } boolean isSuperInvocation= false; if (match instanceof MethodReferenceMatch) { MethodReferenceMatch methodRef= (MethodReferenceMatch) match; isSuperInvocation= methodRef.isSuperInvocation(); } fSearch.addMatch(new JavaElementMatch(enclosingElement, match.getRule(), match.getOffset(), match.getLength(), match.getAccuracy(), isReadAccess, isWriteAccess, match.isInsideDocComment(), isSuperInvocation)); } }
methodReferenceMatch.setLocalElement(localElement); this.match = methodReferenceMatch; if (this.pattern.findReferences && reference instanceof MessageSend) {
@Override protected void acceptSearchMatch(ICompilationUnit unit, SearchMatch match) throws CoreException { // workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=27236 : if (isConstructor && match instanceof MethodReferenceMatch) { MethodReferenceMatch mrm= (MethodReferenceMatch) match; if (mrm.isSynthetic()) { return; } } collectMatch(match); } };
if (methodReferenceMatch.isSuperInvocation()) { System.out.print("+SUPER INVOCATION"); //$NON-NLS-1$ if (methodReferenceMatch.isImplicit()) { System.out.print("+IMPLICIT"); //$NON-NLS-1$ if (methodReferenceMatch.isSynthetic()) { System.out.print("+SYNTHETIC"); //$NON-NLS-1$
@Override public void acceptSearchMatch(ICompilationUnit unit, SearchMatch match) throws CoreException { if (match instanceof MethodReferenceMatch && ((MethodReferenceMatch) match).isSuperInvocation() && match.getAccuracy() == SearchMatch.A_INACCURATE) { return; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=156491
public MethodReferenceMatch newMethodReferenceMatch( IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, int offset, int length, boolean isConstructor, boolean isSynthetic, ASTNode reference) { SearchParticipant participant = getParticipant(); IResource resource = this.currentPossibleMatch.resource; boolean insideDocComment = (reference.bits & ASTNode.InsideJavadoc) != 0; if (enclosingBinding != null) enclosingElement = ((JavaElement) enclosingElement).resolved(enclosingBinding); boolean isOverridden = (accuracy & PatternLocator.SUPER_INVOCATION_FLAVOR) != 0; return new MethodReferenceMatch(enclosingElement, accuracy, offset, length, isConstructor, isSynthetic, isOverridden, insideDocComment, participant, resource); }
methodReferenceMatch.setLocalElement(localElement); this.match = methodReferenceMatch; if (this.pattern.findReferences && reference instanceof MessageSend) {
if (methodReferenceMatch.isSuperInvocation()) { System.out.print("+SUPER INVOCATION"); //$NON-NLS-1$ if (methodReferenceMatch.isImplicit()) { System.out.print("+IMPLICIT"); //$NON-NLS-1$ if (methodReferenceMatch.isSynthetic()) { System.out.print("+SYNTHETIC"); //$NON-NLS-1$
@Override public void acceptSearchMatch(ICompilationUnit unit, SearchMatch match) throws CoreException { if (match instanceof MethodReferenceMatch && ((MethodReferenceMatch) match).isSuperInvocation() && match.getAccuracy() == SearchMatch.A_INACCURATE) { return; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=156491
public MethodReferenceMatch newMethodReferenceMatch( IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, int offset, int length, boolean isConstructor, boolean isSynthetic, ASTNode reference) { SearchParticipant participant = getParticipant(); IResource resource = this.currentPossibleMatch.resource; boolean insideDocComment = (reference.bits & ASTNode.InsideJavadoc) != 0; if (enclosingBinding != null) enclosingElement = ((JavaElement) enclosingElement).resolved(enclosingBinding); boolean isOverridden = (accuracy & PatternLocator.SUPER_INVOCATION_FLAVOR) != 0; return new MethodReferenceMatch(enclosingElement, accuracy, offset, length, isConstructor, isSynthetic, isOverridden, insideDocComment, participant, resource); }
methodReferenceMatch.setLocalElement(localElement); this.match = methodReferenceMatch; if (this.pattern.findReferences && reference instanceof MessageSend) {
if (methodReferenceMatch.isSuperInvocation()) { System.out.print("+SUPER INVOCATION"); //$NON-NLS-1$ if (methodReferenceMatch.isImplicit()) { System.out.print("+IMPLICIT"); //$NON-NLS-1$ if (methodReferenceMatch.isSynthetic()) { System.out.print("+SYNTHETIC"); //$NON-NLS-1$
@Override public void acceptSearchMatch(ICompilationUnit unit, SearchMatch match) throws CoreException { if (match instanceof MethodReferenceMatch && ((MethodReferenceMatch) match).isSuperInvocation() && match.getAccuracy() == SearchMatch.A_INACCURATE) { return; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=156491
public MethodReferenceMatch newMethodReferenceMatch( IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, int offset, int length, boolean isConstructor, boolean isSynthetic, ASTNode reference) { SearchParticipant participant = getParticipant(); IResource resource = this.currentPossibleMatch.resource; boolean insideDocComment = (reference.bits & ASTNode.InsideJavadoc) != 0; if (enclosingBinding != null) enclosingElement = ((JavaElement) enclosingElement).resolved(enclosingBinding); boolean isOverridden = (accuracy & PatternLocator.SUPER_INVOCATION_FLAVOR) != 0; return new MethodReferenceMatch(enclosingElement, accuracy, offset, length, isConstructor, isSynthetic, isOverridden, insideDocComment, participant, resource); }
methodReferenceMatch.setLocalElement(localElement); this.match = methodReferenceMatch; if (this.pattern.findReferences && reference instanceof MessageSend) {