private boolean getCatchClauseToThrowsProposals(IAssistContext context, ASTNode node, Collection resultingCollections) throws CoreException {
private boolean getCatchClauseToThrowsProposals(IInvocationContext context, ASTNode node, Collection resultingCollections) throws CoreException {
	private boolean getCatchClauseToThrowsProposals(IAssistContext context, ASTNode node, Collection resultingCollections) throws CoreException {		CatchClause catchClause= (CatchClause) ASTResolving.findAncestor(node, ASTNode.CATCH_CLAUSE);		if (catchClause == null) {			return false;		}		Type type= catchClause.getException().getType();		if (!type.isSimpleType()) {			return false;		}				BodyDeclaration bodyDeclaration= ASTResolving.findParentBodyDeclaration(catchClause);		if (!(bodyDeclaration instanceof MethodDeclaration)) {			return false;		}				if (resultingCollections == null) {			return true;		}				MethodDeclaration methodDeclaration= (MethodDeclaration) bodyDeclaration;				ASTRewrite rewrite= new ASTRewrite(methodDeclaration);		AST ast= methodDeclaration.getAST();				TryStatement tryStatement= (TryStatement) catchClause.getParent();		if (tryStatement.catchClauses().size() > 1 || tryStatement.getFinally() != null) {			rewrite.markAsRemoved(catchClause);		} else {			List statements= tryStatement.getBody().statements();			if (statements.size() > 0) {				ASTNode placeholder= rewrite.collapseNodes(statements, 0, statements.size());				rewrite.markAsReplaced(tryStatement, rewrite.createCopy(placeholder));			} else {				rewrite.markAsRemoved(tryStatement);			}		}		ITypeBinding binding= type.resolveBinding();		if (binding == null || isNotYetThrown(binding, methodDeclaration.thrownExceptions())) {			Name name= ((SimpleType) type).getName();			Name newName= (Name) ASTNode.copySubtree(ast, name);			rewrite.markAsInserted(newName);			methodDeclaration.thrownExceptions().add(newName);		}						String label= CorrectionMessages.getString("QuickAssistProcessor.catchclausetothrows.description"); //$NON-NLS-1$		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;	}