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 81181 Details for
Bug 207257
[search] SearchEngine returns incorrectly typed SearchMatch when searching for local variable declarations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
v01.txt (text/plain), 2.37 KB, created by
Frederic Fusier
on 2007-10-25 13:23:32 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2007-10-25 13:23:32 EDT
Size:
2.37 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java,v >retrieving revision 1.167 >diff -u -r1.167 JavaSearchTests.java >--- src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java 2 Oct 2007 17:12:11 -0000 1.167 >+++ src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java 25 Oct 2007 17:14:50 -0000 >@@ -1025,6 +1025,20 @@ > "src/f1/X.java void f1.X.foo2().var2 [var2]", > this.resultCollector); > } >+/** >+ * @bug 207257: [search] SearchEngine returns incorrectly typed SearchMatch when searching for local variable declarations >+ * @test The accepted match should be a {@link LocalVariableDeclarationMatch} >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=207257" >+ */ >+public void testONLY_LocalVariableDeclaration_Bug207257() throws CoreException { >+ ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.java", "var1 = 1;", "var1"); >+ search( >+ localVar, >+ DECLARATIONS, >+ getJavaSearchScope(), >+ this.resultCollector); >+ assertEquals("Invalid Search Match class", LocalVariableDeclarationMatch.class, this.resultCollector.match.getClass()); >+} > /* > * Local variable occurrences test. > * (SingleNameReference) >#P org.eclipse.jdt.core >Index: search/org/eclipse/jdt/internal/core/search/matching/LocalVariableLocator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/LocalVariableLocator.java,v >retrieving revision 1.18 >diff -u -r1.18 LocalVariableLocator.java >--- search/org/eclipse/jdt/internal/core/search/matching/LocalVariableLocator.java 10 May 2006 18:03:43 -0000 1.18 >+++ search/org/eclipse/jdt/internal/core/search/matching/LocalVariableLocator.java 25 Oct 2007 17:14:51 -0000 >@@ -57,6 +57,9 @@ > offset = localVariable.nameStart; > length = localVariable.nameEnd-offset+1; > element = localVariable; >+ this.match = locator.newDeclarationMatch(element, null, accuracy, offset, length); >+ locator.report(match); >+ return; > } > if (offset >= 0) { > match = locator.newLocalVariableReferenceMatch(element, accuracy, offset, length, reference);
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 207257
: 81181