I work at a company that uses GWT for most of their projects, and in working with Eclipse there, I have noticed that when I add a new method to a *Service interface (eg, public Foo getFoo()) that it would automatically create an async version of that method in the *ServiceAsync Interface, and make an empty stub method in the *ServiceImpl class. Now that I'm working on my own projects at home using Eclipse Luna and the Google Plugin for Eclipse, I notice that this behavior is not happening. Eclipse does seem to be able to notice that the Async interface is missing a given method, but when I hit ctrl-s, it's not automagically making the changes for me.

Is there a configuration option I'm missing to add this behavior?

2

There are 2 best solutions below

0
On

Make sure that you enabled GWT in the properties of the project that has your *Service classes: Project -> Properties -> Google -> Web Toolkit -> Use Google Web Toolkit. This will enable the feature syncing services and their async versions.

As for setting it up to do automagically on save - you can set it up in Window -> Preferences -> Java -> Editor -> Save Actions. But I don't see anything there that would allow for the behavior you desire. Maybe you can cross check what you have there with your Eclipse configuration at work?

3
On

Check the preferences of your GPE plugin. Go to Window -> Preferences. There should be a section for the plugin under Google -> Web Toolkit -> Designer where it has settings for code style and event handlers. From the values there, you may be able to apply the same settings in the other Eclipse installation.

Since you also mentioned Ctrl+S, check for any settings applied on save actions by filtering on "save" in the filter text field.

If there are no options to apply this generation, then it may be due to a different version of the GPE plugin.