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.
Summary: | Create class dialog creates class in default package when using pasted fully qualified class name | ||
---|---|---|---|
Product: | ide | Reporter: | mclaborn <mclaborn> |
Component: | Code | Assignee: | issues@ide <issues> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.1 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
mclaborn
2015-11-08 00:20:17 UTC
The class is created in the package specified in the wizard - e.g. default package, since after the manipulation the Package field is empty. This behavior is IMHO correct. The user has full control of the package. Here is a more detailed example. 1. Right click on the package node 2. new -> Java class 3. Paste in name of com.mitchclaborn.gf.app.CustomerFunctions.Fred (Fred is an inner class) 4. The package name field below is disabled 5. Change name to com.mitchclaborn.gf.app.CustomerFunctionsFred (remove the last dot) 6. Package name field is still disabled 7. Change the name to CustomerFunctionsFred 8. The package field is blanked out and enabled Step 8 is where the problem is. This same behaviour is evident any time there is something that looks like a package name that is then removed. I understand the problem in handling this situation in the dialog. The only way I can think of to solve it would be to add a checkbox or similar that would "lock" the package field so that manipulations to the class name would not automatically affect the package input. This checkbox could be checked by default when the dialog is invoked from a right click on a package node. This seems like a lot of work for a very infrequent situation. I'll close this. |