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 59058 Details for
Bug 174001
[assist] Unexpected types are proposed inside catch block
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix for the empty token case
bug174001_001.txt (text/plain), 3.36 KB, created by
David Audel
on 2007-02-15 10:06:30 EST
(
hide
)
Description:
Proposed fix for the empty token case
Filename:
MIME Type:
Creator:
David Audel
Created:
2007-02-15 10:06:30 EST
Size:
3.36 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/CompletionTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests.java,v >retrieving revision 1.145 >diff -u -r1.145 CompletionTests.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 14 Feb 2007 08:58:18 -0000 1.145 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 15 Feb 2007 12:33:07 -0000 >@@ -854,7 +854,6 @@ > this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); > > assertResults( >- "Test[TYPE_REF]{Test, test, Ltest.Test;, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + > "Exception[TYPE_REF]{Exception, java.lang, Ljava.lang.Exception;, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_EXCEPTION + R_EXPECTED_TYPE + R_NON_RESTRICTED) + "}\n" + > "IZZException[TYPE_REF]{IZZException, test, Ltest.IZZException;, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_EXCEPTION + R_EXACT_EXPECTED_TYPE + R_NON_RESTRICTED) + "}", > requestor.getResults()); >@@ -9692,7 +9691,6 @@ > requestor.getResults()); > } else { > assertResults( >- "CompletionMemberType2[TYPE_REF]{CompletionMemberType2, test, Ltest.CompletionMemberType2;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED)+"}\n"+ > "CompletionMemberType2.MemberException[TYPE_REF]{MemberException, test, Ltest.CompletionMemberType2$MemberException;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_EXCEPTION+ R_NON_RESTRICTED)+"}", > requestor.getResults()); > } >#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.318 >diff -u -r1.318 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 14 Feb 2007 08:58:11 -0000 1.318 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 15 Feb 2007 12:33:11 -0000 >@@ -6343,6 +6343,8 @@ > findTypeParameters(token, scope); > } > } >+ >+ boolean isEmptyPrefix = token.length == 0; > > if (!skip && proposeType && this.unitScope != null) { > ReferenceBinding outerInvocationType = scope.enclosingSourceType(); >@@ -6397,6 +6399,10 @@ > if(!sourceType.isInterface() && !sourceType.isAnnotationType()) continue next; > } else if (this.assistNodeIsAnnotation) { > if(!sourceType.isAnnotationType()) continue next; >+ } else if (isEmptyPrefix && this.assistNodeIsException) { >+ if (sourceType.findSuperTypeErasingTo(TypeIds.T_JavaLangThrowable, true) == null) { >+ continue next; >+ } > } > > int relevance = computeBaseRelevance(); >@@ -6426,7 +6432,6 @@ > this.findTypesFromStaticImports(token, scope, proposeAllMemberTypes, typesFound); > } > >- boolean isEmptyPrefix = token.length == 0; > if (isEmptyPrefix && !this.assistNodeIsAnnotation) { > if(proposeType && this.expectedTypesPtr > -1) { > next : 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 174001
: 59058