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 - VCS icon annotations probably ignored for JAR files
Summary: VCS icon annotations probably ignored for JAR files
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: jarpackager (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@obsolete
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-11 21:26 UTC by Jesse Glick
Modified: 2001-09-13 22:54 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Suggested patch (896 bytes, patch)
2001-09-11 21:26 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.