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 70911

Summary: Generated wizard's visual panels are unusable by default
Product: apisupport Reporter: Tomas Danek <musilt2>
Component: TemplatesAssignee: Jesse Glick <jglick>
Status: VERIFIED FIXED    
Severity: blocker CC: issues, mkrauskopf
Priority: P2 Keywords: SIMPLEFIX
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Tomas Danek 2006-01-02 15:41:58 UTC
20060101 5.0

1) create new standalone module
2) create new static custom wizard with 1 panel
3) add some swing component (e.g. radiobutton) to JPanel in
$(prefix)VisualPanel1 design editor
4) switch to source editor in $(prefix)VisualPanel1, unfold "Generated code"
5) you see red underlined line: 

org.openide.awt.Mnemonics.setLocalizedText(jRadioButton1, "jRadioButton1");

caused by:
- missing dependency on UI UTILITIES API
or by:
- default selection of "Generate mnemonics code" property in
$(prefix)VisualPanel1 form properties.
Comment 1 Tomas Danek 2006-01-02 15:46:00 UTC
I'd prefer unselecting "Generate mnemonics code" by default, while New JFrame
wizard creates form with this property unselected.
Comment 2 Jesse Glick 2006-01-02 20:03:38 UTC
Best IMHO would be if the form editor used ProjectClassPathExtender to request
availability of this class when it was actually used. But it seems it does not
do this. So for now I guess we must simply add a dep on org.openide.awt to the
deps of any NBM project to which you add a form-based template.

Unselecting "Generate mnemonics code" by default does not make sense. We have
the Mnemonics class in the NB Platform and we should use it. The situation is
different than for form templates used in unknown projects.
Comment 3 Jesse Glick 2006-01-02 20:14:50 UTC
Been working since NewProjectIterator.java 1.3 (2005/08/18) for the case of the
New Project wizard, since that comes with mnemonics already defined.
Comment 4 Jesse Glick 2006-01-02 20:25:27 UTC
Martin could you review?

Checking in winsys/NewTCIterator.java;
/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/NewTCIterator.java,v
 <--  NewTCIterator.java
new revision: 1.9; previous revision: 1.8
done
Checking in wizard/DataModel.java;
/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/wizard/DataModel.java,v
 <--  DataModel.java
new revision: 1.5; previous revision: 1.4
done
Comment 5 Martin Krauskopf 2006-01-02 23:00:32 UTC
Sure, works - reviewed.
Comment 6 Tomas Pavek 2006-01-03 13:46:34 UTC
I've also filed issue 70944 on form...
Comment 7 Tomas Danek 2006-01-04 13:29:02 UTC
works fine in trunk, waiting for backport to 5.0
Comment 8 Jesse Glick 2006-01-04 22:32:51 UTC
Merged:

Checking in
apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/NewTCIterator.java;
/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/NewTCIterator.java,v
 <--  NewTCIterator.java
new revision: 1.8.4.1; previous revision: 1.8
done
Checking in
apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/wizard/DataModel.java;
/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/wizard/DataModel.java,v
 <--  DataModel.java
new revision: 1.4.2.1; previous revision: 1.4
done
Comment 9 Tomas Danek 2006-01-06 12:34:52 UTC
verified also in 5.0