Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 42318 - Build properties editor should not be default
Summary: Build properties editor should not be default
Status: RESOLVED DUPLICATE of bug 37661
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-31 21:40 EDT by David Valentine CLA
Modified: 2004-02-25 22:27 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Valentine CLA 2003-08-31 21:40:56 EDT
I don't believe that the present PDE build properties editor should be the default editor for 
build.properties files.

build.properties files are used by many ant build scripts. Many of them include 
additional properties, which are not displayed in the build.properties editor.

Also comments are deleted by the present build.properties editor.
Comment 1 Andre Weinand CLA 2003-09-01 04:12:00 EDT
[Changed Platform to All since problem is not Mac specific] 
Comment 2 Dejan Glozic CLA 2003-09-02 09:30:11 EDT
If there are scripts that are using build.properties for 'sneaking in' keys 
that are not part of build.properties definition, they are doing so at their 
own risk. File 'build.properties' has a well defined syntax and a closed set of 
valid keys, all of which are supported by the current build.properties editor. 
In case of custom build scripts, 'build.properties' simply 
contains 'custom=true' and nothing else. You should not use the well defined 
file for other purposes and then claim that the supplied editor cannot handle 
them.
Comment 3 David Valentine CLA 2003-09-02 11:56:39 EDT
Are you saying that "build.properties" is an eclipse standard vocabulary for 
java projects?

I was viewing the editor for "build.properties" as a standard for 
PDE "build.properties" files.

In eclipse M3, the PDE bp editor is used for all "build.properties" files in 
java projects, and not just for PDE projects.

Comment 4 Dejan Glozic CLA 2003-09-02 12:02:40 EDT
build.properties is a standard Eclipse file used for controlling Ant builds of 
projects in the workspace. They are also used by Eclipse build team when 
building Eclipse from the build scripts.

If you are using another file called 'build.properties' for other purposes, 
then we have a name collision and I agree that Eclipse build.properties editor 
is in the way. You can solve the problem in several ways:

1) Use a different name for your non-Eclipse Java building
2) Change the file association in preferences for build.properties file name.
Comment 5 David Valentine CLA 2003-09-02 12:41:53 EDT
custom=true does keep the script from being clobbered by the bp editor.

I am using the build.xml ant script from apache tomcat 4, so the 
build.properties contains additional properties (and some comments).

When you click, "fragment uses a custom script", it removes all comments, and 
makes existing build properties file, a simple properties file. 

Perhaps checking custom, might just add "custom=true" as the first line of the 
file. 
Comment 6 Dejan Glozic CLA 2003-09-02 15:22:29 EDT
At the moment, all PDE editors rewrite the source file when the content is 
being changed through the UI pages. We are working on improving that.

However, your explanation does indicate that you are using the file for what 
it was not designed for. PDE editor was meant to offer you value-add by taking 
advantage of the known key set (and what those keys mean in the context of the 
project and the workspace). We cannot be responsible for not honouring keys 
that are not legal for this particular use.

If you still insist in adding these extra keys, we recommend changing the file 
association for build.properties. You can easily do that in the preferences 
under 'Workspace>File Associations'.
Comment 7 Wassim Melhem CLA 2004-02-25 22:27:46 EST
The valid portion of this defect (overwriting comments) will be addressed part 
of bug 37661

*** This bug has been marked as a duplicate of 37661 ***