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 171161 - New class wizard issue
Summary: New class wizard issue
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.3.1
Hardware: All All
: P3 blocker with 3 votes (vote)
Assignee: Alexander Simon
URL:
Keywords: USABILITY
: 179332 232396 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-31 12:09 UTC by nnnnnk
Modified: 2013-12-24 14:39 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nnnnnk 2009-08-31 12:09:45 UTC
1. Created file name
I can not change file name (source or header) for new class.

2. Location of created files
I'd like to see newclass.cpp in "Source files" and newclass.h in "Header files" folder
(especially if i create class from project item menu).
Comment 1 Thomas Preisler 2009-09-09 02:14:05 UTC
1) Not sure what you mean. You can choose a name when you create the class, and you can rename the two files individually afterwards. Do you expect 
something else? Perhaps refactoring?
2) You can control the physical file location of the each of the two files created. They will both be created in the logical folder the action is initiated fro like 
any other new file. Doing what you suggest is not really possible. Header Files and Source Files are logical folders and the user can apply any meaning to them 
as he wishes and they could have been renamed or even deleted. Alternatively, the wizard could be extended to also include logical folders but then it 
becomes a very complicated wizard. Isn't easier just to drag&drop the header file into the folder you like?
Comment 2 nnnnnk 2009-10-16 11:48:08 UTC
1. Usually class names contains capital letters but file names for them don't.
So you will have to rename files each time.

2. We could create files in "Header Files" and "Source Files" only in case of existence of this folders.
I don't think that we should create a complicated wizard, I'd like to cover the simplest use case. 
Comment 3 Thomas Preisler 2009-10-22 23:56:52 UTC
OK, so you suggest we enhance the wizard with something like:

[x] Put xxx.cc in Sources and xxx.h in Headers after creation

and have it enabled by default if both Source and Headers exist and have it disable if they don't. 

Will change to enhancement....
Comment 4 Vladimir Voskresensky 2010-01-09 02:29:19 UTC
*** Bug 179332 has been marked as a duplicate of this bug. ***
Comment 5 mvillella 2012-12-19 13:14:55 UTC
Since a new project is created with "Source Files" and "Header Files" logical folders, it would be only natural to put those files in those places.
It is very annoying to use the class creation wizard and have both created files end up NOT in those logical folders.
It would be cleaner if you just didn't create those logical folders when the project is created until this feature is implemented.
Comment 6 Alexander Simon 2013-07-10 09:15:09 UTC
*** Bug 232396 has been marked as a duplicate of this bug. ***
Comment 7 netrick 2013-07-11 07:32:26 UTC
Any chance for this being fixed in 7.4? I think it's not that big a change and it's been 4 years, it would amazing to have such a feature :)
Comment 8 Alexander Simon 2013-12-24 14:39:42 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/cb61aca940d0