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 47527 - [40cat] Many Actions commonly required for toolbars are missing icons.
Summary: [40cat] Many Actions commonly required for toolbars are missing icons.
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: David Simonek
: 49119 (view as bug list)
Depends on:
Blocks: 35551
  Show dependency tree
Reported: 2004-08-20 09:44 UTC by ihepda
Modified: 2008-12-23 14:32 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

suggested patch (893 bytes, patch)
2004-10-05 13:31 UTC, Milos Kleint
Details | Diff
updated patch (755 bytes, patch)
2004-10-06 16:04 UTC, Milos Kleint
Details | Diff
Toolbar icons for commonly required actions. (19.58 KB, application/octet-stream)
2004-11-01 15:40 UTC, jrojcek

Note You need to log in before you can comment on or make changes to this bug.
Description ihepda 2004-08-20 09:44:05 UTC
[ BUILD # : 2004-08-17 ]
[ JDK VERSION : J2SE 1.5.0 ]

In a toolbar I've inserted the "Compile File" action but there isn't an icon.
Comment 1 psuk 2004-08-23 10:35:40 UTC
Comment 2 Marian Mirilovic 2004-08-23 13:41:09 UTC
This issue is more about actions and their icons... we have icons only
for actions located in toolbars by default, no other action has icon,
so I think this is WONTFIX ;(
Comment 3 Marian Mirilovic 2004-08-23 13:41:34 UTC
Comment 4 lleland 2004-08-25 07:46:52 UTC
I've reopened this item and reset the priority to P3 since I cannot
create the toolbars required by my development environment because
some of the required Actions are missing icons. I've had to cobble my
own icons to fill in.

This issue is indeed about Actions missing icons. Just because an
Action is not included by default in the standard NetBeans toolbars
does not mean that it won't be required in a toolbar by a User or

Many Actions that are commonly desired in toolbars are missing icons:
Save, Print, Open File, Compile File, and so on. Since it is never
known what toolbar configurations will be required in a specific
development environment, most if not all Actions must have icons so
that they can be included in menus and toolbars.

Fix this puppy. If resources are thin, ask the development community
to submit a complete list of icons, and choose and/or modify from that
Comment 5 Marian Mirilovic 2004-08-25 09:45:43 UTC
Jano, Dusan,

what HIE thinks about this ?
Comment 6 Jesse Glick 2004-09-28 17:25:21 UTC
*** Issue 49119 has been marked as a duplicate of this issue. ***
Comment 7 Jesse Glick 2004-09-28 17:29:20 UTC
IMHO this needs to be addressed urgently. Serious toolbar
customization has become effectively impossible in 4.0. If we don't
have suitable icons for some actions, we need to find some way to make
them visible in a reasonable way.
Comment 8 Milos Kleint 2004-10-05 13:31:28 UTC
Created attachment 18046 [details]
suggested patch
Comment 9 Milos Kleint 2004-10-05 13:34:45 UTC
the attached patch tries to address this issue in the following manner.
icons that should not appear in the menu with icon will get flagged
and for such items their icon is replaced with empty one when
constructing menu. However when used in toolbar or options dialog,
their icon remains is shown.
this patch introduces a new API, namely the property key that is used
to distinguish such actions.
Comment 10 Jesse Glick 2004-10-05 15:36:17 UTC
So you're volunteering? :-)

The patch could work. Strictly speaking we do not require an API
change to implement this, but it is much uglier without it.

Rather than

  if (obj != null) ...


  if (Boolean.TRUE.equals(obj)) ...

BTW in the future please use the -u option when generating diffs. Most
easily by adding to ~/.cvsrc:

diff -u
Comment 11 Milos Kleint 2004-10-06 09:29:55 UTC
ok, can I take your comments as an API review? :)
Comment 12 Jesse Glick 2004-10-06 16:01:40 UTC
It should still go thru apireviews fast-track as it is clearly an API
Comment 13 Milos Kleint 2004-10-06 16:04:57 UTC
Created attachment 18093 [details]
updated patch
Comment 14 Milos Kleint 2004-10-06 16:06:51 UTC
please review this API change. Additional property for actions, that
is used by to determine if the icon shall be used in the
main menu.
Comment 15 Jesse Glick 2004-10-06 16:13:02 UTC
Note that this should be considered a temporary fix at best. The real
problem is that the UI team laid out a principle - do not show menu
icons except where they match a toolbar button or window icon - but
then applied it literally to specific actions without giving any
consideration to the issue of customizability by the user (or, for
that matter, by other products which may well choose different initial
toolbar contents).

If this UI principle is truly important and should be used
consistently, then we should have infrastructure to enable an action
(not used for showing a window) to have the menu item actually check
if it is matched to any toolbar button and conditionally show an icon
or not at runtime. Then we should provide some sort of icons for
almost all actions, at least basic ones; or find some way to provide a
useful toolbar button for iconless actions. (We used to show the
action label in a button - was this broken at some point?)
Comment 16 Milos Kleint 2004-10-07 09:42:31 UTC
it's definitely a temporary fix. A long term solution would IMHO
require rewrite of how menu and toolbars are modelled.

One aspect of the fix I really don't like and it's a step back for
platform-based developers.
when an appliction using the platform has different needs (eg. to show
all icons in the menu) it's required to patch the affected Action
classes in openide/core. So far we're been removing necessity for
patching sourcecode in favour of declarative branding.
Comment 17 Jaroslav Tulach 2004-10-11 07:27:46 UTC
I am bit skeptic about calling things temporary. If it suficess our
needs, it will stick there forever. 

Request: Missing // NOI18N, test, and entry in arch-actions.xml, what
stability is it going to have (certainly not private)? Plus entry in
apichanges and increment of openide spec version.

Advice(p2): Should not the name be prefixed with "icon"? Notice that
there already is "iconBase", so this could be "iconInMenu" can could
be set to false?

Advice(p4): Add a protected method like this to SystemAction. You need
to modify bunch of actions to return this property anyway? Might be
easier to just overwrite the method.
Comment 18 Milos Kleint 2004-10-13 14:24:25 UTC
about to integrate
Comment 19 Milos Kleint 2004-10-14 07:49:07 UTC
test written, property renamed to "noIconInMenu".
Comment 20 Roman Strobl 2004-10-14 09:54:32 UTC
I do not know if you are aware of this - when you try to add into a
toolbar some of the actions like Window->Documents, the behaviour is
slightly different then the one with "Compile File". Compile File is
not clickable at all, but Documents are, they have a small square with
no description or icon.
Comment 21 Milos Kleint 2004-10-14 10:12:57 UTC
ahh, good that you bring this up. Some icons were removed icon because
the icon was old and it should not be in the menu with icon.
These cases are fixed now.

but there's a group of actions in the actions pool that don't have an
icon and never had and these still do not fit well into the toolbar.

reopening and reassigning to HIE.
Comment 22 jrojcek 2004-10-14 10:18:18 UTC
We will provide icons for requested actions:

Open File
Compile File
Test Project

and if we have time also for:

Run File
Debug File
Test File
Debug Test for File

There still will be some actions that don't have an icon, but I believe the user impact would 
be low.
Comment 23 Jesse Glick 2004-10-14 17:41:36 UTC
Good - I think the actions Jano listed most critically need toolbar
icons for D.

Now: actions with no icon at all (null) are *supposed* to have a
fallback "icon" based on their display name. There is logic in
SystemAction to do this. Apparently it is not getting called?
Generally, if no icon is specified, I think the best fallback is to
show a JButton with the action label rather than an icon. Not pretty,
but much better than an empty grey box.
Comment 24 dpavlica 2004-10-14 18:12:09 UTC
Maybe better then standard gray button is to use placeholder icons 
with name of action:

We suggested this icon in the following spec of the main ToolBar as a 
solution for showing old small icons of modules from the Update 

But we could reuse it for the case mentioned above too...
Comment 25 jrojcek 2004-11-01 15:40:25 UTC
Created attachment 18650 [details]
Toolbar icons for commonly required actions.
Comment 26 jrojcek 2004-11-01 15:44:04 UTC
The icons for commonly required actions are attached.

Reassigning to Dafe...
Comment 27 David Simonek 2004-11-01 16:24:59 UTC
Jano, sorry I'm confused, you told me that you will create separate
issue?? I don't know what I should do. Adding new icons in high
resistance is OK, but dynamically creating placeholder icons etc?
Isn't it too much when we are in high resistance? Please specify what
we want and what we don't want to fix for 4.0. Thx.
Comment 28 jrojcek 2004-11-01 16:35:06 UTC
I propose to fix this issue by integrating the attached icons and create a new issue that 
asks for a better way how to present actions that don't have an icon in main toolbar (there 
alwas will be such actions).
Comment 29 David Simonek 2004-11-01 16:40:14 UTC
OK, I'll do that.
Comment 30 David Simonek 2004-11-04 14:52:31 UTC
Icons added into main trunk:

