Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 91276 - Allow to have panel for category folder in prj customizer
Allow to have panel for category folder in prj customizer
Product: projects
Classification: Unclassified
Component: Generic Projects UI
All All
: P2 (vote)
: 6.x
Assigned To: Milan Kubec
Depends on:
  Show dependency treegraph
Reported: 2006-12-19 14:02 UTC by Milan Kubec
Modified: 2007-01-17 13:36 UTC (History)
2 users (show)

See Also:

patch file (5.06 KB, text/plain)
2007-01-02 09:55 UTC, Milan Kubec
final patch file (8.10 KB, text/plain)
2007-01-05 17:49 UTC, Milan Kubec
missing part of the patch (1.01 KB, text/plain)
2007-01-05 17:58 UTC, Milan Kubec
final diff file (8.66 KB, text/plain)
2007-01-15 15:43 UTC, Milan Kubec
test (4.54 KB, text/plain)
2007-01-17 11:05 UTC, Milan Kubec

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2006-12-19 14:02:02 UTC
Currently it's not possible to have customizer panel for category folder (e.g.
category folder Build in j2seproject cannot have customizer panel). Usecase for
such scenario is to have category folder that contains customization for
properties that are common (shared) for all its subnodes.

Consider following nodes in customizer pane:

 |- Web Service Clients
 |- Application
    |- Web Start
    |- GUI Shell

Application category would contain customizer for properties that are common for
Web Start and GUI Shell categories.

It could be done by file with special filename under the folder category in
layer file, the name of the file would be something like
{name_of_the_folder}.itself.instance and as such the file will be recognized as
special and its instance would not be used as folder sub node but rather for
folder itself.
Comment 1 Milan Kubec 2007-01-02 09:55:37 UTC
Created attachment 36965 [details]
patch file
Comment 2 Milos Kleint 2007-01-02 10:07:21 UTC
patch looks good. the new contract should be noted in the javadoc and go through
the fast api review before commiting.
Comment 3 Milan Kubec 2007-01-02 10:10:26 UTC
You are very fast ;-), this is what I wanted to append a minute ago:

I've attached possible solution. Milosi, please review. I will add API_REVIEW kw
after we agree on the solution.

<folder name="Projects">
    <folder name="org-netbeans-modules-java-j2seproject">
        <folder name="Customizer">
            <folder name="Application">
                <file name="Application.itself.instance">
                    <attr name="instanceCreate" methodvalue="..."/>
Comment 4 Milan Kubec 2007-01-05 17:48:54 UTC
Attaching patch with the implementation and apichanges.
Comment 5 Milan Kubec 2007-01-05 17:49:41 UTC
Created attachment 37096 [details]
final patch file
Comment 6 Milan Kubec 2007-01-05 17:50:53 UTC
Please review. Thanks.
Comment 7 Milan Kubec 2007-01-05 17:58:45 UTC
Created attachment 37097 [details]
missing part of the patch
Comment 8 Jesse Glick 2007-01-05 21:59:12 UTC
<folder name="Customizer">
  <folder name="Application">
    <!-- ... -->
  <file name="Application.instance">
    <attr name="instanceCreate" methodvalue="..."/>

would seem a bit more natural to me, but no strong opinion.
Comment 9 Milan Kubec 2007-01-12 09:54:33 UTC
I thought that having the file instance under the actual folder would better
implicate that that the panel is used for the folder. And the name was selected
with the ".itself" because I wanted to point out that the file is somehow special.
Comment 10 Tomas Pavek 2007-01-12 10:15:19 UTC
OTOH the other way puts the panel file on the right level (in your solution it 
appears one leve lower - same as the sub-panels). And you would not need the 
special "itself" tag. But I think either solution works...
Comment 11 Milos Kleint 2007-01-12 10:52:09 UTC
Not real preference as far as naming goes.
Either have the Application.instance at the same level as the folder, or have
Self.instance in the folder (I don't think it's necessary to repeat
"Application." if it's inside the folder, Self.instance or Folder.instance
should be self-explanatory)

Comment 12 Milan Kubec 2007-01-15 15:22:20 UTC
I will keep the file under the folder and will not repeat the name of the
folder, only "Self.instance".
Comment 13 Milan Kubec 2007-01-15 15:43:07 UTC
Created attachment 37380 [details]
final diff file
Comment 14 Milan Kubec 2007-01-15 15:44:28 UTC
I have attached patch with the change. If there are no more comments I will
integrate the patch tomorrow.
Comment 15 Jaroslav Tulach 2007-01-15 16:35:22 UTC
Y01 I am missing a test. Imho, just create a file structure on SFS, load the 
data and verify that the catogories/panels are correct.
Comment 16 Milan Kubec 2007-01-17 11:05:38 UTC
Created attachment 37436 [details]
Comment 17 Milan Kubec 2007-01-17 11:06:45 UTC
I've attached diff file with the test.
Comment 18 Milan Kubec 2007-01-17 13:36:01 UTC

Checking in apichanges.xml;
/cvs/projects/projectuiapi/apichanges.xml,v  <--  apichanges.xml
new revision: 1.29; previous revision: 1.28
Checking in
new revision: 1.5; previous revision: 1.4
Checking in src/org/netbeans/spi/project/ui/support/;
new revision: 1.11; previous revision: 1.10
Checking in nbproject/;
/cvs/projects/projectuiapi/nbproject/,v  <--
new revision: 1.30; previous revision: 1.29

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo