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 86292 Details for
Bug 210681
Code assist fails to propose inner type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
bug210681_002.txt (text/plain), 4.89 KB, created by
David Audel
on 2008-01-07 04:54:32 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
David Audel
Created:
2008-01-07 04:54:32 EST
Size:
4.89 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.349 >diff -u -r1.349 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 30 Nov 2007 15:31:22 -0000 1.349 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 7 Jan 2008 09:52:51 -0000 >@@ -5201,8 +5201,6 @@ > if (typeName == null) > return; > >- if (this.assistNodeIsSuperType && !this.insideQualifiedReference) return; // we're trying to find a supertype >- > if (this.insideQualifiedReference > || typeName.length == 0) { // do not search up the hierarchy > >@@ -5369,7 +5367,7 @@ > if (typeName == null || typeName.length == 0) > return; > >- if (this.assistNodeIsSuperType && !this.insideQualifiedReference) return; // we're trying to find a supertype >+ if (this.assistNodeIsSuperType && !this.insideQualifiedReference && this.isForbidden(currentType)) return; // we're trying to find a supertype > > findMemberTypes( > typeName, >#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.172 >diff -u -r1.172 CompletionTests.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 4 Jan 2008 12:29:56 -0000 1.172 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 7 Jan 2008 09:53:01 -0000 >@@ -5762,6 +5762,61 @@ > requestor.getResults()); > } > >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=212713 >+public void testCompletionInsideExtends13() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Test.java", >+ "package test;\n"+ >+ "public class Test {\n"+ >+ " static class GrrrBug {}\n"+ >+ " class Foo extends Grrr\n"+ >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "Grrr"; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ "Test.GrrrBug[TYPE_REF]{GrrrBug, test, Ltest.Test$GrrrBug;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CLASS + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", >+ requestor.getResults()); >+} >+ >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=212713 >+public void testCompletionInsideExtends14() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/GrrrBug1.java", >+ "package test;\n"+ >+ "public class GrrrBug1 {\n"+ >+ " public static class GrrrBug2 {\n"+ >+ " public static class GrrrBug3 {}\n"+ >+ " }\n"+ >+ " public static class GrrrBug4 extends Grrr {\n"+ >+ " public static class GrrrBug5 {}\n"+ >+ " }\n"+ >+ "}\n"+ >+ "class GrrrBug6 {\n"+ >+ " public static class GrrrBug7 {}\n"+ >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "extends Grrr"; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ "GrrrBug1.GrrrBug2.GrrrBug3[TYPE_REF]{test.GrrrBug1.GrrrBug2.GrrrBug3, test, Ltest.GrrrBug1$GrrrBug2$GrrrBug3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CLASS + R_CASE + R_NON_RESTRICTED) + "}\n" + >+ "GrrrBug6.GrrrBug7[TYPE_REF]{test.GrrrBug6.GrrrBug7, test, Ltest.GrrrBug6$GrrrBug7;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CLASS + R_CASE + R_NON_RESTRICTED) + "}\n" + >+ "GrrrBug1[TYPE_REF]{GrrrBug1, test, Ltest.GrrrBug1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CLASS + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + >+ "GrrrBug1.GrrrBug2[TYPE_REF]{GrrrBug2, test, Ltest.GrrrBug1$GrrrBug2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CLASS + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + >+ "GrrrBug6[TYPE_REF]{GrrrBug6, test, Ltest.GrrrBug6;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CLASS + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", >+ requestor.getResults()); >+} >+ > //https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151 > public void testCompletionInsideExtends2() throws JavaModelException { > this.wc = getWorkingCopy(
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 210681
: 86292