new revision: 1.38; previous revision: 1.37

Removing utilities/src/org/netbeans/modules/openfile/openFile.gif;

new revision: delete; previous revision: 1.4

/cvs/utilities/src/org/netbeans/modules/openfile/openFile.png,v  <-- 

initial revision: 1.1

Checking in utilities/src/org/netbeans/modules/openfile/openFile24.png;
initial revision: 1.1

Removing utilities/src/org/netbeans/modules/openfile/openFile32.gif;


new revision: 1.17; previous revision: 1.16

new revision: 1.9; previous revision: 1.8

new revision: 1.6; previous revision: 1.5


 <--  compileSingle.png
initial revision: 1.1

Checking in
initial revision: 1.1


Checking in
initial revision: 1.1

Checking in
initial revision: 1.1

Checking in
initial revision: 1.1

Checking in
initial revision: 1.1


Checking in
initial revision: 1.1

Checking in
initial revision: 1.1


Checking in
initial revision: 1.1

Checking in
initial revision: 1.1


Checking in
initial revision: 1.1

Checking in
initial revision: 1.1

Checking in openide/src/org/openide/actions/;
new revision: 1.26; previous revision: 1.25

Checking in openide/src/org/openide/actions/;
new revision: 1.36; previous revision: 1.35

Removing openide/src/org/openide/resources/actions/print.gif;

Checking in openide/src/org/openide/resources/actions/print.png;
initial revision: 1.1

Checking in openide/src/org/openide/resources/actions/print24.png;
initial revision: 1.1

Removing openide/src/org/openide/resources/actions/save.gif;

Checking in openide/src/org/openide/resources/actions/save.png;
initial revision: 1.1

Checking in openide/src/org/openide/resources/actions/save24.png;
initial revision: 1.1
Comment 31 David Simonek 2004-11-04 15:02:06 UTC
Note that high-resistance fix is only adding new icons. Problems of
actions with null icon are now tracked in new issue 51163.
Comment 32 David Simonek 2004-11-04 18:11:14 UTC
Fix of the problem I created by my previous commit, caused by my
ignorance :-(
new revision: 1.10; previous revision: 1.9
Comment 33 David Simonek 2004-11-09 15:05:26 UTC
fix merged into release40 branch.
Comment 34 Zdenek Konecny 2005-07-08 11:57:05 UTC
I think in current NetBeans 4.2(Build 200507061800) the most of frequently used
actions have the icons.    
Comment 35 Quality Engineering 2008-12-23 14:32:52 UTC
This issue had *1 votes* before move to platform component