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 200381 - Variable declaration code and generics in Code Customizer
Summary: Variable declaration code and generics in Code Customizer
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: issues@guibuilder
: 230460 (view as bug list)
Depends on:
Reported: 2011-07-26 08:58 UTC by choces
Modified: 2013-06-18 17:41 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description choces 2011-07-26 08:58:13 UTC
Current variable declaration code inside Code Customizer, does not allow for editing, so new Java 7 Swing features, involving the use of generics for JList and JComboBox, cannot be properly set-up.

The following can be declared in the initialization code, as custom creation:
jComboBoxSelections = new javax.swing.JComboBox<>();

but inside the variable declaration code, we have:
private javax.swing.JComboBox jComboBoxSelections;
which is non editable.

This leads to some sort of inconsistent code, where the component gets initialized by its own generics definition, while its own variable does not.

I suggest to make possible the editing of such a variables section, same as the custom creation.
Comment 1 Jan Stola 2011-07-26 09:38:56 UTC
In fact, it is possible already to specify type parameters for a variable declared for a component/bean. It is just not possible to do it using Code Customizer.

Select the component/bean.
Switch to Code section in Properties window.
Modify 'Type Parameters' property.
Comment 2 Tomas Pavek 2013-06-18 17:41:32 UTC
*** Bug 230460 has been marked as a duplicate of this bug. ***