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 96223 Details for
Bug 207631
[Content Assist] Autocompletion fails after use of binary right-shift operators
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
bug207631_002.txt (text/plain), 3.06 KB, created by
David Audel
on 2008-04-16 05:32:55 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
David Audel
Created:
2008-04-16 05:32:55 EDT
Size:
3.06 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java,v >retrieving revision 1.189 >diff -u -r1.189 CompletionParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 9 Apr 2008 13:29:04 -0000 1.189 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 16 Apr 2008 09:32:14 -0000 >@@ -3293,8 +3293,9 @@ > case TokenNameRIGHT_SHIFT: // or fred<X<X>>[(]1, 2) > case TokenNameUNSIGNED_RIGHT_SHIFT: //or Fred<X<X<X>>>[(]1, 2) > if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_SELECTOR) { >+ int info; > if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER, 1) == K_BINARY_OPERATOR && >- topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER, 1) == GREATER) { >+ ((info = topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER, 1)) == GREATER || info == RIGHT_SHIFT || info == UNSIGNED_RIGHT_SHIFT)) { > // it's not a selector invocation > popElement(K_SELECTOR); > } else { >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/parser/GenericsCompletionParserTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericsCompletionParserTest.java,v >retrieving revision 1.32 >diff -u -r1.32 GenericsCompletionParserTest.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/GenericsCompletionParserTest.java 4 Apr 2008 13:14:27 -0000 1.32 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/GenericsCompletionParserTest.java 16 Apr 2008 09:32:16 -0000 >@@ -10986,4 +10986,42 @@ > expectedReplacedSource, > "diet ast"); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=207631 >+public void test0217_Method() { >+ >+ String str = >+ "public class X {\n" + >+ " void foo() {\n" + >+ " int y = (x >> (1));\n" + >+ " foo\n" + >+ " }" + >+ "}\n"; >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.lastIndexOf("foo") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ // we are not in a constructor then the completion node isn't attached to the ast >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int y;\n" + >+ " <CompleteOnName:foo>;\n" + >+ " }\n" + >+ "}\n"; >+ >+ checkMethodParse( >+ str.toCharArray(), >+ cursorLocation, >+ expectedCompletionNodeToString, >+ expectedParentNodeToString, >+ expectedUnitDisplayString, >+ completionIdentifier, >+ expectedReplacedSource, >+ "full ast"); >+} > }
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 207631
: 96223