/** * Adds the given child elements to this viewer as children of the given * parent element. If this viewer does not have a sorter, the elements are * added at the end of the parent's list of children in the order given; * otherwise, the elements are inserted at the appropriate positions. * <p> * This method should be called (by the content provider) when elements have * been added to the model, in order to cause the viewer to accurately * reflect the model. This method only affects the viewer, not the model. * </p> * * @param parentElementOrTreePath * the parent element * @param childElements * the child elements to add */ public void add(Object parentElementOrTreePath, Object[] childElements) { Assert.isNotNull(parentElementOrTreePath); assertElementsNotNull(childElements); if (checkBusy()) return; Widget[] widgets = internalFindItems(parentElementOrTreePath); // If parent hasn't been realized yet, just ignore the add. if (widgets.length == 0) { return; } for (Widget widget : widgets) { internalAdd(widget, parentElementOrTreePath, childElements); } }
/** * Adds the given child elements to this viewer as children of the given * parent element. If this viewer does not have a sorter, the elements are * added at the end of the parent's list of children in the order given; * otherwise, the elements are inserted at the appropriate positions. * <p> * This method should be called (by the content provider) when elements have * been added to the model, in order to cause the viewer to accurately * reflect the model. This method only affects the viewer, not the model. * </p> * * @param parentElementOrTreePath * the parent element * @param childElements * the child elements to add */ public void add(Object parentElementOrTreePath, Object[] childElements) { Assert.isNotNull(parentElementOrTreePath); assertElementsNotNull(childElements); if (checkBusy()) return; Widget[] widgets = internalFindItems(parentElementOrTreePath); // If parent hasn't been realized yet, just ignore the add. if (widgets.length == 0) { return; } for (int i = 0; i < widgets.length; i++) { internalAdd(widgets[i], parentElementOrTreePath, childElements); } }
/** * Adds the given child elements to this viewer as children of the given * parent element. If this viewer does not have a sorter, the elements are * added at the end of the parent's list of children in the order given; * otherwise, the elements are inserted at the appropriate positions. * <p> * This method should be called (by the content provider) when elements have * been added to the model, in order to cause the viewer to accurately * reflect the model. This method only affects the viewer, not the model. * </p> * * @param parentElementOrTreePath * the parent element * @param childElements * the child elements to add */ public void add(Object parentElementOrTreePath, Object[] childElements) { Assert.isNotNull(parentElementOrTreePath); assertElementsNotNull(childElements); if (checkBusy()) return; Widget[] widgets = internalFindItems(parentElementOrTreePath); // If parent hasn't been realized yet, just ignore the add. if (widgets.length == 0) { return; } for (int i = 0; i < widgets.length; i++) { internalAdd(widgets[i], parentElementOrTreePath, childElements); } }
return; Widget[] childItems = internalFindItems(element); if (childItems.length > 0) { for (Widget childItem : childItems) { && !(parent instanceof TreePath && ((TreePath) parent) .getSegmentCount() == 0)) { Widget[] parentItems = internalFindItems(parent); for (Widget parentItem : parentItems) { if (parentItem instanceof Item) {
return; Widget[] childItems = internalFindItems(element); if (childItems.length > 0) { for (int j = 0; j < childItems.length; j++) { && !(parent instanceof TreePath && ((TreePath) parent) .getSegmentCount() == 0)) { Widget[] parentItems = internalFindItems(parent); for (int j = 0; j < parentItems.length; j++) { Widget parentItem = parentItems[j];
return; Widget[] childItems = internalFindItems(element); if (childItems.length > 0) { for (int j = 0; j < childItems.length; j++) { && !(parent instanceof TreePath && ((TreePath) parent) .getSegmentCount() == 0)) { Widget[] parentItems = internalFindItems(parent); for (int j = 0; j < parentItems.length; j++) { Widget parentItem = parentItems[j];
items = new Widget[] { getControl() }; } else { items = internalFindItems(parentElementOrTreePath);
items = new Widget[] { getControl() }; } else { items = internalFindItems(parentElementOrTreePath);
items = new Widget[] { getControl() }; } else { items = internalFindItems(parentElementOrTreePath);