Bug 47838 Make refactoring menu selection sensitive in editor [refactoring]
M5 Currently all refactoring actions are enabled in the editor's context menu. Make them selection dependent. Check if code resolve might be enough (no need to create an AST).
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java
IJavaElement[] elements= codeResolveOrInput(editor);
		if (elements == null || elements.length == 0)
			return null;
		IJavaElement candidate= elements[0];
		if (elements.length > 1) {
			candidate= OpenActionUtil.selectJavaElement(elements, shell, title, message);
		}
		return candidate;
	}
	
	public static IJavaElement codeResolveOrInputHandled(JavaEditor editor, Shell shell, String title, String message) {
		try {
			return codeResolveOrInput(editor, shell, title, message);
		} catch (JavaModelException e) {
			ExceptionHandler.handle(e, shell, title, ActionMessages.getString("SelectionConverter.codeResolveOrInput_failed")); 
		}
		return null;
	}
		
	public static IJavaElement[] codeResolve(JavaEditor editor) throws JavaModelException {
		return codeResolve(getInput(editor), (ITextSelection)editor.getSelectionProvider().getSelection());
	}
	/**
	 * Converts the text selection provided by the given editor a Java element by
	 * asking the user if code reolve returned more than one result. If the selection 
	 * doesn't cover a Java element <code>null</code> is returned.
	 */
	public static IJavaElement codeResolve(JavaEditor editor, Shell shell, String title, String message) throws JavaModelException {
		IJavaElement[] elements= codeResolve(editor);
		if (elements == null || elements.length == 0)