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
ASTNode node= getStartNode();
		if (node == null) {
			fInInitializer= true;
		} else {
			while (node != null) {
				int nodeType= node.getNodeType();
				if (node instanceof AbstractTypeDeclaration) {
					fInInitializer= false;
					break;
				} else if (nodeType == ASTNode.ANONYMOUS_CLASS_DECLARATION) {
					fInInitializer= false;
					break;
				} else if (nodeType == ASTNode.INITIALIZER) {
					fInInitializer= true;
					break;
				}
				node= node.getParent();
			}
		}
		return fInInitializer;
	}
	
	private ASTNode getStartNode() {
		if (fSelectedNodes != null && fSelectedNodes.length > 0)
			return fSelectedNodes[0];
		else
			return fCoveringNode;
	}
}