Bug 190425 - The "config.ini" path in the .product file can be incorrect if choosen with the browse functionality
Summary: The "config.ini" path in the .product file can be incorrect if choosen with t...
Status: CLOSED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 normal with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: bugday
Depends on:
Blocks:
 
Reported: 2007-06-01 04:53 EDT by Stefan Lötscher CLA
Modified: 2019-06-02 19:27 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Lötscher CLA 2007-06-01 04:53:16 EDT
Build ID: I20070503-1400

Steps To Reproduce:
1. Create a feature "com.inventage.foo.feature" with the id="com.inventage.foo". Create a customized "config.ini" file on root level of the feature. Attention: feature id not equals project name.
2. Create a plugin "com.inventage.foo.plugin".
3. Create a "foo.product" file in the plugin.
4. Choose the option "Use an existing config.ini file", look for the config.ini file created in step one with the "browse..." button.
5. Set up an headless build and start it.
=> A default config.ini file will be created because, the path for the file in the foo.product file points to a path relative to the feature project name and not relative to the feature id.


More information:
The "config.ini" path in the .product file is incorrect in some cases. This causes the creation of a default config.ini during headless build. 

Assume the path points to a config.ini file in the feature project "com.inventage.foo.feature". 
-> <configIni use="custom" path="/com.inventage.foo.feature/rootfolder/configuration/config.ini"/> 
If the feature's project name differ from the features id e.g. "com.inventage.foo.feature" versus "com.inventage.foo" the config.ini path SHOULD point to a path relative to the feature id. 
-> <configIni use="custom" path="/com.inventage.foo/rootfolder/configuration/config.ini"/> 
Why? 

In the headless build the feature projects will be checked out in a folder "features" with the ID of the feature and not with the original project folder name. This is the reason why the config.ini file could not be found during headless build and a default one is generated. Additionally there is no possiblity to add the config.ini file as a normal root resource because the default one will overwrite the original one.
Comment 1 Brian Bauman CLA 2007-06-01 16:22:07 EDT
I see where the problem is.  Instead of simply putting the file's path relative to the workspace (including the project directory), if the file is in a PDE project, take the project relative path and prepend the feature's/plug-ins's id instead of the project's id.

I think we should be able to handle this post 3.3.
Comment 2 Sébastien Gandon CLA 2010-12-02 08:56:59 EST
How come this have never been fixed, it is still not working in Eclipse 3.6 !!!
Comment 3 Curtis Windatt CLA 2010-12-02 10:01:15 EST
(In reply to comment #2)
> How come this have never been fixed, it is still not working in Eclipse 3.6 !!!

There are only two active committers on PDE UI right now and we have items to work on.  If someone from the community would like to provide a patch, I would be happy to review it.
Comment 4 Sébastien Gandon CLA 2010-12-02 10:50:47 EST
I am not sure it is only a UI problem because even by editing the the .product file I cannot make the export use my config.ini file at all.
I just created an plugin with the RCP mail application, created a feature to include this plugin and the rcp feature and one product file to include this feature.
used the eclipse product export wizard and my custom config.ini is not taken into account at all.
Comment 5 Eclipse Genie CLA 2019-06-02 19:27:41 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.