E4/Eclipse Application Services
a.k.a. "the twenty things"
This is a first list of "recommended APIs" - things that we expect most Eclipse plug-ins would make use of (if applicable). The goal is to reduce bloat by focusing on a smaller subset of core recommended Services and APIs. If these Services and APIs are also structured in a similar and consistent manner, it will also simplify understanding, foster Becoming More Asynchronous, and make it possible to solve the Too Many Listeners problem.
Note that "the Workbench", "PlatformUI" or "Platform" are not on this list. Think of which services you would want to use from within your contributed view or editor.
We believe that these services should be offered as separate, independent APIs, so that clients can make use of some of them without having to buy into all of them. Structuring them as individual services also makes it easier to use them from other languages / environments such as e.g. JavaScript.
There has been a discussion about if this list is too large. The conclusion is that you can build applications with subsets, but bigger applications usually need most of them. Instead of reducing the list further we want to make sure that in future there is only exactly one way to do a thing, not multiple as it is today.
Contents
Application Services
Core
Name | Description | Priority | Status |
---|---|---|---|
Life Cycle | A defined path of initialization and disposal for components. | High | ![]() |
Authentication/Single Sign-on | A component should be able to request authentication in a way that the end user perceives as consistent. Different backends can have different requirements, will need to support multiple mechanisms. | High | ![]() |
Status Handling | Need a consistent way for components to report warnings / unexpected errors. | High | ![]() |
Logging and Tracing | Components should be able to easily access a logger or provide tracing mechanisms to help with debugging. | High | ![]() |
Extension Registry | Registering and accessing extensions and extension points. | High | ![]() |
Scheduling Work/Reporting Progress | A component should be able to schedule work in the foreground or in the background. | High | ![]() |
Reading/Writing of Preferences | Clients need to be able to store preferences on a variety of backends. | High | ![]() |
Reporting Status | Users should be able to easily check the status of operations/requests. In 3.x this is done in the status line and the 'Progress' view. | High | ![]() |
String Localization | The Eclipse Platform needs to ensure that localization can easily be done by product teams. | High | ![]() |
Adapting Objects | The adapter pattern should be supported. | High | ![]() |
Commands/Handlers | Clients should be able to register handles for global commands like cut/copy/paste. | High | ![]() |
Eventing System | Clients should be able to monitor events easily without having a myriad of different kinds of listeners. | High | ![]() |
User Interface
Name | Description | Priority | Status |
---|---|---|---|
Receiving Input | Model objects (parts?) should be able to define an input. | High | ![]() |
Providing Selection Information | Different parts of the model should be able to react to current active selection of other parts. | High | ![]() |
Persisting State and Data | The user interface must be able to remember things like its size and layouts when it has been recreated. | High | ![]() |
Managing Shared Resources | There should be a mechanism to pool identical resources together and share them to keep memory footprint low. | High | ![]() |
Participating in Undo/Redo Support | Clients should be able to push operations to the undo/redo service and have it be tie in with other operations on the stack automatically. | High | ![]() |
Participating in Editor/Saveable Part Life Cycle | Management of dirty state, save management, prompting to save unsaved resources, etc. | High | ![]() |
Updating UI Elements | Components should be able to modify model objects directly and the UI should update if necessary | High | ![]() |
Notifications | Inform the user of events in the application that may require attention, regardless of whether the application is visible or not. | High | ![]() |
Advanced
Name | Description | Priority | Status |
---|---|---|---|
Shell Provider | Dialogs/Windows need to be parented off of the proper window. | High | ![]() |
Reacting Workbench Model Changes. | Clients should be able to listen for changes in the workbench model. | High | ![]() |
Participating in Label and Icon Decoration | The user interface must be able to remember things like its size and layouts when it has been recreated. | High | ![]() |
Reacting to Changes to the Context | The Eclipse Platform needs to be able to react to bundles coming and going on-the-fly at runtime. | High | ![]() |
Dynamically Contributing to the Workbench Model | Clients should be able to add tool items, menus, parts, and other such model objects to the workbench. | High | ![]() |
Object Contributions | Actions that can be contributed to objects of a certain type. | High | ![]() |
Focus Service | It should be possible to drive and enhance the presentation of the model/workbench based on the current "focus". | High | ![]() |
Domain-Specific
Not Sure About These
- String comparison/collation.
- "Show In" support.
- Hyperlink detection.
- Opening a web page. (Eclipse 3.x: IWorkbenchBrowserSupport)
Other Services not yet Decided on
- From Architecture Council/Minutes May 15 2008#Eclipse Application Model:
- Capabilities
- Content Types, Associations
- Markers
- Workspace, Resources (related to Team Support)
- Launching Framework
- Core Variables / Launch String Substitution
- EFS (core.filesystem)
- OSGi Stuff (NLS, ServiceTracker, Bundle States / Activator / Classloader; Log; State Location)
- The standard bundle layout also seems part of the Application Model ("how Eclipse is built"): MANIFEST.MF and Eclipse-specific extensions, Eclipse.inf, Features etc (related to Provisioning / Update / Plugins, Products, Features)
Notes from e4 break out session
- Missing: Roles, logging, Usage monitoring, Life cycle, Transactions
- Does Views and Editors belong to that list?
Data model (a rest service)
- Adapting object - Selection (currentSelection) - UI Contributions - Decorations - Common UI Elements - Persist State - Extension Registry - roles
Command Bus (a javascript function)
- Selection (change) - Undo/Redo - Handlers - Dynamic enablement - Notification Service - Focus service - logging - usage monitoring
Comments and Discussion
Kevin McGuire - Some of these support a component model, and some provide an application framework of common elements. It'd be worthwhile to identify this split since the former are essential for a web based Eclipse component model. For example, Selection service is needed so one can write independent views/editors and have them work together. Without it, there's no component interaction. Similarly, IMenuService and commands allow fine grain component interaction, so one plugin can say add a menu to a view it doesn't know about. UI State persistence though can be supported in a number of ways. Help is purely an application framework item.
Kevin McGuire - We should have Commands as a top level item although we have an entire subject page on commands. Plus here need to tie commands in with menu service and handlers (not sure right organization)
- From Architecture Council/Minutes May 15 2008#Eclipse Application Model:
- Besides the List of Services we're compiling now by hand, we'll need a strong way of describing the Services for E4 -- as a medium for newcomers to understand Eclipse -- perhaps Tooling to make Service Descriptions machine readable / usable. In the beginning, Every Service should have a Wiki page describing it and the Architecture behind it (probably linked from this Summary Page.
- Especially when Services go on the Server (Sessions, Macros Recording), need a consistent Story for exposing a Service, its state and commands, need to be Getting rid of Singletons
-
Mik to write Position Papers on new Focus Service and Notification Service - Application Model is related to almost all other architectural topics (Too Many Listeners, Becoming More Asynchronous, Dependency Injection, Sessions, Macro Recording)
Bjorn asks: where is the list of the global commands? Do we have a namespace of commands? Can any plug-in contribute to the set of commands? How do we know what the semantics of a given command are? -- See also E4/Commands