Cheat Sheet Editor Improvements in Eclipse 3.3
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".
The command org.eclipse.ui.window.preferences is defined in org.eclipse.ui/plugin.xml. Its default handler is ShowPreferencePageHandler which is found in the org.eclipse.ui.workbench plugin.
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.
org.eclipse.ui.commands- A logical representation of a task. A handler does the work. See wiki and help guide.
org.eclipse.ui.handlers- A handler does what the command represents. See wiki and help guide.
- Login or register to post comments
- 4571 reads
- Printer-friendly version
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)










Comments
Marijn replied on Fri, 2008/03/07 - 4:42am
In Eclipse 3.4 (currently at M5), the cheat sheet editor has been improved further: http://download.eclipse.org/eclipse/downloads/drops/S-3.4M2-200709210919/eclipse-news-M2.html#pde-simplecs
[quote]
The simple cheat sheet editor has been revamped to include the following enhancements:
- Custom XML formatting and XML comments preserved on save
- New Source page with a dedicated Outline view
- XML Syntax highlighting
- Quick outline (Ctrl+O)
- Drag and drop support
- Clipboard operation support (cut, copy and paste)
- Hyperlinking
- Selection synchronization between Definition and Source pages
- Browse button for Help section
[/quote]