Bug 72912 Cannot extract static [refactoring]
When I have the string "Windows" selected in: public static final boolean IS_OS_WINDOWS = getOSMatches("Windows"); Right-click/Refactor does not let me extract "Windows" as a static. Version 3.1.M1.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExtractConstantAction.java
private boolean canEnable(JavaTextSelection selection) {
		return (selection.resolveInInitializer() || selection.resolveInMethodBody()) && 
			ExtractConstantRefactoring.isAvailable(selection.resolveSelectedNodes(), selection.resolveCoveringNode());
	}
	
	/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction
	 */		
	public void run(ITextSelection selection) {
		if (!ActionUtil.isProcessable(getShell(), fEditor))
			return;
		try{
			ExtractConstantRefactoring refactoring= createRefactoring(SelectionConverter.getInputAsCompilationUnit(fEditor), selection);
			if (refactoring == null)
				return;
			new RefactoringStarter().activate(refactoring, createWizard(refactoring), getShell(), DIALOG_MESSAGE_TITLE, false);
		} catch (JavaModelException e){
			ExceptionHandler.handle(e, DIALOG_MESSAGE_TITLE, RefactoringMessages.getString("NewTextRefactoringAction.exception")); 
		}	
	}
	private static ExtractConstantRefactoring createRefactoring(ICompilationUnit cunit, ITextSelection selection) {
		return ExtractConstantRefactoring.create(cunit, selection.getOffset(), selection.getLength(), 
																 JavaPreferencesSettings.getCodeGenerationSettings());
	}
	private static RefactoringWizard createWizard(ExtractConstantRefactoring refactoring) {
		return new ExtractConstantWizard(refactoring);
	}
}