/* * @see ContentViewer#handleLabelProviderChanged(LabelProviderChangedEvent) */ protected void handleLabelProviderChanged(LabelProviderChangedEvent event) { if (event instanceof ProblemsLabelChangedEvent) { ProblemsLabelChangedEvent e = (ProblemsLabelChangedEvent) event; if (!e.isMarkerChange() && canIgnoreChangesFromAnnotionModel()) { return; } } Object[] changed = event.getElements(); if (changed != null && !fResourceToItemsMapper.isEmpty()) { ArrayList others = new ArrayList(changed.length); for (int i = 0; i < changed.length; i++) { Object curr = changed[i]; if (curr instanceof IResource) { fResourceToItemsMapper.resourceChanged((IResource) curr); } else { others.add(curr); } } if (others.isEmpty()) { return; } event = new LabelProviderChangedEvent((IBaseLabelProvider) event.getSource(), others.toArray()); } super.handleLabelProviderChanged(event); }
/* * @see StructuredViewer#unmapElement(Object, Widget) */ protected void unmapElement(Object element, Widget item) { if (item instanceof Item) { fResourceToItemsMapper.removeFromMap(element, (Item) item); } super.unmapElement(element, item); }
/* * @see StructuredViewer#mapElement(Object, Widget) */ protected void mapElement(Object element, Widget item) { super.mapElement(element, item); if (item instanceof Item) { fResourceToItemsMapper.addToMap(element, (Item) item); } }
/* * @see StructuredViewer#unmapAllElements() */ protected void unmapAllElements() { fResourceToItemsMapper.clearMap(); super.unmapAllElements(); }