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/internal/ui/javaeditor/JavaTextSelection.java
public boolean resolveInMethodBody() {
		if (fInMethodBodyRequested)
			return fInMethodBody;
		fInMethodBodyRequested= true;
		resolveSelectedNodes();
		ASTNode node= getStartNode();
		if (node == null) {
			fInMethodBody= true;
		} else {
			while (node != null) {
				int nodeType= node.getNodeType();
				if (nodeType == ASTNode.BLOCK && node.getParent() instanceof BodyDeclaration) {
					fInMethodBody= node.getParent().getNodeType() == ASTNode.METHOD_DECLARATION;
					break;
				} else if (nodeType == ASTNode.ANONYMOUS_CLASS_DECLARATION) {
					fInMethodBody= false;
					break;
				}
				node= node.getParent();
			}
		}
		return fInMethodBody;
	}
	
	public boolean resolveInInitializer() {
		if (fInInitializeRequested)
			return fInInitializer;
		fInInitializeRequested= true;
		resolveSelectedNodes();