Bug 129876 [quick fix] Light bulb on unneccessary else statement suggests "surround with runnable"
When a statement is unnessarily nested within an else clause, quick fix suggests to "surround with runnable". Which is of course incorrect. I'm using 3.2m5, check the quick fix on the else. (Java->Compiler->Errors/Warnings->Unnessary else statement = Warning) package demo; public class TestElse { public void main(String args[]) { if (true) { return; } else { return; } } }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java
}
			int statementStart= statement.getStartPosition();
			int statementEnd= statementStart + statement.getLength();
			int offset= context.getSelectionOffset();
			int length= context.getSelectionLength();
			if (length == 0) {
				if (offset != statementEnd) { 
					return false;
				}
			} else {
				if (offset > statementStart || offset + length < statementEnd) { 
					return false;
				}
			}
			statement= (Statement) statement.getParent();
		}
		StructuralPropertyDescriptor childProperty= null;
		ASTNode child= null;
		switch (statement.getNodeType()) {
			case ASTNode.IF_STATEMENT:
				int selectionStart= context.getSelectionOffset();
				int selectionEnd= context.getSelectionOffset() + context.getSelectionLength();
				ASTNode then= ((IfStatement) statement).getThenStatement();
				if (selectionEnd <= then.getStartPosition() + then.getLength()) {
					if (!(then instanceof Block)) {
						childProperty= IfStatement.THEN_STATEMENT_PROPERTY;
						child= then;
					}
				} else if (selectionStart >=  then.getStartPosition() + then.getLength()) {
					ASTNode elseStatement= ((IfStatement) statement).getElseStatement();