Community
Participate
Working Groups
I believe it should be possible to fill default constructor arguments from template proposals just as it happens with methods. To be exact I'll describe the difference. Let's say we have this piece of code: public class Test { public Test(int a, int b) {} public void foo(int c, int d) {} public void test() { // testing area ;) } } What happens for method: Place your cursor in the testing area and type 'fo' Ctrl+Space, Enter. What you get is: 'foo(c, d)' -- a method invocation with parameter names filled in. What happens for constructor: Place your cursor in the testing area and type 'new Te' Ctrl+Space, Enter. What you get is: 'new Test'. OK, that was a class name. Now type '(' and press Ctrl+Space again for constructors list. If you press Enter instead of filed argument names (as was with the method above) you get a help popup (helpful, granted, but that's not the point). There seems to be no way to auto-fill constructor argument names. I believe there should be a way to auto-fill argument names from the 'Proposals' window or to turn that help popup into argument names list. Current behavior seems inconsistent. Why are methods better than constructors? :) Eclipse 3.4M5 (I20080207-1530)
If you have this: "new Te' Ctrl+Space" you should already get the constructor being added (this is bug 6930). More general, this is a dup of bug 25313. *** This bug has been marked as a duplicate of bug 25313 ***