I’m working on a GWT project and I find it very tedious to have to add a function to my servlet, then copy and paste the function signature into my Service interface, then copy and paste it into my ServiceAsync interface and change the return parameter to be a callback. Is there a tool or a setting where I can just add public methods to my class and they can get copied into the other interfaces? Even if its not automatic it would be nice to be able to select specific methods and have them copied automatically.
I’m using eclipse and ideally it would update my interface each time I save implementation since thats when it checks my code and complains that my changes break the interface.
If you add the method to your
*Serviceinterface, then Eclipse can auto-generate the method (“Add unimplemented methods…”) in your*ServiceImplservlet, which you can then just fill in. Also, if you’ve got the Google Eclipse plugin installed, it will underline the new method in your*Serviceinterface and complain that it’s not in the*ServiceAsync. It might have aCTRL + 1option to generate it in that interface as well.