User Interface Guidelines
From Aptana Development
Contents |
General User Interface Guidelines
- Consult Extension Points document before adding a new extension point or coupling plugins
- Use a UIJob over Display.aSyncExec
- Toolbar actions and actions contained in drop-down menus should be mutually exclusive
- See File view as example
- Set the tooltip of every button and action used
- Ensure this string is externalized as well
- Use Expand All/Collapse All actions as a pair and don't have one or the other
- Toolbar actions for an editor should only be enabled when that editor is active and disabled otherwise
- See com.aptana.ide.editors.actions.ShowWhitespace and the plugin.xml in com.aptana.ide.editor.html
- Check for an appropriate Eclipse icon before creating a new icon
- See http://codehaus.org/~bwalding/eclipse-icons/
- Download them for future reference here: http://www.codehaus.org/~bwalding/eclipse-icons.zip
- Buttons/Actions tied to a table, tree, or some other selection-based widget should only be enabled when they are available
- See com.aptana.ide.editor.html.preferences.FoldingPreferencePage as an example
- Button/Actions that remove or add things to a control should maintain a selection inside that control so they can be repeatably clicked without re-selection required by the user
- See com.aptana.ide.editor.html.preferences.FoldingPreferencePage as an example
- Buttons/Actions that toggle the content shown in views should be saved as preferences so they persist
- See Validation view as example
- Use the Job class and addJobChangeListener method for lengthy operations triggered on the UI thread
- Use com.aptana.ide.editors.preferences.PreferenceMastHead to achieve the preference heading used in the Aptana root editor pages
- Ellipsify (append '...' to) all button labels for buttons that open a new window or dialog
Preference Page Guidelines
- Use the org.eclipse.ui.keywords extension point to add keywords for preference page when content is typed in the filter box
- Re-use the keywords in the com.aptana.ide.editors plugin for other new editor preference pages
- Don't externalize strings that are preference name or value constants
Toolbar Guidelines
- When adding perspective toolbar action make sure to set the action set visible attribute to false and then set that action set visible only for the Aptana perspective
- See com.aptana.ide.intro.actionSet inside the com.aptana.ide.intro plugin.xml for an example
View Guidelines
- Return from createPartControl or createControl as fast as possible
- Use loading icon/text when needed, it is better than holding things up on the UI thread
- Use PageBookView for views tied to editors
- Use com.aptana.ide.editors.unified.UnifiedMessagePage for as message page when no editor or invalid editor is active
- Use Help icon on the toolbar that displays help for that view


