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 39149 Details for
Bug 137623
Exception calculating java content assist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch002.txt (text/plain), 3.55 KB, created by
David Audel
on 2006-04-21 04:42:04 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
David Audel
Created:
2006-04-21 04:42:04 EDT
Size:
3.55 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/parser/CompletionParserTest2.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/CompletionParserTest2.java,v >retrieving revision 1.39 >diff -u -r1.39 CompletionParserTest2.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/CompletionParserTest2.java 29 Mar 2006 03:50:24 -0000 1.39 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/CompletionParserTest2.java 21 Apr 2006 08:26:34 -0000 >@@ -9272,4 +9272,64 @@ > expectedReplacedSource, > "full ast"); > } >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=137623 >+public void test0166() { >+ >+ String str = >+ "public class X {\n" + >+ " public boolean foo() {\n" + >+ " if(this.equals(null))\n" + >+ " {\n" + >+ " (zzz==int.\n" + >+ " }\n" + >+ " }" + >+ "}\n"; >+ >+ String completeBehind = "int."; >+ int cursorLocation = str.lastIndexOf("int.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<NONE>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "<NONE>"; >+ String expectedReplacedSource = "<NONE>"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public boolean foo() {\n" + >+ " }\n" + >+ "}\n"; >+ >+ checkDietParse( >+ str.toCharArray(), >+ cursorLocation, >+ expectedCompletionNodeToString, >+ expectedParentNodeToString, >+ expectedUnitDisplayString, >+ completionIdentifier, >+ expectedReplacedSource, >+ "diet ast"); >+ >+ expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:int.>"; >+ expectedParentNodeToString = "<NONE>"; >+ completionIdentifier = ""; >+ expectedReplacedSource = "int."; >+ expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public boolean foo() {\n" + >+ " <CompleteOnClassLiteralAccess:int.>;\n" + >+ " }\n" + >+ "}\n"; >+ >+ checkMethodParse( >+ str.toCharArray(), >+ cursorLocation, >+ expectedCompletionNodeToString, >+ expectedParentNodeToString, >+ expectedUnitDisplayString, >+ completionIdentifier, >+ expectedReplacedSource, >+ "full ast"); >+} > } >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java,v >retrieving revision 1.156 >diff -u -r1.156 CompletionParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 20 Apr 2006 11:53:25 -0000 1.156 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 21 Apr 2006 08:26:42 -0000 >@@ -1299,6 +1299,11 @@ > */ > private boolean checkMemberAccess() { > if (this.previousToken == TokenNameDOT && this.qualifier > -1 && this.expressionPtr == this.qualifier) { >+ if (this.identifierLengthPtr > 1 && this.identifierLengthStack[this.identifierLengthPtr - 1] < 0) { >+ // its not a member access because the receiver is a base type >+ // fix for bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=137623 >+ return false; >+ } > // the receiver is an expression > pushCompletionOnMemberAccessOnExpressionStack(false); > return true; >@@ -3808,4 +3813,4 @@ > return field; > } > } >-} >+} >\ No newline at end of file
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 137623
: 39149