public void update(Object element, String[] properties) { if(element != getInput()) { INavigatorPipelineService pipeDream = contentService .getPipelineService(); PipelinedViewerUpdate update = new PipelinedViewerUpdate(); update.getRefreshTargets().add(element); update.setUpdateLabels(true); /* if the update is modified */ if (pipeDream.interceptUpdate(update)) { /* intercept and apply the update */ for (Iterator iter = update.getRefreshTargets().iterator(); iter .hasNext();) { super.update(iter.next(), properties); } } else { super.update(element, properties); } } else { super.update(element, properties); } }
public void refresh(Object element, boolean updateLabels) { if(element != getInput()) { INavigatorPipelineService pipeDream = contentService .getPipelineService(); PipelinedViewerUpdate update = new PipelinedViewerUpdate(); update.getRefreshTargets().add(element); update.setUpdateLabels(updateLabels); /* if the update is modified */ if (pipeDream.interceptRefresh(update)) { /* intercept and apply the update */ boolean toUpdateLabels = update.isUpdateLabels(); for (Iterator iter = update.getRefreshTargets().iterator(); iter .hasNext();) { super.refresh(iter.next(), toUpdateLabels); } } else { super.refresh(element, updateLabels); } } else { super.refresh(element, updateLabels); } }
public void setSelection(ISelection selection, boolean reveal) { if(selection instanceof IStructuredSelection) { IStructuredSelection sSelection = (IStructuredSelection) selection; INavigatorPipelineService pipeDream = contentService .getPipelineService(); PipelinedViewerUpdate update = new PipelinedViewerUpdate(); update.getRefreshTargets().addAll(sSelection.toList()); update.setUpdateLabels(false); /* if the update is modified */ if (pipeDream.interceptRefresh(update)) { /* intercept and apply the update */ super.setSelection(new StructuredSelection(update.getRefreshTargets().toArray()) , reveal); } else { super.setSelection(selection, reveal); } } }