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

Bug 252426

Summary: Make specified config.ini's in product-based builds template
Product: [Eclipse Project] PDE Reporter: Chris Aniszczyk <caniszczyk>
Component: BuildAssignee: pde-build-inbox <pde-build-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: aniefer, curtis.windatt.public, daniel_megert, heinrich_soebke, jeffmcaffer
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Chris Aniszczyk CLA 2008-10-28 12:40:19 EDT
Currently, if you use a config.ini, PDE Build/UI will simply use that file as the config.ini in the final product. In launch configurations where you can specify a config.ini in PDE UI, we treat this file as a "template" where people can fill in values and we can fill in the rest.

I suggest we do something similar for PDE UI/Build and products.

What do you think Andrew?
Comment 1 Chris Aniszczyk CLA 2008-10-28 12:40:51 EDT
I would like to work on this in M4, it shouldn't be that complicated unless I'm missing something obvious in PDE Build.
Comment 2 Chris Aniszczyk CLA 2008-11-06 17:06:01 EST
The algorithm in PDE UI is stupid simple:

org.eclipse.pde.internal.ui.launcher.LaunchConfigurationHelper.createConfigIniFile(ILaunchConfiguration, String, Map, File)

It looks like we do a wholesale replace on everything (we have some special handling for osgi.bundles, but that only strips path information).

We also ensure that certain properties are always added if they aren't there:

org.eclipse.pde.internal.ui.launcher.LaunchConfigurationHelper.addRequiredProperties(Properties, String, Map)

osgi.install.area
osgi.configuration.cascaded
osgi.framework
osgi.bundles
osgi.splashPath
osgi.bundles.defaultStartLevel

I think we can do better, right? As our  main interest is in the osgi.bundles list as a template imho
Comment 3 Dani Megert CLA 2009-01-30 03:32:00 EST
Moving target as M4 has shipped.
Comment 4 Andrew Niefer CLA 2009-02-25 08:58:23 EST
Chris, I am hesitant to change the behaviour here, especially since start levels and properties can now be specified in the .product file itself and the properties there behave as templates.

Currently we use the provided config.ini as is, and if we switch it to being a template, we will loose whatever formatting and comments that may be in the provided file.  I think this is important for people building older (3.2, 3.3, etc) products.

If we want this, I would suggest a little checky box in the UI saying "template", which would result in something like
   <configIni use="default">
      <linux template="true">foo/config.ini</linux>
   </configIni>
Comment 5 Andrew Niefer CLA 2009-02-25 09:06:22 EST
(In reply to comment #2)
> As our  main interest is in the osgi.bundles list as a template imho

Also, this is a tricky one, I want build to be consistent between the start levels provided in the .product file and those found in a provided config.ini.

  Current behaviour from bug 266056, it is all or none for the start level info.  If we find any start levels at all, we use those in their entirety and generate none.   If we want these treated as templates to which build will add more default, I think we need another "template" check box for the start level info.
Comment 6 Andrew Niefer CLA 2009-03-06 16:23:31 EST
Removing target milestone.  Current behaviour uses properties specified in the .product file.
Comment 7 Lars Vogel CLA 2018-12-03 09:08:06 EST
Currently we are not actively enhancing PDE build anymore. Therefore, I close this bug as WONTFIX. 

Please reopen, if you plan to provide a fix.