Bug 537124 - Properties in Product Editor not taken into config.ini
Summary: Properties in Product Editor not taken into config.ini
Status: NEW
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.8   Edit
Hardware: PC Windows 10
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2018-07-18 02:03 EDT by Julian Hemm CLA
Modified: 2022-08-28 08:58 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Hemm CLA 2018-07-18 02:03:50 EDT
Adding Properties in the "Configuration" Section of the product editor does not lead to changed values in the generated config.ini file.

Open a .product file
Go to "Configuration" Tab
In the "Properties" section, add e.g. name: org.eclipse.update.reconcile ; value: true
Save and run the product using "Launch an eclipse application"
Open the config.ini file located in the location: %WORKSPACE_HOME%\.metadata\.plugins\org.eclipse.pde.core\%PRODUCT_NAME%\config.ini

Expected: property is org.eclipse.update.reconcile available
Actual: property is missing.

The config.ini is generated again, when using "Launch an eclipse application".

Building the product using maven tycho causes the property to be available in config.ini as expected.


This particular property is needed to avoid the error described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=192623 or https://bugs.eclipse.org/bugs/show_bug.cgi?id=463117 which occured for us when updating from 4.7 to 4.8
Comment 1 Rob Sigel CLA 2018-09-14 20:43:22 EDT
My team is seeing this error in both Linux and Windows using 4.7.3 (Oxygen.3).

Note that this affects anyone trying to Run/Debug an RCP application/product directly within Eclipse.

This flaw breaks the automated generation of a Run/Debug configuration from the hyperlinks "Launch an Eclipse Application [in Debug mode]" on the Overview page in the product editor.

Additionally, any existing Run/Debug configuration is no longer trusted to use the configuration as defined by the product.  The run/debug configuration no longer stays in sync as the properties used to generate the config.ini (in the product editor) change over time.  Some teams may change these properties frequently during debugging sessions.

At a minimum, I SUGGEST THIS REQUIRES A RELEASE NOTE, especially in any migration-from-3.x guides.

This is especially annoying since bug#333729 implies that the only other choice allowed in the product configuration editor ("Use an existing config.ini file") may also be broken in the PDE build?

================================================
Workaround for running/debugging within Eclipse while keeping the config.ini definition within the *.product file:
================================================
Perform a maven/tycho build (Tycho must be at least version 1.1.0 for a POM-less product, see bug#482487 and [1]) using the existing product configuration, which correctly generates the config.ini based upon the info within the *.product file.

If necessary, extract that generated config.ini from the tycho product build and place the generated config.ini in a known location.
(You might want to add this extract/copy work as new optional automated steps in your tycho build.)

In Eclipse, generate a new run/debug configuration for the product (from the product editor's overview page if necessary).
Edit the new run/debug configuration: on the Configuration tab, under "Configuration File", change the setting to "Use an existing config.ini file as a template", then set the location to point at the config.ini generated by maven/tycho in the prior step.

This should allow you to keep your config.ini definition within the product. The Maven/Tycho build will still use the product file to generate the config.ini file appropriately.  The Eclipse run/debug configuration will (now) use the existing config.ini (from the properly-working Maven/Tycho build).  You'll "only" need to remember to always perform a build using Maven/Tycho whenever you change your *.product file configuration.

[1] https://wiki.eclipse.org/Tycho/eclipse-repository
Comment 2 Rob Sigel CLA 2018-09-17 13:11:59 EDT
This appears to be closely related to Bug#387811.
Comment 3 Eclipse Genie CLA 2022-08-28 08:58:59 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.