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 237573

Summary: Improve "Type Parameters" selection for generic Swing elements
Product: guibuilder Reporter: bertqwert
Component: CodeAssignee: issues@guibuilder <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description bertqwert 2013-10-23 16:25:44 UTC
For generic Swing elements like JComboBox, you can enter the type parameters in the "Code" tab after selecting the element.

There are some issues here:

1. You donĀ“t know the format in which the type parameters have to be entered.
  I needed some time to find out (via web search) that you have to enter "<Integer>", whereas I expected it to accept "Integer".

2. Instead of a "free text" field, this feature should know about the required parameters and their structure (amount, restriction to be of special subtype etc.). The user should only be able to select correct parameters.

I think the availability of the "Type parameter" option implies an "intelligent" type parameter setter, instead of something only appending the entered text to the class name.

So the least necessary change would be to name the expected format in the description of the "Type Parameters" field, solving no. 1. Better, though, would be to make it safe in usage by implementing no. 2.

Thank you for considering this suggestion!
Comment 1 Tomas Pavek 2013-10-24 16:14:06 UTC
Agree. #1 should be easy to fix, e.g. by automatically adding the surrounding <> if not entered by the user. #2 is more work, trickier. Note also bug 228807.
Comment 2 Tomas Pavek 2013-10-24 17:35:13 UTC
#1 implemented as http://hg.netbeans.org/jet-main/rev/54ea8ca837c7