This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 50409 - free-form: Project Properties clobbers customization of project.xml
Summary: free-form: Project Properties clobbers customization of project.xml
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Freeform (show other bugs)
Version: 4.x
Hardware: All All
: P4 blocker with 1 vote (vote)
Assignee: Tomas Stupka
URL:
Keywords:
: 51867 53390 73590 117340 (view as bug list)
Depends on:
Blocks: 42682
  Show dependency tree
 
Reported: 2004-10-14 10:35 UTC by klosels
Modified: 2016-07-07 08:39 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description klosels 2004-10-14 10:35:52 UTC
Using NB4 daily build 20041012 (same in NB4 beta 2).

I customized project.xml to my liking for tree
display of source folders in project view as follows:

<view>
  <items>
    <source-folder style="tree">
      <label>Java Sources</label>
      <location>${project.dir}/src/java</location>
    </source-folder>

Note the style="tree"!
When I open the project properties dialog and
simply close it again by clicking ok, a new
source-folder element is _added_ with
style="packages" instead of "tree", the original
one is kept. So I end up with duplicate display of
this folder, once as tree, once as packages.
Comment 1 David Konecny 2004-10-14 10:59:25 UTC
Known issue. Once you start advanced customization of project.xml by
hand you should not use Project Properties customizer because its
abilities are very limited in this respect and as you can see it can
clobber some of your customizations.
Comment 2 klosels 2004-10-14 14:25:07 UTC
NB should at some stage at least give a hint about this fact then -
otherwise users who have just accepted that they have to customize
project.xml manually are being put off once more, especially when
their customization gets lost this way (which I must expect given your
comment)!

IMO minimal solution for 4.0 would be a comment in the project.xml
template generated by NB: "don't use project properties customizer
when editing this file manually" or similar.
Comment 3 Jesse Glick 2004-10-14 18:32:33 UTC
I agree that the project.xml should at least warn you about GUI
customization.

The preferable state would be that each panel of the GUI customizer
would, when opened, check the existing state of the project.xml and
determine if it is in a form that it could have produced itself. If
not, the user must have made text edits, so disable that panel (or
just the whole customizer, perhaps).
Comment 4 David Konecny 2004-10-15 15:22:53 UTC
I can easily write text "Do not use Project Properties customizer when
editting this file manually." just at the beginning of <general-data>
section. OK? Putting it at the beginning of the file would be more
complicated.
Comment 5 Jesse Glick 2004-10-15 19:51:54 UTC
Sounds good enough for now.
Comment 6 David Konecny 2004-10-19 16:50:15 UTC
Nonlocalizable message was added:
src/org/netbeans/modules/ant/freeform/FreeformProjectGenerator.java;
new revision: 1.31; previous revision: 1.30
Comment 7 Jesse Glick 2004-10-19 18:17:45 UTC
Should be localizable (taken from a bundle), IMHO.
Comment 8 David Konecny 2004-10-20 10:51:09 UTC
OK, changed.
Comment 9 David Konecny 2004-11-26 10:53:19 UTC
*** Issue 51867 has been marked as a duplicate of this issue. ***
Comment 10 David Konecny 2005-01-24 13:43:31 UTC
Jesse, I'm moving project infrastructure  base freeform issues to you.
Comment 11 Jesse Glick 2005-05-06 19:15:19 UTC
*** Issue 53390 has been marked as a duplicate of this issue. ***
Comment 12 Jesse Glick 2005-05-06 19:17:51 UTC
I think this can be considered a defect. It is permissible for a GUI properties
dialog to be unable to display a complete GUI for every possible project.xml
configuration. It is not permissible for it to quietly break things that were
set up correctly in project.xml via manual editing, even with the warning in
project.xml. It may refuse to display a panel, or grey it all out, or show a
warning dialog. It could refuse to open the entire properties dialog, or try to
permit edits to unrelated parts of project.xml.
Comment 13 Jan Lahoda 2005-10-26 15:33:17 UTC
I will try to do something for this for 5.0, but not sure if I will have enough
time.
Comment 14 Jan Lahoda 2006-03-15 10:08:33 UTC
*** Issue 73590 has been marked as a duplicate of this issue. ***
Comment 15 Milan Kubec 2007-01-04 09:15:50 UTC
Will try to come up with something for 6.0.
Comment 16 rcauble 2007-07-18 22:06:59 UTC
This is particularly problematic for us since we are using a project template that lays down a pre-configured freeform
ant project. From the standpoint of the end-user, they have never performed any customization on the project.xml and 
yet they cannot use the "Project Properties" without causing problems.

I'm not sure what your schedule is like for 6.0 or whether this is going to make it. At the very least though, it would 
help us out immensly if you simply added support for a "disableProjectProperties" flag to project.xml that could turn 
off the Project Properties completely. 

In our pre-configured project.xml, we could set the disableProjectProperties flag. That would actually be preferable 
from our standpoint because things like build classpath are actually controlled by another build.properties file that 
is referenced from both the project.xml and from our build script, so the user should never be using the Project 
Properties action to do anything. For example we have:

<properties>
   <property-file>build-config.properties</property-file>
</properties>
...
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
            <compilation-unit>
                <package-root>src</package-root>
                <classpath mode="compile">${CLASSPATH}</classpath> //CLASSPATH is defined in build-config.properties
                <source-level>1.4</source-level>
            </compilation-unit>
        </java-data>

Comment 17 Jesse Glick 2007-07-18 22:24:02 UTC
No format changes should be made for 6.0.

rcauble: if you wish to use freeform projects in this way, that's up to you, but the module is not designed for such
usage, so do not expect any way of disabling the Properties action/dialog to be added. The proper approach is a custom
project type. (Which might, as an implementation detail, somehow delegate to the o.n.m.ant.freeform module for much of
its behavior.)
Comment 18 Jesse Glick 2007-10-01 16:42:57 UTC
*** Issue 117340 has been marked as a duplicate of this issue. ***
Comment 19 Antonin Nebuzelsky 2010-01-11 04:28:34 UTC
Changing the default component owner to tzezula.
Comment 20 Tomas Danek 2012-10-26 09:11:18 UTC
I guess there are no plans to fix this in near future.
Comment 21 Tomas Zezula 2012-10-26 09:21:33 UTC
In fact there are no plans to fix it as freeform project is no more developed.
The project.xml at least contains message <!-- Do not use Project Properties customizer when editing this file manually. --> warning about the problem.
I agree with Jesse that the Project Customizer should not open or allow editing when it contains custom values.
Comment 22 Martin Balin 2016-07-07 08:39:12 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss