PTP/designs/services

From Eclipsepedia

< PTP‎ | designs
Jump to: navigation, search

RDT provides a services framework for configuring the various services required for remote project operation. It is proposed that this services framework be moved to a separate set of plugins at the top level: org.eclipse.ptp.services.core and org.eclipse.ptp.services.ui. The core plugin will provide the service and service provider extension point and interfaces. The UI plugin will provide a configuration wizard, wizard page templates, and configuration page templates.

Contents

Service Model

The service model comprises two levels:

Services (implements IService) 
Specify a name and ID that describe a particular type of service. Examples of services include Launch, Debug, Profile, Indexing, Build.
Providers (implements IServiceProvider)
Specify a name and a class that implements the functionality of service. There can be any number of providers for a particular service.

Extension Points

Plugins can add new services and providers using the services and providers extension points.

Point Attributes Description
services id (required) the ID of the service
name (required) the name of the service
priority (optional) specifies the priority of the service. If not provided, the service will be give the minimum priority
providers id (required) the ID of the provider
name (required) the name of the provider
serviceId (required) the ID of the service this provider is for
priority (optional) specifies the priority of the provider. If not provided, the provider will be give the minimum priority

Service Configurations

A particular set of services and providers is known as a service configuration. Service configurations are associated with a project in the workspace. Each project can have multiple service configurations, but only one configuration is active at a time.

Service configurations are persisted with the project, and it is possible to import/export service configurations.

Service Configuration Wizard

A configuration wizard will provide a means of configuring all the initial services required by a project. It will also be possible to create a project by using an existing service configuration so the user does not have to repeatedly use the wizard.

Services and providers contribute wizard pages that drive the flow of the wizard, however neither a service nor a provider need contribute wizard pages.

The order the pages are displayed is determined by the priority assigned to the services.

The figure below shows the flow of wizard pages. The wizard pages for the highest priority service are displayed first, then if a provider for the service has been selected, the pages for the provider are displayed. The pages for the next highest priority service are then displayed, and the process repeats until pages for all services have been displayed.

Service wizard.png

Extension Points

Plugins can add new service and provider wizard pages by supplying UI contributors using the serviceContributors and providerContributors extension points.

Point Attributes Description
serviceContributors id (required) the ID of the service making this UI contribution
class (required) a fully qualified name of the Java class implementing IServiceContributor
providerContributors id (required) the ID of the service provider making this contribution
class (required) a fully qualified name of the Java class implementing IServiceProviderContributor

Example

The following is an example of how the configuration wizard will operate.

1. On entry, the wizard will display an intro page.

Wiz 1.png


2. The following pages will be contributed by the services. In this case, the project location service has contributed a wizard page that allows the user to select a local or remote project location.

Wiz 2.png


3. If the user selects a remote location, the wizard will display a page that allows the user to configure the remote location properties.

Wiz 3.png


4. The wizard will continue displaying pages for each service that has contributed wizard pages. Before the wizard completes, it will display a page that shows all services that have been configured, and allows the user to add and/or change the configuration of services. Selecting the "Configure..." button for a particular service will re-invoke the wizard pages for that service.

Wiz 4.png