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.
Product Version = NetBeans IDE 6.9.1 (Build 201007282301) Operating System = Mac OS X version 10.6.4 running on i386 Java; VM; Vendor = 1.6.0_20 Runtime = Java HotSpot(TM) Client VM 16.3-b01-279 Hi, I'm trying to create a local toolbar to be installed into my top component. Here what inside my layer.xml file: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd"> <filesystem> <folder name="Actions"> <folder name="View"> <file name="it-acsys-projects-kaos-core-viewers-pdf-action-FitWidthAction.instance"> <attr name="delegate" newvalue="it.acsys.projects.kaos.core.viewers.pdf.action.FitWidthAction"/> <attr name="displayName" bundlevalue="it.acsys.projects.kaos.core.viewers.pdf.action.Bundle#CTL_FitWidthAction"/> <attr name="iconBase" stringvalue="it/acsys/projects/kaos/core/viewers/pdf/resources/fit_to_width.png"/> <attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/> <attr name="noIconInMenu" boolvalue="false"/> </file> </folder> </folder> <folder name="PDFViewer"> <folder name="Toolbars"> <folder name="ZoomToolbar"> <attr name="position" intvalue="100"/> <file name="it-acsys-projects-kaos-core-viewers-pdf-action-FitWidthAction.shadow"> <attr name="originalFile" stringvalue="Actions/View/it-acsys-projects-kaos-core-viewers-pdf-action-FitWidthAction.instance"/> </file> </folder> </folder> </folder> </filesystem> Then I try to build a ToolbarPool using the following code: FileObject root = FileUtil.getConfigRoot(); FileObject toolbarsFileObjct = null; try { toolbarsFileObjct = FileUtil.createFolder(root, "PDFViewer/Toolbars"); } catch ( IOException ex ) { Exceptions.printStackTrace(ex); } if ( toolbarsFileObjct == null ) throw new IllegalStateException("No PDFViewer/Toolbars/"); // NOI18N DataFolder dataFolder = DataFolder.findFolder(toolbarsFileObjct); ToolbarPool toolbarPool = new ToolbarPool(dataFolder); System.out.println("Toolbar exists: " + String.valueOf(toolbarPool.getToolbars().length)); but every time I execute my NB-based application, the found toolbars are always 0.
After looking at NetBeans source code I've found that waitFinished() must be called on a ToolbarPool to wait for content loading. Thus I've lowered this issue priority. I think that to close the issue a class description on how to use it to load local toolbar (with a code example) should be added.
core-main#ba169aecc1c1
Integrated into 'main-golden', will be available in build *201009080000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ba169aecc1c1 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #190176: waitFinished() before returning values from getToolbars() or getConfigurations()
The fix caused deadlocks on start, see bug 190226. Reverting the fix in 2b08d72f24dc.
One again and this time with a hope the IDE starts at least sometimes: core-main#1482ef3b369d