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 165752 Details for
Bug 267091
[content assist] After 'implements' interface members are not proposed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed fix v1.0 + updated regression tests
patchcompleteAfterImplements.txt (text/plain), 4.25 KB, created by
Ayushman Jain
on 2010-04-22 09:19:52 EDT
(
hide
)
Description:
proposed fix v1.0 + updated regression tests
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2010-04-22 09:19:52 EDT
Size:
4.25 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.410 >diff -u -r1.410 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 7 Jan 2010 20:18:50 -0000 1.410 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 22 Apr 2010 13:17:23 -0000 >@@ -9923,7 +9923,7 @@ > ObjectVector typesFound) { > > ReferenceBinding currentType = receiverType; >- if (typeName == null || typeName.length == 0) >+ if (typeName == null) > return; > > if (this.assistNodeIsSuperType && !this.insideQualifiedReference && isForbidden(currentType)) return; // we're trying to find a supertype >#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.217 >diff -u -r1.217 CompletionTests.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 22 Apr 2010 04:39:17 -0000 1.217 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 22 Apr 2010 13:17:43 -0000 >@@ -21186,4 +21186,72 @@ > "AClass[TYPE_REF]{AClass, test, Ltest.AClass;, null, null, 27}", > requestor.getResults()); > } >+ >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=267091 >+// To verify that we get interface proposals after 'implements' >+public void testBug267091a() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Try.java", >+ "package test;\n" + >+ "interface In{}\n" + >+ "interface Inn{\n" + >+ " interface Inn2{}\n" + >+ "}\n" + >+ "class ABC {\n" + >+ " interface ABCInterface;\n" + >+ "}\n" + >+ "public class Try implements {\n" + >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ requestor.allowAllRequiredProposals(); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "Try implements "; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ // without the fix no proposals obtained. >+ "Inn.Inn2[TYPE_REF]{test.Inn.Inn2, test, Ltest.Inn$Inn2;, null, null, 44}\n" + >+ "ABC.ABCInterface[TYPE_REF]{ABCInterface, test, Ltest.ABC$ABCInterface;, null, null, 47}\n" + >+ "In[TYPE_REF]{In, test, Ltest.In;, null, null, 47}\n" + >+ "Inn[TYPE_REF]{Inn, test, Ltest.Inn;, null, null, 47}", >+ requestor.getResults()); >+} >+ >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=267091 >+// To verify that we get type proposals after 'extends' >+public void testBug267091b() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Try.java", >+ "package test;\n" + >+ "class In{}\n" + >+ "class Inn{\n" + >+ " class Inn2{\n" + >+ " class Inn3{\n" + >+ " }\n" + >+ " }\n" + >+ "}\n" + >+ "class ABC extends Inn{}\n" + >+ "public class Try extends {\n" + >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ requestor.allowAllRequiredProposals(); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "Try extends "; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ // without the fix no proposals obtained. >+ "Inn.Inn2[TYPE_REF]{test.Inn.Inn2, test, Ltest.Inn$Inn2;, null, null, 44}\n" + >+ "Inn.Inn2.Inn3[TYPE_REF]{test.Inn.Inn2.Inn3, test, Ltest.Inn$Inn2$Inn3;, null, null, 44}\n" + >+ "ABC[TYPE_REF]{ABC, test, Ltest.ABC;, null, null, 47}\n" + >+ "In[TYPE_REF]{In, test, Ltest.In;, null, null, 47}\n" + >+ "Inn[TYPE_REF]{Inn, test, Ltest.Inn;, null, null, 47}", >+ requestor.getResults()); >+} > }
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
Flags:
Olivier_Thomann
:
iplog+
Olivier_Thomann
:
review+
Actions:
View
|
Diff
Attachments on
bug 267091
: 165752