Community
Participate
Working Groups
Build Identifier: 3.6.1 M20100909-0800 Occurs when a CTabFolder is showing multiple tabs, but the width is set such that not all tabs are visible (i.e. the >> is showing indicating more tabs to be displayed). The ArrayIndexOutOfBounds exception occurs when the last CTabItem is disposed, regardless of the order in which the CTabItems are disposed, or the number of CTabItems. If the CTabFolder is wide enough to display all tab headers, then this exception does not occur. Stack Trace: java.lang.ArrayIndexOutOfBoundsException: -1 at org.eclipse.swt.custom.CTabFolder.setButtonBounds(CTabFolder.java:2216) at org.eclipse.swt.custom.CTabFolder.destroyItem(CTabFolder.java:476) at org.eclipse.swt.custom.CTabItem.dispose(CTabItem.java:126) at com.inlethd.manager.fathom.ui.FancyFolderPane.minimize(FancyFolderPane.java:834) at com.inlethd.manager.fathom.ui.FancyFolderPane.minimizeExtraFolders(FancyFolderPane.java:776) at com.inlethd.manager.fathom.ui.FancyFolderPane.maximize(FancyFolderPane.java:738) at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1561) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:261) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at com.inlethd.manager.fathom.ui.MainApp.run(MainApp.java:251) at com.inlethd.manager.fathom.ui.MainApp.main(MainApp.java:554) Reproducible: Always Steps to Reproduce: 1. Create a CTabFolder with multiple CTabItems, showing all. 2. Adjust the width of the CTabFolder so that one or more tab header are not displayed (i.e. the >> shows indicating more tab headers). 3. Attempt to dispose of all CTabItems. I have been doing this in response to a minimize event. 4. Notice the exception on the last CTabItem dispose(). 5. Notice that if in step 2, the width is set such that all tab headers can be displayed (no >> button), the Exception does not occur.
Created attachment 198971 [details] Screen shot of failing condition
One additional piece of information. This does not occur if the minimize button is selected on the CTabFolder, but rather occurs when the Folder contents are being removed due another action (in my case, the tab items are being removed due to a maximize event on different Folder).
it that still a bug Bog ?
Yes, I'm still seeing it. I have an easy work around (handle the exception), so not a high priority.
This problem no longer occurs in Eclipse/SWT 3.7.2