Shell shell= fEditor.getSite().getShell(); if (shell != null && !shell.isDisposed()) { shell.getDisplay().asyncExec(runnable); }
JavaEditor editor= fEditor; if (editor == null) return;  IWorkbenchPartSite site= editor.getSite(); if (site == null) return;  Shell shell= site.getShell(); if (shell == null || shell.isDisposed()) return;  Display display= shell.getDisplay(); if (display == null || display.isDisposed()) return;  display.asyncExec(runnable);
	private void updatePresentation(TextPresentation textPresentation, List addedPositions, List removedPositions) {		Runnable runnable= fPresenter.createUpdateRunnable(textPresentation, addedPositions, removedPositions);		if (runnable == null)			return;				Shell shell= fEditor.getSite().getShell();		if (shell != null && !shell.isDisposed()) { 			shell.getDisplay().asyncExec(runnable);		}	}