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.
[ 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.
subcat->project
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 ;(
x
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 Developer. 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 pool.
Jano, Dusan, what HIE thinks about this ?
*** Issue 49119 has been marked as a duplicate of this issue. ***
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.
Created attachment 18046 [details] suggested patch
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.
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) ... suggest 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
ok, can I take your comments as an API review? :)
It should still go thru apireviews fast-track as it is clearly an API change.
Created attachment 18093 [details] updated patch
please review this API change. Additional property for actions, that is used by Actions.java to determine if the icon shall be used in the main menu.
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?)
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.
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.
about to integrate
integrated. test written, property renamed to "noIconInMenu".
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.
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.
We will provide icons for requested actions: Save Print 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.
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.
Maybe better then standard gray button is to use placeholder icons with name of action: http://ui.netbeans.org/docs/ui/toolbar/images/placeholder-clear.png 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 center: http://ui.netbeans.org/docs/ui/toolbar/#additional But we could reuse it for the case mentioned above too...
Created attachment 18650 [details] Toolbar icons for commonly required actions.
The icons for commonly required actions are attached. Reassigning to Dafe...
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.
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).
OK, I'll do that.
Icons added into main trunk: /cvs/utilities/src/org/netbeans/modules/openfile/OpenFileAction.java,v <-- OpenFileAction.java 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 <-- openFile.png 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; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/Actions.java,v <-- Actions.java new revision: 1.17; previous revision: 1.16 /cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/FileCommandAction.java,v <-- FileCommandAction.java new revision: 1.9; previous revision: 1.8 /cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/ProjectAction.java,v <-- ProjectAction.java new revision: 1.6; previous revision: 1.5 Removing projects/projectui/src/org/netbeans/modules/project/ui/resources/compileSingle.gif; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/resources/compileSingle.png,v <-- compileSingle.png initial revision: 1.1 Checking in projects/projectui/src/org/netbeans/modules/project/ui/resources/compileSingle24.png; initial revision: 1.1 Removing projects/projectui/src/org/netbeans/modules/project/ui/resources/debugSingle.gif; Checking in projects/projectui/src/org/netbeans/modules/project/ui/resources/debugSingle.png; initial revision: 1.1 Checking in projects/projectui/src/org/netbeans/modules/project/ui/resources/debugSingle24.png; initial revision: 1.1 Checking in projects/projectui/src/org/netbeans/modules/project/ui/resources/debugTestSingle.png; initial revision: 1.1 Checking in projects/projectui/src/org/netbeans/modules/project/ui/resources/debugTestSingle24.png; initial revision: 1.1 Removing projects/projectui/src/org/netbeans/modules/project/ui/resources/runSingle.gif; Checking in projects/projectui/src/org/netbeans/modules/project/ui/resources/runSingle.png; initial revision: 1.1 Checking in projects/projectui/src/org/netbeans/modules/project/ui/resources/runSingle24.png; initial revision: 1.1 Removing projects/projectui/src/org/netbeans/modules/project/ui/resources/testProject.gif; Checking in projects/projectui/src/org/netbeans/modules/project/ui/resources/testProject.png; initial revision: 1.1 Checking in projects/projectui/src/org/netbeans/modules/project/ui/resources/testProject24.png; initial revision: 1.1 Removing projects/projectui/src/org/netbeans/modules/project/ui/resources/testSingle.gif; Checking in projects/projectui/src/org/netbeans/modules/project/ui/resources/testSingle.png; initial revision: 1.1 Checking in projects/projectui/src/org/netbeans/modules/project/ui/resources/testSingle24.png; initial revision: 1.1 Checking in openide/src/org/openide/actions/PrintAction.java; new revision: 1.26; previous revision: 1.25 Checking in openide/src/org/openide/actions/SaveAction.java; 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
Note that high-resistance fix is only adding new icons. Problems of actions with null icon are now tracked in new issue 51163.
Fix of the problem I created by my previous commit, caused by my ignorance :-( /cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/FileCommandAction.java,v <-- FileCommandAction.java new revision: 1.10; previous revision: 1.9
fix merged into release40 branch.
I think in current NetBeans 4.2(Build 200507061800) the most of frequently used actions have the icons.
This issue had *1 votes* before move to platform component