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 63277 - Action wiz - better handling of null icon
Summary: Action wiz - better handling of null icon
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-29 23:24 UTC by Jesse Glick
Modified: 2005-11-25 10:20 UTC (History)
0 users

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 Jesse Glick 2005-08-29 23:24:20 UTC
If the user does not specify an icon for the action, it should generate

  putValue("noIconInMenu", Boolean.TRUE);

in the constructor (or, better, initialize() method).
Comment 1 Martin Krauskopf 2005-09-20 15:49:26 UTC
Probably better to get rid of inititialize comment at all in
callableSystemAction.javx and put it into the constructor to make it easiest to
understand for the user. If not, we should do the same for both action. Since
currently for callableSystemAction.javx we always generate:

//    protected void initialize() {
//        super.initialize();
//    }

Probably to show the user that something like this exists. However for
cookieAction.javx never. So should I:

1) keep initialize method (sometimes just comment) always generated (for both
types of actions)?
2) should I generate putValue into the constructor or initialize. Maybe the
former is less confusing.... not sure?

If there is not strong opinion I'll generate(conditionally) putValue into the
constructor and get rid of initialize method/comment at all.

Huh, little messy, but I hope understandable :)
Comment 2 Jesse Glick 2005-09-21 00:02:55 UTC
Prefer usage of overridden initialize() method (w/ call to super) to overt
constructor whenever using any SharedClassObject subclass. Ensures correct
behavior in case original instance is GC'd and a new instance is created later
(not sure if this can happen for SystemAction's, but just in case).
Comment 3 Martin Krauskopf 2005-09-22 09:51:14 UTC
Fixed.

Checking in ui/wizard/action/DataModel.java; 1.11 --> 1.12
Checking in ui/wizard/action/callableSystemAction.javx; 1.4 --> 1.5
Checking in ui/wizard/action/cookieAction.javx; 1.6 --> 1.7
Comment 4 pzajac 2005-11-25 10:20:29 UTC
verified