Posted by David Chandler on November 3, 2009
Maybe everyone knows this already, but in case not…
Put your cursor in the name of an interface (say, a Display interface nested in a GWT presenter) and press Ctrl-T. Eclipse shows you all the classes that implement the interface and you can then navigate directly to an implementing class. I frequently use this in combination with Ctrl+Alt+H to find out how a method gets called.
You can find all of my favorite keyboard shortcuts in my Eclipse Google notebook listed in the left sidebar.
Posted in Eclipse | Leave a Comment »
Posted by David Chandler on September 25, 2009
When you use gwt-dispatch, a single dispatch servlet handles all service requests, so you no longer need to configure individual servlets in web.xml. Furthermore, action handlers are configured in Java code, like this:
bindHandler(FindPrayerListsAction.class, FindListsHandler.class);
bindHandler(AddPrayerListAction.class, AddPrayerListHandler.class);
bindHandler(DeletePrayerListsAction.class, DeletePrayerListsHandler.class);
Because all configuration is done in Java, you can rename any handler, Action, Result, etc., and the Eclipse refactoring tools automatically rename it everywhere.
And speaking of Eclipse, did you know you can type only the capital letters of a class name and hit Ctrl+Space to let Eclipse automatically expand it? For example, to type “FindPrayerListsAction” above, I could simply type “FPLA” and hit Ctrl+Space. This also works in the Open Type (Ctrl+Shift+T) and Open Resource (Ctrl+Shift+R) dialogs.
Posted in Eclipse, Google Web Toolkit, Model-View-Presenter | Leave a Comment »
Posted by David Chandler on August 14, 2006
Just a quickie time-saver here. I hate having to use the mouse to navigate through code (yes, I can still use vi) as it slow and bothered my right shoulder enough over time to force me to mouse with my left hand. If you’re like me, you’ll want to know about:
Ctrl+Shift+T (Open Type) Just type the first few letters of the Java class you’re looking for, and voila, you can use the arrow keys to find exactly the right one. No more clicking on folders in Package Explorer.
Ctrl+Shift+R (Open Resource) Same drill, but works for any resource in the Package Explorer.
You can find a bunch more of my favorite keyboard shortcuts in my Eclipse Google Notebook (linked on left).
/dmc
Posted in Eclipse, Ergonomics | Comments Off
Posted by David Chandler on March 30, 2006
Ever change your mind about a field name or type name? Just move the cursor over the name and hit Ctrl+2, R to rename it. Eclipse highlights all occurrences of the variable or type name and updates them all as you type. Very cool.
/dmc
Posted in Eclipse | Leave a Comment »