ignoreExpand = ignoreSelect = false; if (result != OS.noErr) { error (SWT.ERROR_ITEM_NOT_REMOVED); }
if (result != OS.noErr) error (SWT.ERROR_ITEM_NOT_REMOVED);
public void removeAll () {	checkWidget ();	for (int i=0; i<items.length; i++) {		TreeItem item = items [i];		if (item != null && !item.isDisposed ()) item.release (false);	}	items = new TreeItem [4];	childIds = null;	ignoreExpand = ignoreSelect = true;	/*	* Feature in the Mac. When RemoveDataBrowserItems() is used	* to remove items, item notification callbacks are issued with	* the message kDataBrowserItemRemoved  When many items are	* removed, this is slow.  The fix is to temporarily remove	* the item notification callback.	*/	DataBrowserCallbacks callbacks = new DataBrowserCallbacks ();	OS.GetDataBrowserCallbacks (handle, callbacks);	callbacks.v1_itemNotificationCallback = 0;	callbacks.v1_itemCompareCallback = 0;	OS.SetDataBrowserCallbacks (handle, callbacks);	int result = OS.RemoveDataBrowserItems (handle, OS.kDataBrowserNoItem, 0, null, 0);	callbacks.v1_itemNotificationCallback = display.itemNotificationProc;	callbacks.v1_itemCompareCallback = display.itemCompareProc;	OS.SetDataBrowserCallbacks (handle, callbacks);	ignoreExpand = ignoreSelect = false;	if (result != OS.noErr) {		error (SWT.ERROR_ITEM_NOT_REMOVED);	}	OS.SetDataBrowserScrollPosition (handle, 0, 0);	anchorFirst = anchorLast = 0;	visibleCount = 0;	setScrollWidth (true);}