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 82618 - No way for NodeModel to specify a .png for icon
Summary: No way for NodeModel to specify a .png for icon
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@debugger
URL:
Keywords: API
Depends on: 104281
Blocks:
  Show dependency tree
 
Reported: 2006-08-14 15:31 UTC by rcauble
Modified: 2010-04-29 09:29 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 rcauble 2006-08-14 15:31:19 UTC
org.netbeans.spi.viewmodel.NodeModel simply has a getIconBase. If I return an 
icon base, this will not resolve to a .png, only a gif.
Comment 1 Martin Entlicher 2006-08-14 16:00:51 UTC
Well, this is a problem. It uses old deprecated API:
org.openide.nodes.AbstractNode.setIconBase(). It should delegate to
org.openide.nodes.AbstractNode.setIconBaseWithExtension() instead. But,
NodeModel is an interface and we can not simply add a new method
getIconBaseWithExtension().

I do not see any other solution than introduce a new interface with
getIconBaseWithExtension() method. Though it's ugly.
Comment 2 Martin Entlicher 2006-09-07 14:08:01 UTC
There is a simple, but ugly workaround - rename icon.png to icon.gif
It will work fine, though it's not nice.
Comment 3 Martin Entlicher 2007-06-06 21:37:51 UTC
This is fixed now, after ExtendedNodeModel was committed to trunk. See issue
#104281. If you NodeModel would implement ExtendedNodeModel, you can use
getIconBaseWithExtension() method to return the full name of the icon, including
whatever extension you need.
Comment 4 Quality Engineering 2010-04-29 09:29:52 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.