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/RefactorActionGroup.java
initAction(fExtractMethodAction, provider, selection);
		editor.setAction("ExtractMethod", fExtractMethodAction); 
		fConvertLocalToFieldAction= new ConvertLocalToFieldAction(editor);
		fConvertLocalToFieldAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.PROMOTE_LOCAL_VARIABLE);
		initAction(fConvertLocalToFieldAction, provider, selection);
		editor.setAction("PromoteTemp", fConvertLocalToFieldAction); 
		fConvertAnonymousToNestedAction= new ConvertAnonymousToNestedAction(editor);
		fConvertAnonymousToNestedAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_ANONYMOUS_TO_NESTED);
		initAction(fConvertAnonymousToNestedAction, provider, selection);
		editor.setAction("ConvertAnonymousToNested", fConvertAnonymousToNestedAction); 
		fExtractInterfaceAction= new ExtractInterfaceAction(editor);
		fExtractInterfaceAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.EXTRACT_INTERFACE);
		fExtractInterfaceAction.update(selection);
		editor.setAction("ExtractInterface", fExtractInterfaceAction); 
		fChangeTypeAction= new ChangeTypeAction(editor);
		fChangeTypeAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.CHANGE_TYPE);
		initAction(fChangeTypeAction, provider, selection);
		editor.setAction("ChangeType", fChangeTypeAction); 
		fConvertNestedToTopAction= new ConvertNestedToTopAction(editor);
		fConvertNestedToTopAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.MOVE_INNER_TO_TOP);
		fConvertNestedToTopAction.update(selection);
		editor.setAction("MoveInnerToTop", fConvertNestedToTopAction); 
		
		fUseSupertypeAction= new UseSupertypeAction(editor);
		fUseSupertypeAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.USE_SUPERTYPE);
		fUseSupertypeAction.update(selection);
		editor.setAction("UseSupertype", fUseSupertypeAction); 
	}
	private RefactorActionGroup(IWorkbenchSite site) {
		fSite= site;