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 15377

Summary: VCS icon annotations probably ignored for JAR files
Product: obsolete Reporter: Jesse Glick <jglick>
Component: jarpackagerAssignee: issues@obsolete <issues>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: TASK Exception Reporter:
Attachments: Suggested patch

Description Jesse Glick 2001-09-11 21:26:13 UTC
May also affect ability of modules (e.g. apisupport) to provide custom icons for
*.jarContent's serving as templates: SystemFileSystem.icon seems to be ignored.
See patch, the added code is customary.
Comment 1 Jesse Glick 2001-09-11 21:26:49 UTC
Created attachment 2500 [details]
Suggested patch
Comment 2 Mike Schilling 2001-09-11 21:43:50 UTC
Is there a convention for whose badges go where?  Otherwise, one badge 
is likely to overwrite another.
Comment 3 Mike Schilling 2001-09-13 21:46:17 UTC
Supplied patch applied.

Note that a more sensible way of doing this is:

DataNode.java:

    public java.awt.Image getBaseIcon() {
        return super.getIcon();
    }

    public final java.awt.Image getIcon (int type) {
        img = getBaseIcon(type);

        try {
            img = obj.getPrimaryFile ().getFileSystem ().getStatus 
().annotateIcon (img, type, obj.files ());
        } catch (FileStateInvalidException e) {
            // no fs, do nothing
        }

        return img;
    }

This gives descendents of DataNode the proper behavior, while 
eliminating the need to copy code from superclass to all subclasses.  
With the current design, what happens if the code in 
DataNode.getIcon() needs to change, when there are so many copies of 
it?
Comment 4 Jesse Glick 2001-09-13 22:54:28 UTC
The UI site somewhere has a complete badging proposal that specifies
which kinds of badges are permitted to go into each sextant of the
24x16 icon.

Yes the situation with DataNode and its icon is clumsy at times; your
idea may be workable if it can be done compatibly. Bring it up on
dev@openide.