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

Bug 329784

Summary: Touchpoint instruction for incremental changes to program properties
Product: [Eclipse Project] Equinox Reporter: Stephan Herrmann <stephan.herrmann>
Component: p2Assignee: DJ Houghton <dj.houghton>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P2 CC: gunnar, irbull, john.arthorne, pascal
Version: 3.7   
Target Milestone: 3.7 M6   
Hardware: Other   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 330534    
Attachments:
Description Flags
patch
none
patch
none
patch none

Description Stephan Herrmann CLA 2010-11-09 08:54:00 EST
This has been mentioned in bug 241477 comment 15 and bug 278657 but
never got sufficient attention:

The touchpoint action setProgramProperty is too coarse-grained for some
properties that have a list semantics like specifically:

   osgi.hook.configurators.include

In order to be good citizens we should be able to add/remove single 
elements of this property without destroying what other plug-ins might
have entered here.

This is a pre-requisite for any two plug-ins using adaptor hooks to 
coexist in the same Eclipse installation without manual tweaking.

I assume that other properties exist that would benefit from a general
solution rather than adding special case handling for adaptor hooks, no?
Comment 1 John Arthorne CLA 2010-11-18 10:35:06 EST
Increasing priority because of its importance in release train components. Currently two release train components using framework extensions can't be installed together.
Comment 2 DJ Houghton CLA 2011-01-26 13:17:05 EST
This is similar to the work that we (Matt?) did to handle VM args.
Comment 3 Pascal Rapicault CLA 2011-01-31 09:53:19 EST
I'm not sure, but we may need to add a new action since the one we have is not an add, but a set.
Comment 4 John Arthorne CLA 2011-01-31 10:49:44 EST
Yes, this instruction would be specified to properties whose values are comma-separated lists, and would add/remove entries from the value list (removing the property altogether only if the last list item is removed).
Comment 5 DJ Houghton CLA 2011-01-31 14:31:47 EST
Created attachment 187998 [details]
patch

Here is a patch implementing the new action. 
Pascal, can you take a quick look and let me know what you think?
Thanks.
Comment 6 DJ Houghton CLA 2011-01-31 14:58:41 EST
Comment on attachment 187998 [details]
patch

SetProgramPropertyAction looks similar to my new SetSystemPropertyAction so I'm going to:
- remove the new class
- rename my add/remove to be consistent with the old one
Comment 7 DJ Houghton CLA 2011-01-31 15:40:16 EST
Created attachment 188004 [details]
patch

New patch with add/remove program property Eclipse touchpoint action.
Comment 8 John Arthorne CLA 2011-02-02 13:49:49 EST
Might as well update the doc right away before it's forgotten:

http://help.eclipse.org/helios/topic/org.eclipse.platform.doc.isv/guide/p2_actions_touchpoints.html
Comment 9 DJ Houghton CLA 2011-02-02 15:52:08 EST
Created attachment 188190 [details]
patch

Updated patch including ISV doc changes as well as renamed the action args from key/value to propName/propValue to match the other actions.
Comment 10 DJ Houghton CLA 2011-02-02 16:17:39 EST
Patch released to HEAD.
Comment 11 Stephan Herrmann CLA 2011-02-02 16:44:06 EST
Thanks to everybody!
I will adopt this as soon as it shows up in an I-build.