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 111667 Details for
Bug 243023
[content assist] RuntimeException thrown by JavaTypeCompletionProposalComputer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
bug243023_001.txt (text/plain), 2.55 KB, created by
David Audel
on 2008-09-04 09:06:27 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
David Audel
Created:
2008-09-04 09:06:27 EDT
Size:
2.55 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/CompletionContextTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionContextTests.java,v >retrieving revision 1.14 >diff -u -r1.14 CompletionContextTests.java >--- src/org/eclipse/jdt/core/tests/model/CompletionContextTests.java 27 Jun 2008 16:02:38 -0000 1.14 >+++ src/org/eclipse/jdt/core/tests/model/CompletionContextTests.java 4 Sep 2008 13:03:18 -0000 >@@ -4899,4 +4899,33 @@ > "visibleElements={}", > result.context); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=243023 >+public void test0166() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src3/test0001/X.java", >+ "package test0001;\n" + >+ "public class X {\n" + >+ " public void foo() {\n" + >+ " if ( null == /**/\n" + >+ " }\n" + >+ "}"); >+ >+ String str = this.workingCopies[0].getSource(); >+ int tokenStart = str.lastIndexOf("/**/"); >+ int tokenEnd = tokenStart + "".length() - 1; >+ int cursorLocation = str.lastIndexOf("/**/") + "".length(); >+ >+ CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation); >+ >+ assertResults( >+ "completion offset="+(cursorLocation)+"\n" + >+ "completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" + >+ "completion token=\"\"\n" + >+ "completion token kind=TOKEN_KIND_NAME\n" + >+ "expectedTypesSignatures=null\n" + >+ "expectedTypesKeys=null\n"+ >+ "completion token location=UNKNOWN", >+ result.context); >+} > } >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java,v >retrieving revision 1.371 >diff -u -r1.371 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 8 Jul 2008 13:29:04 -0000 1.371 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 4 Sep 2008 13:03:21 -0000 >@@ -9803,7 +9803,7 @@ > } > } > private void addExpectedType(TypeBinding type, Scope scope){ >- if (type == null || !type.isValidBinding()) return; >+ if (type == null || !type.isValidBinding() || type == TypeBinding.NULL) return; > > // do not add twice the same type > for (int i = 0; i <= this.expectedTypesPtr; i++) {
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 243023
:
109042
| 111667