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 26887

Summary: SystemAction.iconResource upgrade problem
Product: platform Reporter: Jesse Glick <jglick>
Component: ActionsAssignee: Jesse Glick <jglick>
Status: CLOSED FIXED    
Severity: blocker CC: dstrupl, jtulach, mihmax, pnejedly
Priority: P3 Keywords: API
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 29768    
Attachments: Proposed 3.4.1 patch

Description Jesse Glick 2002-08-29 15:44:31 UTC
If possible, make this possible:

package foo.bar;
public class Baz extends SystemAction {
    // ...
    protected String iconResource() {return
"path/to/icon.gif";}
}

where foo/bar/path/to/icon.gif exists. Currently
will look only for path/to/icon.gif. Minor 3.3 ->
3.4 compatibility issue; if cannot be fixed, must
be documented as such.

Workaround: supply a full path prefixed by slash,
e.g.:

package foo.bar;
public class Baz extends SystemAction {
    // ...
    protected String iconResource() {
        return "/foo/bar/path/to/icon.gif";
    }
}

Will produce a warning message in ide.log under
3.4 but should work in both 3.3 and 3.4.
Comment 1 Jesse Glick 2002-09-15 19:00:00 UTC
committed   * Up-To-Date  1.62       
openide/src/org/openide/util/actions/SystemAction.java
added       * Up-To-Date  1.1        
openide/test/unit/src/org/openide/util/actions/SystemActionTest.java
added       * Up-To-Date  1.1        
openide/test/unit/src/org/openide/util/actions/data/someicon.gif
Comment 2 Jesse Glick 2002-11-29 14:32:52 UTC
Created attachment 8113 [details]
Proposed 3.4.1 patch
Comment 3 Jesse Glick 2002-11-29 14:33:33 UTC
Could someone review this patch? Thanks.
Comment 4 Petr Nejedly 2002-12-02 12:28:21 UTC
Seems OK to me
Comment 5 Jesse Glick 2002-12-02 19:02:03 UTC
In release341:

Checking in openide/src/org/openide/util/actions/SystemAction.java;
/cvs/openide/src/org/openide/util/actions/SystemAction.java,v  <-- 
SystemAction.java
new revision: 1.56.20.1; previous revision: 1.56
done
Comment 6 Marian Mirilovic 2003-03-03 14:32:16 UTC
verified
Comment 7 Quality Engineering 2003-07-01 16:34:59 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.