if (overlaps(r, start, end)) {
rng= getSourceRange(r); if (overlaps(rng, start, end)) {
				protected void update(Widget w, IJavaElementDelta delta) {										Item item;					Object element;										IJavaElement parent= delta.getElement();					IJavaElementDelta[] affected= delta.getAffectedChildren();					Item[] children= getChildren(w);					boolean doUpdateParent= false;															Vector deletions= new Vector();					Vector additions= new Vector();										go1: for (int i= 0; i < children.length; i++) {						item= children[i];						element= item.getData();						for (int j= 0; j < affected.length; j++) {														IJavaElement affectedElement= affected[j].getElement();							int status= affected[j].getKind();														if (affectedElement.equals(element)) {																// removed								if ((status & IJavaElementDelta.REMOVED) != 0) {									deletions.addElement(item);									doUpdateParent= doUpdateParent || mustUpdateParent(affected[j], affectedElement);									continue go1;								}																// changed								if ((status & IJavaElementDelta.CHANGED) != 0) {									int change= affected[j].getFlags();									doUpdateParent= doUpdateParent || mustUpdateParent(affected[j], affectedElement);																		if ((change & IJavaElementDelta.F_MODIFIERS) != 0) {										if (filtered(parent, affectedElement))											deletions.addElement(item);										else											updateItem(item, affectedElement);									}																		if ((change & IJavaElementDelta.F_CONTENT) != 0)										updateItem(item, affectedElement);																			if ((change & IJavaElementDelta.F_CHILDREN) != 0)										update(item, affected[j]);																		continue go1;															}															} else {								// changed								if ((status & IJavaElementDelta.CHANGED) != 0 &&										(affected[j].getFlags() & IJavaElementDelta.F_MODIFIERS) != 0 &&										!filtered(parent, affectedElement))									additions.addElement(affected[j]);							}						}					}										// find all elements to add					IJavaElementDelta[] add= delta.getAddedChildren();					if (additions.size() > 0) {						IJavaElementDelta[] tmp= new IJavaElementDelta[add.length + additions.size()];						System.arraycopy(add, 0, tmp, 0, add.length);						for (int i= 0; i < additions.size(); i++)							tmp[i + add.length]= (IJavaElementDelta) additions.elementAt(i);						add= tmp;					}										// add at the right position					go2: for (int i= 0; i < add.length; i++) {												try {														IJavaElement e= add[i].getElement();							if (filtered(parent, e))								continue go2;															ISourceReference r= (ISourceReference) e ;							doUpdateParent= doUpdateParent || mustUpdateParent(add[i], e);							ISourceRange rng= r.getSourceRange();							int start= rng.getOffset();							int end= start + rng.getLength() - 1;														Item last= null;							item= null;							children= getChildren(w);														for (int j= 0; j < children.length; j++) {								item= children[j];								r= (ISourceReference) item.getData();																if (r == null) {									// parent node collapsed and not be opened before -> do nothing									continue go2;								}																	try {									if (overlaps(r, start, end)) {																				// be tolerant if the delta is not correct, or if 										// the tree has been updated other than by a delta										reuseTreeItem(item, (Object) add[i].getElement());										continue go2;																			} else if (r.getSourceRange().getOffset() > start) {																				if (last != null && deletions.contains(last)) {											// reuse item											deletions.removeElement(last);											reuseTreeItem(last, (Object) add[i].getElement());										} else {											// nothing to reuse											createTreeItem(w, (Object) add[i].getElement(), j);										}										continue go2;									}																	} catch (JavaModelException x) {									// stumbled over deleted element								}																last= item;							}													// add at the end of the list							if (last != null && deletions.contains(last)) {								// reuse item								deletions.removeElement(last);								reuseTreeItem(last, (Object) add[i].getElement());							} else {								// nothing to reuse								createTreeItem(w, (Object) add[i].getElement(), -1);							}												} catch (JavaModelException x) {							// the element to be added is not present -> don't add it						}					}															// remove items which haven't been reused					Enumeration e= deletions.elements();					while (e.hasMoreElements()) {						item= (Item) e.nextElement();						disassociate(item);						item.dispose();					}										if (doUpdateParent)						updateItem(w, delta.getElement());				}