bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js
function SettingsList(options) {
		this.serviceRegistry = options.serviceRegistry;
		this.prefService = this.serviceRegistry.getService('orion.core.preference'); //$NON-NLS-1$
		var commandRegistry = this.commandRegistry = options.commandRegistry;
		this.settings = options.settings;
		this.title = options.title;
		this.fileClient = options.fileClient;
		if (!options.parent || !options.serviceRegistry || !options.settings || !options.title) {
			throw new Error('Missing required option'); //$NON-NLS-0$
		}
		this.parent = typeof options.parent === 'string' ? document.getElementById('parent') : options.parent; //$NON-NLS-0$ //$NON-NLS-1$

		var restoreCommand = new Command({
			id: "orion.pluginsettings.restore", //$NON-NLS-0$
			name: messages["Restore"],
			callback: function(data) {
				var dialog = new ConfirmDialog({
					confirmMessage: messages["ConfirmRestore"],
					title: messages["Restore"]
				});
				dialog.show();
				var _self = this;
				dialog.addEventListener("dismiss", function(event) {
					if (event.value) {
					    if(data.items) {
						    _self.restore(data.items.pid);
						} else {
						    _self.restore();
						}
					}
				});
			}.bind(this)
		});
		commandRegistry.addCommand(restoreCommand);
		commandRegistry.registerCommandContribution("restoreDefaults", "orion.pluginsettings.restore", 2); //$NON-NLS-1$ //$NON-NLS-2$

		this.render(this.parent, this.serviceRegistry, this.settings, this.title);
	}
function SettingsList(options) {
		this.serviceRegistry = options.serviceRegistry;
		this.prefService = this.serviceRegistry.getService('orion.core.preference'); //$NON-NLS-1$
		var commandRegistry = this.commandRegistry = options.commandRegistry;
		this.settings = options.settings;
		this.title = options.title;
		this.fileClient = options.fileClient;
		if (!options.parent || !options.serviceRegistry || !options.settings || !options.title) {
			throw new Error('Missing required option'); //$NON-NLS-0$
		}
		this.parent = typeof options.parent === 'string' ? document.getElementById('parent') : options.parent; //$NON-NLS-0$ //$NON-NLS-1$

		var restoreCommand = new Command({
			id: "orion.pluginsettings.restore", //$NON-NLS-0$
			name: messages["Restore"],
			callback: function(data) {
				var dialog = new ConfirmDialog({
					confirmMessage: messages["ConfirmRestore"],
					title: messages["Restore"]
				});
				dialog.show();
				var _self = this;
				dialog.addEventListener("dismiss", function(event) {
					if (event.value) {
					    if(data.items) {
						    _self.restore(data.items.pid);
						} else {
						    _self.restore();
						}
					}
				});
			}.bind(this)
		});
		commandRegistry.addCommand(restoreCommand);
		commandRegistry.registerCommandContribution("restoreDefaults", "orion.pluginsettings.restore", 2); //$NON-NLS-1$ //$NON-NLS-2$

		this.render(this.parent, this.serviceRegistry, this.settings, this.title);
	}
function SettingsList ( options ) { this . serviceRegistry = options . serviceRegistry ; this . prefService = this . serviceRegistry . getService ( 'orion.core.preference' ) ; //$NON-NLS-1$ var commandRegistry = this . commandRegistry = options . commandRegistry ; this . settings = options . settings ; this . title = options . title ; this . fileClient = options . fileClient ; if ( ! options . parent || ! options . serviceRegistry || ! options . settings || ! options . title ) { throw new Error ( 'Missing required option' ) ; //$NON-NLS-0$ } this . parent = typeof options . parent === 'string' ? document . getElementById ( 'parent' ) : options . parent ; //$NON-NLS-0$ //$NON-NLS-1$ var restoreCommand = new Command ( { id : "orion.pluginsettings.restore" , //$NON-NLS-0$ name : messages [ "Restore" ] , callback : function ( data ) { var dialog = new ConfirmDialog ( { confirmMessage : messages [ "ConfirmRestore" ] , title : messages [ "Restore" ] } ) ; dialog . show ( ) ; var _self = this ; dialog . addEventListener ( "dismiss" , function ( event ) { if ( event . value ) { if ( data . items ) { _self . restore ( data . items . pid ) ; } else { _self . restore ( ) ; } } } ) ; } . bind ( this ) } ) ; commandRegistry . addCommand ( restoreCommand ) ; commandRegistry . registerCommandContribution ( "restoreDefaults" , "orion.pluginsettings.restore" , 2 ) ; //$NON-NLS-1$ //$NON-NLS-2$ this . render ( this . parent , this . serviceRegistry , this . settings , this . title ) ; }
Widget showing list of Plugin Settings.
Requires the 'orion.cm.configadmin' service.
@param {DomNode|String} options.parent
@param {orion.serviceregistry.ServiceRegistry} options.serviceRegistry
@param {orion.settings.Settings[]} options.settings
Widget showing list of Plugin Settings . Requires the orion . cm . configadmin service .