Bug 141887 - Make PlatformConfiguration work against non running instance
Summary: Make PlatformConfiguration work against non running instance
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Platform-Update-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-15 16:48 EDT by Pascal Rapicault CLA
Modified: 2007-11-13 10:25 EST (History)
10 users (show)

See Also:


Attachments
Archive containing files modified to solve the mentionned problem (50.60 KB, application/octet-stream)
2006-05-15 16:53 EDT, Pascal Rapicault CLA
no flags Details
Patch to use absolute paths for site url in platform.xml (1.27 KB, patch)
2006-07-26 16:44 EDT, Nalini Ganapati CLA
no flags Details | Diff
patch (36.77 KB, patch)
2006-08-16 15:21 EDT, DJ Houghton CLA
no flags Details | Diff
Smaller patch created by removing code changes that were not relevant to the fix. (17.23 KB, patch)
2006-08-24 17:48 EDT, Nalini Ganapati CLA
no flags Details | Diff
ConfigurationActivator without most start/stop processing (16.60 KB, patch)
2007-06-25 20:20 EDT, Henrich Kraemer CLA
no flags Details | Diff
Updated patch against HEAD (3.4) (18.46 KB, patch)
2007-10-26 16:36 EDT, Pierre Carlson CLA
no flags Details | Diff
Updated patch against HEAD (3.4) - with API changes (23.04 KB, patch)
2007-11-07 09:54 EST, Pierre Carlson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2006-05-15 16:48:30 EDT
The PlatformConfiguration APIs only supports the modification of the currently running eclipse. This is a pretty annoying limitation when trying to configure other installations.

I will attach some code that allow to remove this limitation.
Comment 1 Pascal Rapicault CLA 2006-05-15 16:53:14 EDT
Created attachment 41511 [details]
Archive containing files modified to solve the mentionned problem

The base used for this code is what went in eclipse 3.2. The core of the modification is done in the following classes:
Configuration
configurationParser
FeatureEntry
PlatformConfiguration
PlatformConfigurationFactory
SiteEntry

The other modifications are mostly caused by package change and import reorg.
Comment 2 Nalini Ganapati CLA 2006-07-26 16:44:50 EDT
Created attachment 46844 [details]
Patch to use absolute paths for site url in platform.xml

Absolute URLs are needed for the URL attribute in platform.xml to configure other eclipse installations that have their features/plugins in a location different from the configuration.
Comment 3 DJ Houghton CLA 2006-08-16 15:21:24 EDT
Created attachment 48048 [details]
patch

Here is a patch based on the current state of the 3.2 maintenance branch. It combines code changes from both of the above attachments.
Comment 4 Nalini Ganapati CLA 2006-08-24 17:48:30 EDT
Created attachment 48651 [details]
Smaller patch created by removing code changes that were not relevant to the fix.

Created a smaller patch for org.eclipse.update.configurator containing Pascal's changes minus his reorg changes and one other change by me required to get relative site URLs configured correctly from other eclipse instances.
Comment 5 Eugene Kuleshov CLA 2006-08-24 17:57:40 EDT
Can somebody package this as a patch plugin fragment for update manager? Thanks.
Comment 6 Jeff McAffer CLA 2006-09-07 13:29:01 EDT
it doesn't seem that this is needed in 3.2.1.  Is someone desperate for it?  
Comment 7 Nalini Ganapati CLA 2006-09-07 13:49:21 EDT
Our product is going to be based on 3.2.1 and we desperately need it. We have been facing numerous problems related to the PlatformConfiguration getting wrong paths when trying to resolve relative site URLs from platform.xml and this patch will solve that for us. I had been in touch with DJ regarding getting the patch into 3.2.1.
Comment 8 Pascal Rapicault CLA 2006-09-14 16:03:43 EDT
As per Wassim request, I do (I mean I endorse).
Comment 9 DJ Houghton CLA 2006-09-20 16:36:47 EDT
See bug 156760 for the work-around released to 3.2.1.
Comment 10 Dejan Glozic CLA 2007-04-12 18:33:58 EDT
Unfortunately, this can no longer be cleanly applied against the current configurator. Over to the runtime team.
Comment 11 Henrich Kraemer CLA 2007-06-25 20:20:29 EDT
Created attachment 72433 [details]
ConfigurationActivator without most start/stop processing

We removed the code that reconciles the installed bundles from the activator as this does not make sense in a copy of this code. Also removed some stop processing.
Comment 12 Chris Aniszczyk CLA 2007-08-30 15:16:36 EDT
Henrich, do you have a clean patch against HEAD currently for this?
Comment 13 Brian Bauman CLA 2007-09-06 12:17:52 EDT
It would be absolutely amazing if this could be fixed some time in 3.4.  Pretty please! :)
Comment 14 Chris Aniszczyk CLA 2007-09-06 12:47:04 EDT
Hey Update guys, how about doing one for the "good old times" :)
Comment 15 Dejan Glozic CLA 2007-09-06 13:47:03 EDT
I am waiting for the dust to settle and a working patch to emerge. I am unclear if the new patch applies against the code in HEAD.
Comment 16 Brian Bauman CLA 2007-10-03 16:23:42 EDT
Any update on this bug?  

If this were fixed it would prove to be immensely helpful to many developers currently developing with PDE.  PDE works well in for self hosting, but it starts falling apart when someone tries to work on a target platform that contains a platform.xml.  This could solve an age old problem for many developers.
Comment 17 Dejan Glozic CLA 2007-10-19 13:13:40 EDT
I am going to repeat my question from the comment 15: is the last patch good to go and applies cleanly to the HEAD stream? We have no cycles to really test it, so be careful what you ask for :-). I can only yank it if it starts causing regressions.
Comment 18 Henrich Kraemer CLA 2007-10-19 15:20:18 EDT
The patch I added in comment 11 does not apply to HEAD. It is not ready for picking up.
Comment 19 Pierre Carlson CLA 2007-10-26 16:36:37 EDT
Created attachment 81298 [details]
Updated patch against HEAD (3.4)

Integrated the existing patch with the current HEAD stream.
Comment 20 Pierre Carlson CLA 2007-10-26 16:45:15 EDT
I have integrated the changes supplied in Attachment #48651 [details] with the latest code in HEAD.  I did not add the new constructor PlatformConfiguration(URL url, URL installLocation) to the PlatformConfigurationFactory since this would introduce new API.

The problem is that update still assumes the configuration directory is relative to the installation directory.  In my usage, this is not the case.  

Not sure how to solve that without enhancing the API or using another system property to override the install location.
Comment 21 Chris Aniszczyk CLA 2007-10-26 17:22:18 EDT
Pierre, nothing wrong with new API in the 3.4 timeframe.

Dejan, Update is calling you.
Comment 22 Dejan Glozic CLA 2007-10-29 11:05:58 EDT
(In reply to comment #21)
> Pierre, nothing wrong with new API in the 3.4 timeframe.
> Dejan, Update is calling you.

Chris, according to comment #20, the new API has not been added. Are you still sure you want me to release the latest patch or you want me to wait until the API has been added?
Comment 23 Pierre Carlson CLA 2007-11-07 09:54:00 EST
Created attachment 82332 [details]
Updated patch against HEAD (3.4) - with API changes

Patch for changes against HEAD.  Includes the API changes.
Comment 24 Dejan Glozic CLA 2007-11-13 10:25:12 EST
Released into HEAD.