@Override protected void disassociate(Item item) { if (contentProviderIsLazy) { // avoid causing a callback: item.setText(" "); //$NON-NLS-1$ } super.disassociate(item); }
@Override protected void disassociate(Item item) { if (contentProviderIsLazy) { // avoid causing a callback: item.setText(" "); //$NON-NLS-1$ } super.disassociate(item); }
protected void disassociate(Item item) { if (contentProviderIsLazy) { // avoid causing a callback: item.setText(" "); //$NON-NLS-1$ } super.disassociate(item); }
/** * Disassociates the children of the given SWT item from their corresponding * elements. * * @param item * the widget */ private void disassociateChildren(Item item) { Item[] items = getChildren(item); for (Item child : items) { if (child.getData() != null) { disassociate(child); } } }
/** * Disassociates the children of the given SWT item from their corresponding * elements. * * @param item * the widget */ private void disassociateChildren(Item item) { Item[] items = getChildren(item); for (int i = 0; i < items.length; i++) { if (items[i].getData() != null) { disassociate(items[i]); } } }
/** * Disassociates the children of the given SWT item from their corresponding * elements. * * @param item * the widget */ private void disassociateChildren(Item item) { Item[] items = getChildren(item); for (int i = 0; i < items.length; i++) { if (items[i].getData() != null) { disassociate(items[i]); } } }
/** Returns true if children were pruned */ /*package*/ boolean optionallyPruneChildren(Item item, Object element) { // need a dummy node if element is expandable; // but try to avoid recreating the dummy node boolean needDummy = isExpandable(item, null, element); boolean haveDummy = false; // remove all children Item[] items = getItems(item); for (int i = 0; i < items.length; i++) { if (items[i].getData() != null) { disassociate(items[i]); items[i].dispose(); } else { if (needDummy && !haveDummy) { haveDummy = true; } else { items[i].dispose(); } } } if (needDummy && !haveDummy) { newItem(item, SWT.NULL, -1); } return true; }
/** Returns true if children were pruned */ /*package*/ boolean optionallyPruneChildren(Item item, Object element) { // need a dummy node if element is expandable; // but try to avoid recreating the dummy node boolean needDummy = isExpandable(item, null, element); boolean haveDummy = false; // remove all children Item[] items = getItems(item); for (Item child : items) { if (child.getData() != null) { disassociate(child); child.dispose(); } else { if (needDummy && !haveDummy) { haveDummy = true; } else { child.dispose(); } } } if (needDummy && !haveDummy) { newItem(item, SWT.NULL, -1); } return true; }
/** Returns true if children were pruned */ /*package*/ boolean optionallyPruneChildren(Item item, Object element) { // need a dummy node if element is expandable; // but try to avoid recreating the dummy node boolean needDummy = isExpandable(item, null, element); boolean haveDummy = false; // remove all children Item[] items = getItems(item); for (int i = 0; i < items.length; i++) { if (items[i].getData() != null) { disassociate(items[i]); items[i].dispose(); } else { if (needDummy && !haveDummy) { haveDummy = true; } else { items[i].dispose(); } } } if (needDummy && !haveDummy) { newItem(item, SWT.NULL, -1); } return true; }
public void run() { // fix for PR 1FW89L7: // don't complain and remove all "dummies" ... if (tis != null) { for (int i = 0; i < tis.length; i++) { if (tis[i].getData() != null) { disassociate(tis[i]); Assert.isTrue(tis[i].getData() == null, "Second or later child is non -null");//$NON-NLS-1$ } tis[i].dispose(); } } Object d = widget.getData(); if (d != null) { Object parentElement = d; Object[] children; if (isTreePathContentProvider() && widget instanceof Item) { TreePath path = getTreePathFromItem((Item) widget); children = getSortedChildren(path); } else { children = getSortedChildren(parentElement); } for (int i = 0; i < children.length; i++) { createTreeItem(widget, children[i], -1); } } }
for (Item item2 : items) { if (item2.getData() != null) { disassociate(item2);
for (int i = 0; i < items.length; i++) { if (items[i].getData() != null) { disassociate(items[i]);
for (int i = 0; i < items.length; i++) { if (items[i].getData() != null) { disassociate(items[i]);
Object data = child.getData(); if (data != null && toRemove.containsKey(data)) { disassociate(child); child.dispose();
disassociate(child); child.dispose();
disassociate(child); child.dispose();
Widget childItem = childItems[j]; if (childItem instanceof Item) { disassociate((Item) childItem); childItem.dispose();
for (Widget childItem : childItems) { if (childItem instanceof Item) { disassociate((Item) childItem); childItem.dispose();
Widget childItem = childItems[j]; if (childItem instanceof Item) { disassociate((Item) childItem); childItem.dispose();
for (int i1 = 0; i1 < tis.length; i1++) { if (tis[i1].getData() != null) { disassociate(tis[i1]); Assert.isTrue(tis[i1].getData() == null, "Second or later child is non -null");//$NON-NLS-1$