Eclipse Europa (3.3) has a new Cheat Sheet Editor which is a vast improvement over the XML editor used in the Callisto (3.2) release.
- Create a cheat sheet, File->New->Other...->User Assistance->Cheat Sheets.
- Enter a filename and click Finish.
The new Cheat Sheet Editor will appear. Select the Item and you will see the definition and command sections appear to the right. Click the Browse... button to see the new Command Composer.
The Command Composer shows a list of available commands and their parameters. Gone are the days of hunting through eclipse plugin.xml files looking for command ids.
- In the Command Composer, select Window->Preferences.
- Use the Preference Page combo box to select General->Editors->File Associations.
- Click OK.
You now have a cheat sheet item which will display the File Association preference page.
If you want to see what happens inside Eclipse, display the
ParameterizedCommand class and set a break point at
executeWithChecks(Object, Object). Now run your application in debug mode, display your cheat sheet and press "Click to perform".
org.eclipse.ui.window.preferences is defined in
org.eclipse.ui/plugin.xml. Its default handler is
ShowPreferencePageHandler which is found in the
Read up on the following extension points and use the
ShowPreferencePageHandler as an template to build your own commands that can be accessed from a cheat sheet. See New menu contribution extension for readings on how to use a command in a menu, toolbar, or popup menu.