Bug 19275 editor: context menu slow on large files
F2 it's slow, but only the first time after a change. then it's fast afain you make another change - it's slow again
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaHistoryEditorAction.java
private JavaEditor fEditor;
	private IActionDelegate fAction;
	public JavaHistoryEditorAction(JavaEditor editor, IActionDelegate action, String text) {
		Assert.isNotNull(editor);
		Assert.isNotNull(action);
		fEditor= editor;
		fAction= action;
		setText(text);
	}
	
	public void run() {
		fAction.run(this);
	}
	
	public void update() {
		IJavaElement element= null;
		try {
			element= SelectionConverter.getElementAtOffset(fEditor);
		} catch (JavaModelException e) {
		}
		ISelection selection= StructuredSelection.EMPTY;
		if (element != null) {
			selection= new StructuredSelection(element);
		}
		fAction.selectionChanged(this, selection);
	}
}