IProblem[] problems= context.getASTRoot().getProblems(); for (int i= 0; i < problems.length; i++) { IProblem problem= problems[i]; if (problem.getID() == IProblem.UnnecessaryElse) { int selectionOffset= context.getSelectionOffset(); int selectionLength= context.getSelectionLength(); if (problem.getSourceStart() == selectionOffset && problem.getSourceEnd() + 1 == selectionOffset + selectionLength) return false; } }
	private static boolean getSurroundWithRunnableProposal(IInvocationContext context, ASTNode node, ArrayList resultingCollections) throws CoreException {		Statement[] selectedStatements= SurroundWith.getSelectedStatements(context);		if (selectedStatements == null)			return false;				if (resultingCollections == null)			return true;				String label= CorrectionMessages.QuickAssistProcessor_surround_with_runnable;		Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);				SurroundWithRunnableProposal proposal= new SurroundWithRunnableProposal(label, context, 10, image, selectedStatements);		resultingCollections.add(proposal);		return true;	}