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 142043 Details for
Bug 270437
[assist] Completion proposal leads to cycle detected error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Tests plugin patch - v-0.6
270437-tests-patch-v0.6.txt (text/plain), 3.64 KB, created by
Pradeep Balachandran
on 2009-07-20 12:27:55 EDT
(
hide
)
Description:
Tests plugin patch - v-0.6
Filename:
MIME Type:
Creator:
Pradeep Balachandran
Created:
2009-07-20 12:27:55 EDT
Size:
3.64 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.203 >diff -u -r1.203 CompletionTests.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 7 May 2009 08:49:30 -0000 1.203 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 20 Jul 2009 16:24:12 -0000 >@@ -20102,4 +20102,88 @@ > requestor.getResults()); > } > >+/** >+ * An inner/member class should not be offered as completion suggestion. >+ * @throws JavaModelException >+ */ >+public void test270437a() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Test270437a.java", >+ "package test;" + >+ "public class Test270437a extends Test270437a. {\n" + >+ " public class Inner {}\n" + >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "Test270437a."; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ // In the absence of the fix, the results would be as follows, which is wrong: >+ //"Test270437a.Inner[TYPE_REF]{Inner, test, Ltest.Test270437a$Inner;, null, 39}", >+ assertResults( >+ "", //Empty! >+ requestor.getResults()); >+} >+ >+/** >+ * An inner/member interface should not be offered as completion suggestion. >+ * @throws JavaModelException >+ */ >+public void test270437b() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Test270437b.java", >+ "package test;" + >+ "public class Test270437b implements Test270437b. {\n" + >+ " public interface Inner {}\n" + >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "Test270437b."; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ // In the absence of the fix, the results would be as follows, which is wrong: >+ //"Test270437b.Inner[TYPE_REF]{Inner, test, Ltest.Test270437b$Inner;, null, 39}", >+ assertResults( >+ "", //Empty! >+ requestor.getResults()); >+} >+ >+/** >+ * An inner/member interface should not be offered as completion suggestion. >+ * @throws JavaModelException >+ */ >+public void test270437c() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Test270437c.java", >+ "package test;" + >+ "class X extends X.MyClass1. {\n" + >+ " public class MyClass1 {\n" + >+ " public class MyClass2 {\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "X.MyClass1."; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ // In the absence of the fix, the results would be as follows, which is wrong: >+ //"X.MyClass1.MyClass2[TYPE_REF]{MyClass2, test, Ltest.X$MyClass1$MyClass2;, null, 39}", >+ assertResults( >+ "", //Empty! >+ 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
Actions:
View
|
Diff
Attachments on
bug 270437
:
136016
|
136017
|
142042
|
142043
|
142113
|
142114