Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "E4/Commands"

< E4
(New page: Some thoughts on executing commands in E4: * Commands should be easy to execute * When a command executes it should have access to the parts of the model that it cares about * A command s...)
 
Line 1: Line 1:
Some thoughts on executing commands in E4:
+
= Random thoughts and constraints =
 +
 
 +
== Handlers ==
 +
 
 +
Some thoughts on executing handlers in E4:
  
 
* Commands should be easy to execute
 
* Commands should be easy to execute
Line 5: Line 9:
 
* A command should always be able to determine if it can execute
 
* A command should always be able to determine if it can execute
 
* A command in a local context (like within a view) should always be presented with its local state
 
* A command in a local context (like within a view) should always be presented with its local state
 +
 +
== Menus ==
 +
 +
Thoughts on menus in E4:
 +
 +
* The application or product should have final say one which menus are visible or not.
 +
* Should menus be request driven: MenuItems check their visibility and enabled state before they appear, in the desktop case on an SWT.Show event
 +
* Should menus be event driven: property change events update the MenuItems, creating, disposing, and enabling them asynchronously
 +
 +
== Toolbars ==
 +
 +
Thoughts on toolbars in E4:
 +
 +
* they share a lot of code with menus in the eclipse framework: this can make the code for both complicated (perhaps by necessity)
 +
* Should toolbars be request driven: ToolBars are update by a request into the framework, potentially a layout or perhaps timer driven
 +
* Should toolbars be event driven: property change events can update the tool items and add/remove them from toolbars where necessary

Revision as of 20:01, 18 May 2008

Random thoughts and constraints

Handlers

Some thoughts on executing handlers in E4:

  • Commands should be easy to execute
  • When a command executes it should have access to the parts of the model that it cares about
  • A command should always be able to determine if it can execute
  • A command in a local context (like within a view) should always be presented with its local state

Menus

Thoughts on menus in E4:

  • The application or product should have final say one which menus are visible or not.
  • Should menus be request driven: MenuItems check their visibility and enabled state before they appear, in the desktop case on an SWT.Show event
  • Should menus be event driven: property change events update the MenuItems, creating, disposing, and enabling them asynchronously

Toolbars

Thoughts on toolbars in E4:

  • they share a lot of code with menus in the eclipse framework: this can make the code for both complicated (perhaps by necessity)
  • Should toolbars be request driven: ToolBars are update by a request into the framework, potentially a layout or perhaps timer driven
  • Should toolbars be event driven: property change events can update the tool items and add/remove them from toolbars where necessary

Back to the top