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 42820 - [GTK] No Project badges in Open Project dialog
Summary: [GTK] No Project badges in Open Project dialog
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Petr Hrebejk
Keywords: GTK
Depends on:
Blocks: 41535
  Show dependency tree
Reported: 2004-05-05 10:21 UTC by Marian Mirilovic
Modified: 2006-03-24 10:15 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Screenshot - JDK1.5.0 (b49) GTK (215.28 KB, image/png)
2004-05-05 10:22 UTC, Marian Mirilovic
Screenshot - JDK1.4.2_04 (192.03 KB, image/png)
2004-05-05 10:23 UTC, Marian Mirilovic
Sample of changing the file chooser UI (1.83 KB, text/x-java)
2004-05-05 20:12 UTC, Jesse Glick
Stacktrace of the NPE - JDK141_06 (4.00 KB, text/plain)
2004-06-30 11:53 UTC, lkishalmi

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2004-05-05 10:21:50 UTC

Steps to reproduce:
- run IDE with -J-DuseGtk=true 
- push from main menu File | Open Project
-> project folders haven't badges (see attached
Comment 1 Marian Mirilovic 2004-05-05 10:22:30 UTC
Created attachment 14715 [details]
Screenshot - JDK1.5.0 (b49) GTK
Comment 2 Marian Mirilovic 2004-05-05 10:23:31 UTC
Created attachment 14716 [details]
Screenshot - JDK1.4.2_04
Comment 3 _ tboudreau 2004-05-05 10:35:11 UTC
We've filed a high priority JDK bug to get this fixed for the GTK file chooser;  I'll leave this 
issue open for now, so we know to do *something* (if there's anything we can do other 
than not supporting GTK L&F) for promo D.
Comment 4 _ tboudreau 2004-05-05 14:05:01 UTC
JDK  b u g  5027268.
Comment 5 Jesse Glick 2004-05-05 20:08:13 UTC
Another suggestion made was to show a Metal file chooser, but using
GTK-oriented icons if available. Not pleasant.

JDK bug is that the GTK chooser shows no icons at all, it seems. The
chooser will be rewritten in the future to follow a newer Gnome UI
that does show icons, but that will probably come too late for us.
Comment 6 Jesse Glick 2004-05-05 20:12:41 UTC
Created attachment 14735 [details]
Sample of changing the file chooser UI
Comment 7 Jesse Glick 2004-05-06 02:49:26 UTC
I will put in a patch to ProjectChooserAccessory to explicitly handle
the case that ProjectFileView.getIcon is called but
FileSystemView.getSystemIcon returns null (which is perfectly legal
but which threw NPE before). For now, will just use a blank 16x16 as
the base icon for folders, but could use a folder icon from the
UIManager too. Then with an experimental proposed patch to the GTK L&F
to display file icons if you request them (from FileView.getIcon I
guess), it works OK.
Comment 8 Jesse Glick 2004-05-06 02:52:54 UTC
Will work around this somehow if it does not get handled in Tiger.
Comment 9 Jesse Glick 2004-05-06 03:16:58 UTC
Should leave this open until either the patch is put into a Tiger
promotion and PCA is modified to use the UIManager's default folder
icon as a fallback folder icon instead of empty.gif (if there is a
default folder icon supplied in UIManager); or we put in the other
workaround to use the Metal structure for the file chooser (with the
GTK L&F for subcomponents).
Comment 10 Jesse Glick 2004-05-06 04:11:26 UTC
committed   * Up-To-Date  1.6        
Comment 11 _ tboudreau 2004-05-06 09:46:43 UTC
Installing the icon should be part of core/swing/plaf/gtk/GtkLFCustoms - just adding it 
into the array of key/value pairs it returns.

Probably, unlike Leif's patch, we should provide an icon as an image and install it, rather 
than grabbing them from Metal/whatever.  
Comment 12 lkishalmi 2004-06-30 11:36:58 UTC
I don't know it should or not but it seems this patch causes NPE at
Open Project in under OS/2
with Metal L&F.
Comment 13 lkishalmi 2004-06-30 11:53:24 UTC
Created attachment 16075 [details]
Stacktrace of the NPE - JDK141_06
Comment 14 Marian Mirilovic 2004-07-29 14:42:54 UTC
It's fixed in [nb_dev](200407281800) and [jdk1.5.0](b60)
Comment 15 lkishalmi 2004-07-29 22:24:58 UTC
Thanks for the fix!
NPE has gone on OS/2 and for a short test I've made NetBeans
works again on JDK 1.4.1 and OS/2.
Comment 16 Jesse Glick 2004-07-29 23:50:01 UTC
I guess my patch to

revision 1.19
date: 2004/07/27 04:12:02;  author: jglick;  state: Exp;  lines: +6 -0
Fixing obscure NPE.

might have fixed Leslie's stack trace, though that is not the reason I
encountered it.

Since AFAIK the badges appear on GTK now, I think this can be closed.

BTW Leslie, thanks for reporting bugs on OS/2!
Comment 17 Marian Mirilovic 2004-08-09 13:19:40 UTC
verified in [nb_dev](200408081800)