File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/core/search Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 3232import org .eclipse .jdt .core .dom .IVariableBinding ;
3333import org .eclipse .jdt .core .dom .ImportDeclaration ;
3434import org .eclipse .jdt .core .dom .Initializer ;
35+ import org .eclipse .jdt .core .dom .LambdaExpression ;
3536import org .eclipse .jdt .core .dom .MemberValuePair ;
3637import org .eclipse .jdt .core .dom .MethodDeclaration ;
3738import org .eclipse .jdt .core .dom .MethodInvocation ;
@@ -70,6 +71,7 @@ public static IJavaElement getEnclosingJavaElement(ASTNode node) {
7071 || node instanceof ModuleDeclaration
7172 || node instanceof AnnotationTypeMemberDeclaration
7273 || node instanceof Initializer
74+ || node instanceof LambdaExpression
7375 || node .getLocationInParent () == FieldDeclaration .FRAGMENTS_PROPERTY ) {
7476 return getDeclaringJavaElement (node );
7577 }
@@ -247,6 +249,9 @@ public static IBinding getBinding(ASTNode astNode) {
247249 if (astNode instanceof ModuleDeclaration ref ) {
248250 return ref .resolveBinding ();
249251 }
252+ if (astNode instanceof LambdaExpression lambda ) {
253+ return lambda .resolveMethodBinding ();
254+ }
250255 // TODO more...
251256 return null ;
252257 }
You can’t perform that action at this time.
0 commit comments