Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340469

Summary: [client] expose plugin preferences
Product: [ECD] Orion Reporter: Susan McCourt <susan>
Component: ClientAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: malgorzata.tomczyk, mamacdon, simon_kaegi
Version: 0.2   
Target Milestone: 1.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 336260    
Bug Blocks:    

Description Susan McCourt CLA 2011-03-18 15:11:37 EDT
services such as jsbeautifier, doctorjs, etc. usually have a small set of preferences to drive how the work.  It would be nice to expose these in the plug-in definition and have a lightweight UI for exposing and editing those preferences.
Comment 1 Anton McConville CLA 2012-04-26 14:41:38 EDT
Assigning to Mark - happy to work with him as needed.
Comment 2 Szymon Brandys CLA 2012-04-29 05:59:20 EDT
We would like to use the mechanism to configure validators. Especially the one for non-externalized messages.
Comment 3 Mark Macdonald CLA 2012-06-08 15:59:30 EDT
The low-level support for declaring and receiving configuration at the service level is in (see 336260).

Remaining items for 1.0 to resolve this bug are:

1. Figuring out what higher-level service concepts are required to allow us to generate a nice UI (eg. tags for organizing/categorizing individual settings, more specific data types -- like a 'color'-typed setting should get a color picker in the UI, and so on).

2. Building the actual generated UI for contributed settings into the Settings page
Comment 4 Mark Macdonald CLA 2012-08-03 17:04:33 EDT
I've pushed the following commits to master:

> 27f4655916b519659082c39f9d4d5dfe202bceac Bug 340469 - Expose plugin preferences: UI
> 2315917206e9b0d2fdc26ab83d43ab1418e64f56 Bug 340469 - example plugin settings for JSLint, NonnlsPlugin
> 765214f3167ec14b49b438ba78a1292b613d348e Bug 340469 - Expose plugin preferences
> 4ee7ade38a82e8afb441b2c777ffebd7a574aaa6 ConfigAdmin: pref and Configuration fixes
> -Change pref node layout to work around Bug 386576
> -Make Configuration throw if it's been removed
> 82072abf127f66be1035bfdef84a584ebdf4e0f3 ConfigAdmin - refactor for multiple service names -Remove pluginregistry dependency
> 3b7745cb4f2ae1da37ff7ed96b2058ae1907e8cb Bug 340469 - add ConfigurationAdmin service to bootstrap

There is now a 'Plugin Settings' section in the settings page that lets you control contributed settings.

So far only 2 settings are defined: one is for JSLint and lets you specify validation options (the stuff that normally goes inside a /*jslint */ block). These are defaults -- as usual, an individual file can override them by providing its own /*jslint */ block.

The second setting is in the nonnlsPlugin (if you have it installed, of course). It lets you toggle the NLS warnings on or off.

I will keep working on the UI next week.