Friday, February 15, 2008

My Favorite Breakpoints

I have been meaning to start listing the breakpoints I use to track down issues with Eclipse since the beginning of the year. Even when you know the problem is with your own code diving into the Eclipse code can greatly reduce your debug time. This is specific to the Eclipse 3.3 release. Please send me your favorite break points and I'll add them to the list.

User assistance
WorkbenchHelpListener.helpRequested(HelpEvent)
Prease F1 (or CTRL + F1 for GNOME) and you will end up here. A quick way to figure out which help context id is being requested.
WorkbenchHelpSystem.displayContext(IContext, int, int)
Most requests for help end up here.
StandaloneInfocenter.executeCommand(List)
Stand alone infocenter entry point.
Menu contribution (org.eclipse.ui.menus)

If you use commands and handlers with the new Eclipse 3.3 org.eclipse.ui.menus then these breakpoints are for you.

MenuPersistence.readAdditions()
See org.eclipse.ui.menus contributions being read from a plugin.xml file.
MenuAdditionCacheEntry.createContributionItems()
Most requests for help end up here.
PopupMenuExtender.menuAboutToShow(IMenuManager)
Called when MenuManager fires an about to show event