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 164100 Details for
Bug 308356
codeSelect(..) doesn't work for local variable with surrogate in name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Same patch with a regression test
patch_308356.txt (text/plain), 3.08 KB, created by
Olivier Thomann
on 2010-04-07 13:21:20 EDT
(
hide
)
Description:
Same patch with a regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-04-07 13:21:20 EDT
Size:
3.08 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java,v >retrieving revision 1.157 >diff -u -r1.157 SelectionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java 18 Mar 2010 16:19:33 -0000 1.157 >+++ codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java 7 Apr 2010 17:20:52 -0000 >@@ -478,11 +478,20 @@ > } > } > private boolean checkSelection( >- char[] source, >- int selectionStart, >- int selectionEnd) { >- >- Scanner scanner = new Scanner(); >+ char[] source, >+ int selectionStart, >+ int selectionEnd) { >+ >+ Scanner scanner = >+ new Scanner( >+ false /*comment*/, >+ false /*whitespace*/, >+ false /*nls*/, >+ this.compilerOptions.sourceLevel, >+ this.compilerOptions.complianceLevel, >+ null/*taskTag*/, >+ null/*taskPriorities*/, >+ true /*taskCaseSensitive*/); > scanner.setSource(source); > > int lastIdentifierStart = -1; >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java,v >retrieving revision 1.67 >diff -u -r1.67 ResolveTests_1_5.java >--- src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java 25 Jun 2009 14:48:50 -0000 1.67 >+++ src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java 7 Apr 2010 17:20:53 -0000 >@@ -27,7 +27,7 @@ > // Names of tests to run: can be "testBugXXXX" or "BugXXXX") > //TESTS_NAMES = new String[] { "test0095" }; > // Numbers of tests to run: "test<number>" will be run for each number of this array >- //TESTS_NUMBERS = new int[] { 13 }; >+ //TESTS_NUMBERS = new int[] { 124 }; > // Range numbers of tests to run: all tests between "test<first>" and "test<last>" will be run for { first, last } > //TESTS_RANGE = new int[] { 16, -1 }; > } >@@ -2936,4 +2936,30 @@ > true > ); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=308356 >+public void test0124() throws Exception { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Resolve/src/Test.java", >+ "public class Test {\n" + >+ " public static void main(String[] args) {\n" + >+ " String str\ud842\udf9f = null;\n" + >+ " }\n" + >+ "}"); >+ >+ String str = this.workingCopies[0].getSource(); >+ String CONST1 = "String "; >+ int start = str.indexOf("String "); >+ start += CONST1.length(); >+ int start2 = str.indexOf(" ="); >+ int length = start2 - start + 1; >+ IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length, this.wcOwner); >+ >+ assertElementsEqual( >+ "Unexpected elements", >+ "str\ud842\udf9f [in main(String[]) [in Test [in [Working copy] Test.java [in <default> [in src [in Resolve]]]]]]", >+ elements, >+ true >+ ); >+} > }
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 308356
:
164089
| 164100