Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 281178 Details for
Bug 468561
[search] Call Hierarchy stops searching in doubly-nested lambda chain
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
workaround
workaround-MATCH_LOCATER.patch (text/plain), 1.83 KB, created by
Vikas Chandra
on 2019-12-10 00:41:14 EST
(
hide
)
Description:
workaround
Filename:
MIME Type:
Creator:
Vikas Chandra
Created:
2019-12-10 00:41:14 EST
Size:
1.83 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java >index 1c87189..c095cff 100644 >--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java >+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java >@@ -80,6 +80,7 @@ > import org.eclipse.jdt.internal.core.JavaModelManager; > import org.eclipse.jdt.internal.core.JavaProject; > import org.eclipse.jdt.internal.core.LambdaFactory; >+import org.eclipse.jdt.internal.core.LambdaMethod; > import org.eclipse.jdt.internal.core.LocalVariable; > import org.eclipse.jdt.internal.core.ModularClassFile; > import org.eclipse.jdt.internal.core.NameLookup; >@@ -2508,11 +2509,27 @@ > for (int i = 0; i < length; i++) { > Integer level = (Integer) nodeSet.matchingNodes.removeKey(nodes[i]); > if (report && level != null) { >+ if(enclosingElement instanceof LambdaMethod) { >+ IJavaElement parentLambda = getParentMethodOfLambda(enclosingElement); >+ if(parentLambda !=null) { >+ enclosingElement = parentLambda; >+ } >+ } >+ > this.patternLocator.matchReportReference(nodes[i], enclosingElement, declarationVisitor.getLocalElement(i), declarationVisitor.getOtherElements(i), lambdaExpression.binding, level.intValue(), this); > } > } > } > } >+private static IJavaElement getParentMethodOfLambda(IJavaElement element) { >+ IJavaElement parent = element.getParent(); >+ if(parent == null) >+ return null; >+ if(parent instanceof IMethod && !(parent instanceof LambdaMethod)) >+ return parent; >+ return getParentMethodOfLambda(parent); >+ >+} > /** > * Visit the given method declaration and report the nodes that match exactly the > * search pattern (i.e. the ones in the matching nodes set)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 468561
:
253874
| 281178 |
281206