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.
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.
Created attachment 36965 [details] patch file
patch looks good. the new contract should be noted in the javadoc and go through the fast api review before commiting.
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. Usage: <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="..."/> </file> </folder> ...
Attaching patch with the implementation and apichanges.
Created attachment 37096 [details] final patch file
Please review. Thanks.
Created attachment 37097 [details] missing part of the patch
<folder name="Customizer"> <folder name="Application"> <!-- ... --> </folder> <file name="Application.instance"> <attr name="instanceCreate" methodvalue="..."/> </file> </folder> would seem a bit more natural to me, but no strong opinion.
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.
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...
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)
I will keep the file under the folder and will not repeat the name of the folder, only "Self.instance".
Created attachment 37380 [details] final diff file
I have attached patch with the change. If there are no more comments I will integrate the patch tomorrow.
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.
Created attachment 37436 [details] test
I've attached diff file with the test.
Done. Checking in apichanges.xml; /cvs/projects/projectuiapi/apichanges.xml,v <-- apichanges.xml new revision: 1.29; previous revision: 1.28 done Checking in test/unit/src/org/netbeans/spi/project/ui/support/ProjectCustomizerTest.java; /cvs/projects/projectuiapi/test/unit/src/org/netbeans/spi/project/ui/support/ProjectCustomizerTest.java,v <-- ProjectCustomizerTest.java new revision: 1.5; previous revision: 1.4 done Checking in src/org/netbeans/spi/project/ui/support/ProjectCustomizer.java; /cvs/projects/projectuiapi/src/org/netbeans/spi/project/ui/support/ProjectCustomizer.java,v <-- ProjectCustomizer.java new revision: 1.11; previous revision: 1.10 done Checking in nbproject/project.properties; /cvs/projects/projectuiapi/nbproject/project.properties,v <-- project.properties new revision: 1.30; previous revision: 1.29 done