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 "Orion/Documentation/Developer Guide/Plugging into the settings page"

(See also: fdsdsdas)
(Add orion.core.setting doc)
Line 1: Line 1:
 
= Overview =
 
= Overview =
Orion plugins can define ''settings''. A setting defines some persistent information that is provided to one of the plugins's services. Defined settings appear on Orion's Settings page, and their values can be changed using an automatically-generated UI. Each setting has a unique identifier called a ''PID'' (persistent identifier), as well as ''metatype'' information. The metatype defines the "shape" of the setting, specifically what named properties appear in the setting and what data type they have (string, boolean, number, etc). The Settings page uses this metatype information to generate appropriate UI widgets (for example, text field, checkbox, etc).
+
Orion plugins can define ''Settings''. A Setting defines some persistent information that is provided to one of the plugins's services. Defined Settings appear on Orion's "Settings" page, and their values can be changed using an automatically-generated UI.
 +
 
 +
A Setting is a combination of two more basic configuration elements:
 +
* A [[Orion/Documentation/Developer Guide/Configuration services#Managed Services|''PID'' (persistent identifier)]], which uniquely identifies the configuration data for the setting.
 +
* [[Orion/Documentation/Developer Guide/Configuration services#Meta Typing|''Metatype'' information]], which defines the "shape" of the setting. Specifically, it defines what named properties appear in the setting and what data type they have (string, boolean, number, etc). The Settings page uses this Metatype information to generate appropriate UI widgets (for example, text field, checkbox, etc).  
  
 
= orion.core.setting =
 
= orion.core.setting =
Contributes a setting.
+
The <code>orion.core.setting</code> service contributes one or more settings.
 +
 
 +
== Service properties ==
 +
To contribute one or more Settings, the '''settings''' service property is used:
 +
; settings
 +
: <code>Setting[]</code>. Defines Settings.
 +
:; pid
 +
:: <code>String</code>. The PID for this setting. This PID occupies the same namespace as the PIDs contributed by [[Orion/Documentation/Developer Guide/Configuration services#Managed Services|Managed Services]], and must be unique in that respect.
 +
:; name
 +
:: <code>String</code>. Human-readable name of this setting.
 +
:; tags
 +
:: <code>String[]</code>. ''Optional.'' List of tags applying to this setting.
 +
:; properties
 +
:: <code>PropertyType[]</code>. Gives the properties that make up this setting. The shape of the <code>PropertyType</code> element is explained in [[Orion/Documentation/Developer Guide/Configuration services#Define an OCD|Metatype documentation]].
 +
 
 +
== Service methods ==
 +
None. This service is completely declarative.
 +
 
 +
== Examples ==
 +
 
  
 
== See also ==
 
== See also ==
[[Orion/Documentation/Developer Guide/Configuration services|Configuration services]]
+
* [[Orion/Documentation/Developer Guide/Configuration services|Configuration services]]

Revision as of 10:36, 11 September 2012

Overview

Orion plugins can define Settings. A Setting defines some persistent information that is provided to one of the plugins's services. Defined Settings appear on Orion's "Settings" page, and their values can be changed using an automatically-generated UI.

A Setting is a combination of two more basic configuration elements:

  • A PID (persistent identifier), which uniquely identifies the configuration data for the setting.
  • Metatype information, which defines the "shape" of the setting. Specifically, it defines what named properties appear in the setting and what data type they have (string, boolean, number, etc). The Settings page uses this Metatype information to generate appropriate UI widgets (for example, text field, checkbox, etc).

orion.core.setting

The orion.core.setting service contributes one or more settings.

Service properties

To contribute one or more Settings, the settings service property is used:

settings
Setting[]. Defines Settings.
pid
String. The PID for this setting. This PID occupies the same namespace as the PIDs contributed by Managed Services, and must be unique in that respect.
name
String. Human-readable name of this setting.
tags
String[]. Optional. List of tags applying to this setting.
properties
PropertyType[]. Gives the properties that make up this setting. The shape of the PropertyType element is explained in Metatype documentation.

Service methods

None. This service is completely declarative.

Examples

See also

Back to the top