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/ui/actions/ChangeTypeAction.java
*/
	public void selectionChanged(ITextSelection selection) {
		setEnabled(checkEnabled(selection));
	}
	public void selectionChanged(IStructuredSelection selection) {
		try {
			setEnabled(getMember(selection) != null);
		} catch (JavaModelException e) {
			setEnabled(false);
		}
	}
	public void run(IStructuredSelection selection) {
		try {
			IMember member= getMember(selection);
			if (member == null)
				return;
			ISourceRange range= member.getNameRange();
			ICompilationUnit icu= member.getCompilationUnit();
			ITextSelection textSelection= new TextSelection(range.getOffset(), range.getLength());
			ChangeTypeRefactoring refactoring= createRefactoring(icu, textSelection);
			if (refactoring == null)
				return;
			new RefactoringStarter().activate(refactoring, createWizard(refactoring), getShell(), fDialogMessageTitle, false);
		} catch (CoreException e) {
			ExceptionHandler.handle(e, fDialogMessageTitle, RefactoringMessages.getString("ChangeTypeAction.exception")); 
		}
	}
	private IMember getMember(IStructuredSelection selection) throws JavaModelException {
		if (selection.size() != 1)
			return null;