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 73303 Details for
Bug 191125
[1.5] [assist] NPE in CompletionEngine.proposeType()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch for 3.3.1
bug191125_331_001.txt (text/plain), 2.57 KB, created by
David Audel
on 2007-07-09 07:09:24 EDT
(
hide
)
Description:
Proposed patch for 3.3.1
Filename:
MIME Type:
Creator:
David Audel
Created:
2007-07-09 07:09:24 EDT
Size:
2.57 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#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.329 >diff -u -r1.329 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 24 May 2007 13:54:05 -0000 1.329 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 9 Jul 2007 11:08:22 -0000 >@@ -730,7 +730,7 @@ > break; > } > >- if (!guessedType.isValidBinding()) return; >+ if (guessedType == null || !guessedType.isValidBinding()) return; > > if (!hasPossibleAnnotationTarget(guessedType, scope)) return; > } >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/CompletionContextTests_1_5.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionContextTests_1_5.java,v >retrieving revision 1.4 >diff -u -r1.4 CompletionContextTests_1_5.java >--- src/org/eclipse/jdt/core/tests/model/CompletionContextTests_1_5.java 29 Mar 2006 04:03:08 -0000 1.4 >+++ src/org/eclipse/jdt/core/tests/model/CompletionContextTests_1_5.java 9 Jul 2007 11:08:25 -0000 >@@ -664,4 +664,36 @@ > "expectedTypesKeys=null", > result.context); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=191125 >+public void test0025() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[2]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src3/test0006/X.java", >+ "package test0006;\n" + >+ "@ZZZZ\n" + >+ "public class X {\n" + >+ "}"); >+ >+ this.workingCopies[1] = getWorkingCopy( >+ "/Completion/src3/pkgannotation/QQAnnotation.java", >+ "package pkgannotations;\n" + >+ "public @interface QQAnnotation {\n" + >+ "}"); >+ >+ String str = this.workingCopies[0].getSource(); >+ int tokenStart = str.lastIndexOf("ZZZZ"); >+ int tokenEnd = tokenStart + "ZZZZ".length() - 1; >+ int cursorLocation = str.lastIndexOf("ZZZZ"); >+ >+ 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", >+ result.context); >+} > }
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 191125
:
70297
| 73303