Community
Participate
Working Groups
20040423 This is a feature I would think is worth an effort to put in 3.0. Similar to overridden methods that are suggested in type bodies I would like to offer getter and setters at this place. e.g. on class A { Point size; Sting source; getS|code assist I would suggest getSize(), getSource() To minimize the work of jdt.core, we could do the following: The result collectpr in jdt.ui need a way to detect that the current index is at a method body declaration. That means I need at least one 'method decl' assist callback and then we can then add all the getter/setter proposals. Therefore jdt.core could always given me a method decl assist: On 'getS', suggest a method private void getS() { } This would be an nice feature anyways: foo|code assist -> private void foo() { } Have nice quick method stub for tests, demos ect (An additional idea would be to switch to the template mode when applied, e.g to Step through modifier, return type and parameter
Nice to have, but post 3.0 and with the new codeassist API.
How would a random client know that this method is an artifact ?
The trick is that it's useful as is. As said, it offers to create a method stub with the name that's currently there. class A { eq| } suggests 'equals': existing proposals to override the equals methods -> public boolean equals(Object o) { ... } 'eq': new (test method with the name 'eq' -> private void eq() {} You would use this proposal for quickly create a test method, ect.
Could be useful indeed. Will investigate.
Fixed. Added a new interface public interface IExtendedCompletionRequestor extends ICompletionRequestor { void acceptPotentialMethodDeclaration( char[] declaringTypePackageName, char[] declaringTypeName, char[] selector, int completionStart, int completionEnd, int relevance); } Implements this class and use them as a completion requestor. This is a temporary fix. Once the new completion API will be ready, this class will be removed.
Verified in 200405180816