ISelectionProvider selectionProvider= getSelectionProvider(); if (selectionProvider == null ) return;  ISelection textSelection= selectionProvider.getSelection(); if (!(textSelection instanceof ITextSelection)) return;  CompilationUnit ast= JavaPlugin.getDefault().getASTProvider().getAST(getInputJavaElement(), ASTProvider.WAIT_ACTIVE_ONLY, getProgressMonitor()); if (ast != null) { fForcedMarkOccurrencesSelection= textSelection; updateOccurrenceAnnotations((ITextSelection)textSelection, ast); }
	protected void doSelectionChanged(SelectionChangedEvent event) {		ISourceReference reference= null;		ISelection selection= event.getSelection();		Iterator iter= ((IStructuredSelection) selection).iterator();		while (iter.hasNext()) {			Object o= iter.next();			if (o instanceof ISourceReference) {				reference= (ISourceReference) o;				break;			}		}		if (!isActivePart() && JavaPlugin.getActivePage() != null)			JavaPlugin.getActivePage().bringToTop(this);		setSelection(reference, !isActivePart());	}