private boolean getUnWrapProposals(IAssistContext context, ASTNode node, Collection resultingCollections) throws CoreException {
private boolean getUnWrapProposals(IInvocationContext context, ASTNode node, Collection resultingCollections) throws CoreException {
	private boolean getUnWrapProposals(IAssistContext context, ASTNode node, Collection resultingCollections) throws CoreException {		ASTNode outer= node;					Block block= null;		if (outer.getNodeType() == ASTNode.BLOCK) {			block= (Block) outer;			outer= block.getParent();		}				ASTNode body= null;		String label= null;		if (outer instanceof IfStatement) {			IfStatement ifStatement= (IfStatement) outer;			Statement elseBlock= ifStatement.getElseStatement();			if (elseBlock == null || ((elseBlock instanceof Block) && ((Block) elseBlock).statements().isEmpty())) {				body= ifStatement.getThenStatement();			}			label= CorrectionMessages.getString("QuickAssistProcessor.unwrap.ifstatement");	 //$NON-NLS-1$		} else if (outer instanceof WhileStatement) {			body=((WhileStatement) outer).getBody();			label= CorrectionMessages.getString("QuickAssistProcessor.unwrap.whilestatement");	 //$NON-NLS-1$		} else if (outer instanceof ForStatement) {			body=((ForStatement) outer).getBody();			label= CorrectionMessages.getString("QuickAssistProcessor.unwrap.forstatement");	 //$NON-NLS-1$		} else if (outer instanceof DoStatement) {			body=((DoStatement) outer).getBody();			label= CorrectionMessages.getString("QuickAssistProcessor.unwrap.dostatement");	 //$NON-NLS-1$		} else if (outer instanceof TryStatement) {			TryStatement tryStatement= (TryStatement) outer;			if (tryStatement.catchClauses().isEmpty()) {				body= tryStatement.getBody();			}			label= CorrectionMessages.getString("QuickAssistProcessor.unwrap.trystatement");	 //$NON-NLS-1$		} else if (outer instanceof AnonymousClassDeclaration) {			List decls= ((AnonymousClassDeclaration) outer).bodyDeclarations();			for (int i= 0; i < decls.size(); i++) {				ASTNode elem= (ASTNode) decls.get(i);				if (elem instanceof MethodDeclaration) {					Block curr= ((MethodDeclaration) elem).getBody();					if (curr != null && !curr.statements().isEmpty()) {						if (body != null) {							return false;						}						body= curr;					}				} else if (elem instanceof TypeDeclaration) {					return false;				}			}			label= CorrectionMessages.getString("QuickAssistProcessor.unwrap.anonymous");	 //$NON-NLS-1$			outer= ASTResolving.findParentStatement(outer);		} else if (outer instanceof Block) {			//	-> a block in a block			body= block;			outer= block;			label= CorrectionMessages.getString("QuickAssistProcessor.unwrap.block");	 //$NON-NLS-1$		} else if (outer instanceof ParenthesizedExpression) {			ParenthesizedExpression expression= (ParenthesizedExpression) outer;			body= expression.getExpression();			label= CorrectionMessages.getString("QuickAssistProcessor.unwrap.parenthesis");	 //$NON-NLS-1$		} else if (outer instanceof MethodInvocation) {			MethodInvocation invocation= (MethodInvocation) outer;			if (invocation.arguments().size() == 1) {				body= (ASTNode) invocation.arguments().get(0);				if (invocation.getParent().getNodeType() == ASTNode.EXPRESSION_STATEMENT) {					int kind= body.getNodeType();					if (kind != ASTNode.ASSIGNMENT && kind != ASTNode.PREFIX_EXPRESSION && kind != ASTNode.POSTFIX_EXPRESSION							&& kind != ASTNode.METHOD_INVOCATION && kind != ASTNode.SUPER_METHOD_INVOCATION) {						body= null;					}				}				label= CorrectionMessages.getString("QuickAssistProcessor.unwrap.methodinvocation");	 //$NON-NLS-1$			}		}		if (body == null) {			return false; 		}		ASTRewrite rewrite= new ASTRewrite(outer.getParent());		ASTNode inner= getCopyOfInner(rewrite, body);		if (inner == null) {			return false;		}		if (resultingCollections == null) {			return true;		}					rewrite.markAsReplaced(outer, inner);		Image image= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_EXCEPTION);		ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 1, image);		proposal.ensureNoModifications();		resultingCollections.add(proposal);		return true;	}