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 227877 - Patch for: "New Java Class"-wizard: allow FQN of class
Summary: Patch for: "New Java Class"-wizard: allow FQN of class
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords: PATCH_AVAILABLE
: 124059 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-24 21:53 UTC by markiewb
Modified: 2013-05-13 20:52 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Shows the expected state (252.43 KB, image/png)
2013-03-24 21:53 UTC, markiewb
Details
Proposed patch - draft (7.41 KB, patch)
2013-03-26 06:57 UTC, markiewb
Details | Diff
Proposed patch - simplified (6.61 KB, patch)
2013-03-26 21:24 UTC, markiewb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-03-24 21:53:24 UTC
Created attachment 133013 [details]
Shows the expected state

Please allow to type/paste a fully qualified name as class name in the "New Java Class"-wizard page. Currently you have to type the classname first then some gui widgets below you can choose/type the package name.
Comment 1 markiewb 2013-03-26 06:57:21 UTC
Created attachment 133064 [details]
Proposed patch - draft

@Netbeans-Devs: I like to propose the following patch to solve this RFE.

The patch allows the user to input a FQN as classname in the new class/enum/interface wizard page, which speeds up creating such types. The package name of the FQN will be placed also in the package name widget and the package name widget will be disabled, when a FQN is given. When the user reverts its FQN the packagename widget is also reset and the widget gets enabled.

The setting of the package name is a little bit difficult, because there is already an listener attached to the widget/to its document. So i had to "hack" this to work using isUpdating flag. 

Please review and help me to improve the quality of this patch.
Comment 2 markiewb 2013-03-26 21:24:35 UTC
Created attachment 133104 [details]
Proposed patch - simplified
Comment 3 markiewb 2013-03-26 21:25:45 UTC
(In reply to comment #1)
> The setting of the package name is a little bit difficult, because there is
> already an listener attached to the widget/to its document. So i had to "hack"
> this to work using isUpdating flag. 
> 

The new patch removes this hacky workaround.


Please review. Thank you.
Comment 4 markiewb 2013-04-22 18:09:04 UTC
@Tomas: Feel free to add a tooltip or a small label at the bottom of the textfield to make the feature more obvious.
Comment 5 Tomas Zezula 2013-04-23 17:25:03 UTC
Fixed jet-main 769ef8d4f64a
Comment 6 Quality Engineering 2013-04-28 02:19:09 UTC
Integrated into 'main-golden', will be available in build *201304272301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2395c40ca6b6
User: Tomas Zezula <tzezula@netbeans.org>
Log: #227877: New Java Class allow FQN of class
Comment 7 markiewb 2013-05-13 20:52:32 UTC
*** Bug 124059 has been marked as a duplicate of this bug. ***