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 15914

Summary: Toolbar: Can't add icons from outside debuggercore
Product: debugger Reporter: Torbjorn Norbye <tor>
Component: CodeAssignee: issues@debugger <issues>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P2    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Torbjorn Norbye 2001-09-26 07:59:19 UTC
I can add my top component now using code like this:

        w = new View2SupportHack (
	    IpeDebugger.getText("TITLE_StackWindow"), // NOI18N
            "/org/netbeans/core/resources/callstack", // NOI18N
            "com.sun.forte.developer.ipe.debugger.StackWindow", // NOI18N
            false, // has no splitter
            true, // is in toolbar
            true,  // visible
            false  // separated
        );

However, this only works if the icon resource above (/org/netbeans/core/..)
is part of core or debuggercore. If it's a path in my module (e.g. loaded
by a different classloader) I get this exception:

Mon Sep 24 12:35:15 PDT 2001: java.lang.IllegalArgumentException: Icon:
 /com/sun/forte/developer/ipe/debugger/rtc.gif does not exist!
java.lang.IllegalArgumentException: Icon:
/com/sun/forte/developer/ipe/debugger/rtc.gif does not exist!
        at
org.netbeans.modules.debugger.support.nodes.ToolbarView.setViews(ToolbarView.java:182)
        at
org.netbeans.modules.debugger.support.nodes.DebuggerWindow.showViews(DebuggerWindow.java:341)
        at
org.netbeans.modules.debugger.support.nodes.DebuggerWindow.setViews(DebuggerWindow.java:245)
        at
org.netbeans.modules.debugger.support.nodes.DebuggerWindow.addNotify(DebuggerWindow.java:126)
        at java.awt.Container.addImpl(Container.java:374)
        at java.awt.Container.add(Container.java:228)


As a possible solution, either consider allowing me to specify a classloader
as part of the constructor, or perhaps just add an alternative constructor
where I can supply the actual Image object (which won't be loaded lazily,
that's okay for me.)
Comment 1 Jan Jancura 2001-09-27 13:14:03 UTC
in main trunk