if (document == null) return;  OccurrencesFinder finder= new OccurrencesFinder(++fComputeCount, document, (ITextSelection) getSelectionProvider().getSelection()); Thread thread= new Thread(finder, "Occurrences Marker"); thread.setDaemon(true); thread.start();
if (document == null) return;  ASTNode node= NodeFinder.perform(astRoot, selection.getOffset(), selection.getLength()); if (!(node instanceof Name)) return;  IBinding binding= ((Name)node).resolveBinding(); if (binding == null) return;  if (fOccurrencesFinderJob != null) fOccurrencesFinderJob.cancel();   OccurrencesFinder finder = new OccurrencesFinder(binding); astRoot.accept(finder); List matches= finder.getUsages();  Position[] positions= new Position[matches.size()]; int i= 0; for (Iterator each= matches.iterator(); each.hasNext();) { ASTNode currentNode= (ASTNode)each.next(); positions[i++]= new Position(currentNode.getStartPosition(), currentNode.getLength()); }  fOccurrencesFinderJob= new OccurrencesFinderJob(document, positions); fOccurrencesFinderJob.setPriority(Job.DECORATE); fOccurrencesFinderJob.setSystem(true); fOccurrencesFinderJob.schedule();
	protected void updateOccurrenceAnnotations() {		if (!fMarkOccurrenceAnnotations)			return;				IDocument document= getSourceViewer().getDocument();			if (document == null)				return;						OccurrencesFinder finder= new OccurrencesFinder(++fComputeCount, document, (ITextSelection) getSelectionProvider().getSelection());		Thread thread= new Thread(finder, "Occurrences Marker"); //$NON-NLS-1$		thread.setDaemon(true);		thread.start();	}