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.
Friend API for creating run configuration property files for j2seproject is needed. It will be used from other modules to create property files for shared config and private config. I propose following class: package org.netbeans.modules.java.j2seproject.api; public final class J2SEProjectConfigurations { /** * Creates property files under nbproject/configs and * nbproject/private/configs under the given j2seproject project. * Properties to be written are passed as sharedProps and privateProps. */ public static void createConfigurationFiles(Project prj, String configName, Properties sharedProps, Properties privateProps) {}
Created attachment 37830 [details] patch file
I've attached diff file with implementation. The friend API will be used from javawebstart module. Please review. Thanks.
If there are no objections I will integrate tomorrow.
I've just checked the diff. I see no test. Imho a test is a must for a sustainable API, I'd like to suggest you to write one. Except this testing thing, the commit is imho acceptable.
FileObject jwsConfigFO = FileUtil.createData(prjDir, cfgFilePath); if (jwsConfigFO != null) { I don't think FU.cD is allowed to return null. I assume sharedProps is permitted to contain also special keys such as $label or $target.<<ACTION>>?
jtulach: I will provide a test. jglick: Re. "I don't think FU.cD is allowed to return null." - You are right, javadoc doesn't mention null as possible return value. Re. "I assume sharedProps is permitted to contain also special keys such as $label or $target.<<ACTION>>?" - I think that there is no such limitation on Properties. Do you mean to mention it in javadoc?
For special keys in sharedProps - of course j.u.Properties does not care. I meant that this API should document that these keys are permitted, even though they have special meanings (are not intended to be evaluated as regular Ant properties).
Done. RCS file: /cvs/java/j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/api/J2SEProjectConfigurationsTest.java,v done Checking in test/unit/src/org/netbeans/modules/java/j2seproject/api/J2SEProjectConfigurationsTest.java; /cvs/java/j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/api/J2SEProjectConfigurationsTest.java,v <-- J2SEProjectConfigurationsTest.java initial revision: 1.1 done RCS file: /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/api/J2SEProjectConfigurations.java,v done Checking in src/org/netbeans/modules/java/j2seproject/api/J2SEProjectConfigurations.java; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/api/J2SEProjectConfigurations.java,v <-- J2SEProjectConfigurations.java initial revision: 1.1 done