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.
NetBeans IDE Dev (Build 200507181000) Steps to reproduce: - select project inside a Module Suite Project - right click "delete" The project will be deleted from the IDE and disk, but the suite's project.properties must be edited manually to remove the project name.
I *thought* the project was deleted, but it later re-appeared in the project list. Don't know why the zombie was revived.
So how did you actaully delete a submodule from a suite? You delete it from inside of IDE, i.e. from "Files" explorer? Since the Delete project action, callable from module's popup menu in Projects panel, is not supported yet. Or did you delete the submodule in an OS's file explorer and than go back to the IDE. Anyway currently supported scenario is to go to a suite's properties --> Libraries panel -> Remove submodule from modules list.
I selected the project node under the suite node in the IDE's Projects panel. Sorry to bother you with this if it's not supported yet; Where would I find a list of what is supported and what is not?
I see. Sorry, I forgot that there is no logical view for suite project type (will be). Anyway for me it throws exception. All such cases must be handled until 4.2.
I tried to remove a new module with your "suite's properties --> Libraries panel -> Remove submodule from modules list." and it did indeed remove the project name from the project.properties, but it also removed the colons that separated the module names, which made further work impossible until I manually restored the colons: modules=\ ${project.chimera}\ ${project.branding}\ ... It should be: modules=\ ${project.chimera}:\ ${project.branding}:\
SuiteUtils.removeSubModule seems to have some problems. 1. As rrochat found, projectProps.setProperty(MODULES_PROPERTY, (String[]) pieces.toArray(newPieces)); is not correct because it needs to append ':' to all but the last piece. 2. This: if (module.matches(ANT_PROPERTY_REGEXP)) { String key = module.substring(2, module.length() - 1); String value = projectProps.getProperty(key); is not correct. What about modules=${moddir}/one:${moddir}/two which is a valid module list? And you should not use projectProps and privateProps in this way. (Consider that ${moddir} could be defined in either one, even with the above line in project.properties!) Use the PropertyEvaluator from the SuiteProject properly: with evaluate(String text), which will also handle the case that there are no property substs. 3. new File(module) is not correct. Use AntPropertyHelper.resolveFile(module) instead, so the basedir is set correctly. I think all three problems should be unit-testable.
Actually the first (and main) problem was fixed and tested (issue 63307). I'll write tests for 2) and 3) and probably clean and rewrite SuiteUtils to non-static methods (and may be rename it). Current code is not easily managed. I didn't know everything I should when I wrote it first time.
Fixed, test, enhanced :) Thanks for tips. Checking in ui/customizer/SuiteUtils.java; 1.6 --> 1.7 Checking in ui/customizer/SuiteProperties.java; 1.10 --> 1.11 Checking in test/project/ui/customizer/SuitePropertiesTest.java; 1.9 --> 1.10
verified