@@ -303,33 +303,40 @@ private SearchMatch toCoreMatch(MatchLocator locator, org.eclipse.jdt.core.dom.A
303303 var res = new MethodReferenceMatch (enclosing , accuracy , method .getName ().getStartPosition (),
304304 method .getStartPosition () + method .getLength () - method .getName ().getStartPosition (), false ,
305305 isSynthetic , (accuracy & PatternLocator .SUPER_INVOCATION_FLAVOR ) != 0 , insideDocComment (node ), getParticipant (locator ), resource );
306+ res .setRaw (mb != null && mb .isRawMethod ());
306307 res .setLocalElement (DOMASTNodeUtils .getLocalJavaElement (node ));
307308 return res ;
308309 }
309310 if (node instanceof SuperMethodInvocation method ) {
311+ IMethodBinding mb = method .resolveMethodBinding ();
310312 var res = new MethodReferenceMatch (DOMASTNodeUtils .getEnclosingJavaElement (node .getParent ()), accuracy ,
311313 method .getName ().getStartPosition (),
312314 method .getStartPosition () + method .getLength () - method .getName ().getStartPosition (), false ,
313- method . resolveMethodBinding () .isSynthetic (), (accuracy & PatternLocator .SUPER_INVOCATION_FLAVOR ) != 0 , insideDocComment (node ), getParticipant (locator ),
315+ mb .isSynthetic (), (accuracy & PatternLocator .SUPER_INVOCATION_FLAVOR ) != 0 , insideDocComment (node ), getParticipant (locator ),
314316 resource );
317+ res .setRaw (mb != null && mb .isRawMethod ());
315318 res .setLocalElement (DOMASTNodeUtils .getLocalJavaElement (node ));
316319 return res ;
317320 }
318321 if (node instanceof ClassInstanceCreation newInstance ) {
322+ IMethodBinding mb = newInstance .resolveConstructorBinding ();
319323 var res = new MethodReferenceMatch (
320324 DOMASTNodeUtils .getEnclosingJavaElement (
321325 node .getParent ().getParent ()) /* we don't want the variable decl */ ,
322326 accuracy , newInstance .getStartPosition (), newInstance .getLength (), true ,
323- newInstance . resolveConstructorBinding () .isSynthetic (), (accuracy & PatternLocator .SUPER_INVOCATION_FLAVOR ) != 0 , insideDocComment (node ),
327+ mb .isSynthetic (), (accuracy & PatternLocator .SUPER_INVOCATION_FLAVOR ) != 0 , insideDocComment (node ),
324328 getParticipant (locator ), resource );
329+ res .setRaw (mb != null && mb .isRawMethod ());
325330 res .setLocalElement (DOMASTNodeUtils .getLocalJavaElement (node ));
326331 return res ;
327332 }
328333 if (node instanceof ConstructorInvocation newInstance ) {
334+ IMethodBinding mb = newInstance .resolveConstructorBinding ();
329335 var res = new MethodReferenceMatch (DOMASTNodeUtils .getEnclosingJavaElement (node ), accuracy ,
330336 newInstance .getStartPosition (), newInstance .getLength (), true ,
331- newInstance . resolveConstructorBinding () .isSynthetic (), (accuracy & PatternLocator .SUPER_INVOCATION_FLAVOR ) != 0 , insideDocComment (node ),
337+ mb .isSynthetic (), (accuracy & PatternLocator .SUPER_INVOCATION_FLAVOR ) != 0 , insideDocComment (node ),
332338 getParticipant (locator ), resource );
339+ res .setRaw (mb != null && mb .isRawMethod ());
333340 res .setLocalElement (DOMASTNodeUtils .getLocalJavaElement (node ));
334341 return res ;
335342 }
@@ -339,22 +346,27 @@ private SearchMatch toCoreMatch(MatchLocator locator, org.eclipse.jdt.core.dom.A
339346 var res = new MethodReferenceMatch (enclosing , accuracy , method .getName ().getStartPosition (),
340347 method .getStartPosition () + method .getLength () - method .getName ().getStartPosition (), false ,
341348 isSynthetic , (accuracy & PatternLocator .SUPER_INVOCATION_FLAVOR ) != 0 , insideDocComment (node ), getParticipant (locator ), resource );
349+ res .setRaw (mb != null && mb .isRawMethod ());
342350 res .setLocalElement (DOMASTNodeUtils .getLocalJavaElement (node ));
343351 return res ;
344352 }
345353 if (node instanceof SuperConstructorInvocation newInstance ) {
354+ IMethodBinding mb = newInstance .resolveConstructorBinding ();
346355 var res = new MethodReferenceMatch (DOMASTNodeUtils .getEnclosingJavaElement (node ), accuracy ,
347356 newInstance .getStartPosition (), newInstance .getLength (), true ,
348- newInstance . resolveConstructorBinding () .isSynthetic (), (accuracy & PatternLocator .SUPER_INVOCATION_FLAVOR ) != 0 , insideDocComment (node ),
357+ mb .isSynthetic (), (accuracy & PatternLocator .SUPER_INVOCATION_FLAVOR ) != 0 , insideDocComment (node ),
349358 getParticipant (locator ), resource );
359+ res .setRaw (mb != null && mb .isRawMethod ());
350360 res .setLocalElement (DOMASTNodeUtils .getLocalJavaElement (node ));
351361 return res ;
352362 }
353363 if (node instanceof CreationReference constructorRef ) {
364+ IMethodBinding mb = constructorRef .resolveMethodBinding ();
354365 var res = new MethodReferenceMatch (DOMASTNodeUtils .getEnclosingJavaElement (node ), accuracy ,
355366 constructorRef .getStartPosition (), constructorRef .getLength (), true ,
356- constructorRef . resolveMethodBinding () .isSynthetic (), (accuracy & PatternLocator .SUPER_INVOCATION_FLAVOR ) != 0 , insideDocComment (node ), getParticipant (locator ),
367+ mb .isSynthetic (), (accuracy & PatternLocator .SUPER_INVOCATION_FLAVOR ) != 0 , insideDocComment (node ), getParticipant (locator ),
357368 resource );
369+ res .setRaw (mb != null && mb .isRawMethod ());
358370 res .setLocalElement (DOMASTNodeUtils .getLocalJavaElement (node ));
359371 return res ;
360372 }
0 commit comments