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 234828

Summary: Renaming a NetBeans Platform application project messes up project structure for modules
Product: apisupport Reporter: gailanderson
Component: ProjectAssignee: Martin Kozeny <mkozeny>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.3.1   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: The attached zip contains two projects MyApp1 (the starting app) and MyApp2 (after renaming MyApp1 to MyApp2 and changing the directory folder name).

Description gailanderson 2013-08-22 22:37:59 UTC
Created attachment 139095 [details]
The attached zip contains two projects MyApp1 (the starting app) and MyApp2 (after renaming MyApp1 to MyApp2 and changing the directory folder name).

The act of renaming the top-level NB platform application project messes up the structure of user-added modules. The application continues to build and run fine, but you can't add module dependencies because the system can't find the platform.

To reproduce, in the Projects View window select the top-level application project (with at least one added module), right click, select Rename ... from the context menu. Supply a new project name and click the option to also rename the folder (bug only appears if the folder is also renamed) and click OK.

After the rename, expand one of the application's modules, right click on Libraries and select Add Module Dependency ....

NetBeans tries to bring up the Add Module Dependency dialog and displays an error message "Previously set platform not found; switching to default."

After you click OK to dismiss the error message you then see a warning . . . 
"Unable to find suite in the "null" directory. Cannot get a list of available module dependencies for the suite component module "ModuleXXX" (where ModuleXXX is the module to which you're attempting to add a module dependency). The other side effect is that the module's display name is cleared.

It seems like I have successfully renamed projects before, so I'm thinking this is a regression. I've noticed this behavior in both 7.3 and 7.3.1. I don't know about older systems or 7.4Beta.

The attached zip contains two projects MyApp1 (the starting app) and MyApp2 (after renaming MyApp1 to MyApp2 and changing the directory folder name).