Community
Participate
Working Groups
HEAD. After the fix for bug 336451, content assist no longer throws a CCE exception. But its not possible to test it with content assist tests inside JDT/Core since the problem was with compiler bindings, which are only used when code complete is invoked from outside. It will be good to have a regression test for this case. public class EclipseTest { private static interface InvokerIF{ public <T extends ArgIF> T invoke(T arg) throws Exception; } private static class Invoker implements InvokerIF{ public <T extends ArgIF> T invoke(T arg){ return arg; } } private static interface ArgIF{ } private static interface ArgIF2<C> extends ArgIF{ } private static class ArgImpl<C> implements ArgIF2<C>{ public ArgImpl() { super(); } } public static void main(String[] args) throws Exception { InvokerIF test = new Invoker(); test.invoke(new ArgImpl[CTRL-SPC]) } }
>It will be good to have a regression test for this case Indeed :-) Can you please provide one? You probably want to add it to: org.eclipse.jdt.text.tests.contentassist.TypeCompletionTest
Created attachment 195325 [details] testcase Attaching a test for CodeCompletionTest. I don't know how to test this in TypeCompletionTest Also, I havent run this test. The o.e.jdt.text.tests has millions of dependencies. It takes quite long to check out so many projects with slow connections here. It'll be more convenient for some1 who already has the setup to take this test and commit it. Dani, can you please take it forward? Thanks!
Thanks Ayush. The test was almost good but failed due to missing: collector.setAllowsRequiredProposals(CompletionProposal.CONSTRUCTOR_INVOCATION, CompletionProposal.TYPE_REF, true); Adjusted the test and committed to HEAD.
Verified in I20110512-2000 that the test is works and got released into the map file.