Community
Participate
Working Groups
The scope (final,static), visibility (public,private), indepedent generation choices present in VAJ's 'add field' wizard are not part of the process to add getters and setters in eclipse. What about providing a dialog with those choices? And generating the getter an setter automatically generated a tester code for JUnit ... { pseudo code ... setX(k); assert(getX() == k) ; setX(j); assert(getX() == j) ... } THEN it would have an advantage over the VAJ wizard ....
Moving to JDT/UI for comment.
The additional testing code is NOT to test the auto generated code... :) The testing code is to ensure that modifications done AFTER generation of the getters and setters do not violate the obvious gettter/setter contract. Since the code generation is somewhat simplistic today, if forces a developer to visit the implementation of the just generated getter/setter for further tweaking; and therefore subjects that to Human error.
this would introduce a dependency on an assert facility. We have to support JDK 1.3 in 2.0. deferred
[code manipulation]
*** This bug has been marked as a duplicate of 35870 ***