proposal.setImportRewrite(importRewrite);
	private static boolean getConvertSwitchToIfProposals(IInvocationContext context,			ASTNode covering,			Collection resultingCollections) {		if (!(covering instanceof SwitchStatement)) {			return false;		}		// ok, we could produce quick assist (if all 'case' statements end with 'break')		if (resultingCollections == null) {			return true;		}		//		final AST ast= covering.getAST();		final ASTRewrite rewrite= ASTRewrite.create(ast);		//		SwitchStatement switchStatement= (SwitchStatement) covering;		IfStatement firstIfStatement= null;		IfStatement currentIfStatement= null;		Block currentBlock= null;		boolean hasStopAsLastExecutableStatement = false;		Block defaultBlock= null;		InfixExpression currentCondition= null;		boolean defaultFound= false;		int caseCount = 0;				ArrayList allBlocks= new ArrayList();		//		for (Iterator I= switchStatement.statements().iterator(); I.hasNext();) {			Statement statement= (Statement) I.next();			if (statement instanceof SwitchCase) {				SwitchCase switchCase= (SwitchCase) statement;				caseCount++;				// special case: passthrough				if (currentBlock != null) {					if (!hasStopAsLastExecutableStatement) {						return false;					}					currentBlock= null;				}				// for 'default' we just will not create condition				if (switchCase.isDefault()) {					defaultFound= true;					if (currentCondition != null) {						// we can not convert one or more 'case' statements and 'default' nor in conditional if, nor in 'else' without code duplication						return false;					}					continue;				}				if (defaultFound) {					return false;				}				// prepare condition				InfixExpression switchCaseCondition= createSwitchCaseCondition(ast, rewrite, switchStatement, switchCase);				if (currentCondition == null) {					currentCondition= switchCaseCondition;				} else {					InfixExpression condition= ast.newInfixExpression();					condition.setOperator(InfixExpression.Operator.CONDITIONAL_OR);					condition.setLeftOperand(currentCondition);					condition.setRightOperand(switchCaseCondition);					currentCondition= condition;				}			} else if (statement instanceof BreakStatement) {				currentBlock= null;			} else {				// ensure that current block exists as 'then' statement of 'if'				if (currentBlock == null) {					defaultFound= false;					if (currentCondition != null) {						IfStatement ifStatement;						if (firstIfStatement == null) {							firstIfStatement= ast.newIfStatement();							ifStatement= firstIfStatement;						} else {							ifStatement= ast.newIfStatement();							currentIfStatement.setElseStatement(ifStatement);						}						currentIfStatement= ifStatement;						ifStatement.setExpression(currentCondition);						currentCondition= null;						currentBlock= ast.newBlock();						ifStatement.setThenStatement(currentBlock);						allBlocks.add(currentBlock);					} else {						// case for default:						defaultBlock= ast.newBlock();						currentBlock= defaultBlock;						allBlocks.add(currentBlock);						// delay adding of default block					}				}				// add current statement in currect block				{					hasStopAsLastExecutableStatement = hasStopAsLastExecutableStatement(statement);					Statement copyStatement= copyStatementExceptBreak(ast, rewrite, statement);																				currentBlock.statements().add(copyStatement);				}			}		}		// check, may be we have delayed default block		if (defaultBlock != null) {			currentIfStatement.setElseStatement(defaultBlock);		}		// remove unnecessary blocks in blocks		for (int i= 0; i < allBlocks.size(); i++) {			Block block= (Block) allBlocks.get(i);			List statements= block.statements();			if (statements.size() == 1 && statements.get(0) instanceof Block) {				Block innerBlock= (Block) statements.remove(0);				block.getParent().setStructuralProperty(block.getLocationInParent(), innerBlock);			}		}		// replace 'switch' with single if-else-if statement		rewrite.replace(switchStatement, firstIfStatement, null);		// prepare label, specially for Daniel :-)		String label= CorrectionMessages.AdvancedQuickAssistProcessor_convertSwitchToIf;		// add correction proposal		Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);		ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label,			context.getCompilationUnit(),			rewrite,			1,			image);		resultingCollections.add(proposal);		return true;	}