ASTNode selectedNode= problem.getCoveringNode(context);
ASTNode selectedNode= problem.getCoveringNode(context.getASTRoot());
	public static void getTypeProposals(IAssistContext context, IProblemLocation problem, Collection proposals) throws CoreException {		ICompilationUnit cu= context.getCompilationUnit();				ASTNode selectedNode= problem.getCoveringNode(context);		if (selectedNode == null) {			return;		}		int kind= SimilarElementsRequestor.ALL_TYPES;				ASTNode parent= selectedNode.getParent();		while (parent.getLength() == selectedNode.getLength()) { // get parent of type or variablefragment			parent= parent.getParent(); 		}		switch (parent.getNodeType()) {			case ASTNode.TYPE_DECLARATION:				TypeDeclaration typeDeclaration=(TypeDeclaration) parent;				if (typeDeclaration.superInterfaces().contains(selectedNode)) {										kind= SimilarElementsRequestor.INTERFACES;				} else if (selectedNode.equals(typeDeclaration.getSuperclass())) {					kind= SimilarElementsRequestor.CLASSES;				}				break;			case ASTNode.METHOD_DECLARATION:				MethodDeclaration methodDeclaration= (MethodDeclaration) parent;				if (methodDeclaration.thrownExceptions().contains(selectedNode)) {					kind= SimilarElementsRequestor.CLASSES;				} else if (selectedNode.equals(methodDeclaration.getReturnType())) {					kind= SimilarElementsRequestor.REF_TYPES | SimilarElementsRequestor.VOIDTYPE;				}				break;			case ASTNode.INSTANCEOF_EXPRESSION:				kind= SimilarElementsRequestor.REF_TYPES;				break;			case ASTNode.THROW_STATEMENT:				kind= SimilarElementsRequestor.REF_TYPES;				break;			case ASTNode.CLASS_INSTANCE_CREATION:				if (((ClassInstanceCreation) parent).getAnonymousClassDeclaration() == null) {					kind= SimilarElementsRequestor.CLASSES;				} else {					kind= SimilarElementsRequestor.REF_TYPES;				}				break;			case ASTNode.SINGLE_VARIABLE_DECLARATION:				int superParent= parent.getParent().getNodeType();				if (superParent == ASTNode.CATCH_CLAUSE) {					kind= SimilarElementsRequestor.CLASSES;				}				break;			default:		}						Name node= null;		if (selectedNode instanceof SimpleType) {			node= ((SimpleType) selectedNode).getName();		} else if (selectedNode instanceof ArrayType) {			Type elementType= ((ArrayType) selectedNode).getElementType();			if (elementType.isSimpleType()) {				node= ((SimpleType) elementType).getName();			}		} else if (selectedNode instanceof Name) {			node= (Name) selectedNode;		} else {			return;		}				// change to simlar type proposals		addSimilarTypeProposals(kind, cu, node, 3, proposals);				// add type		addNewTypeProposals(cu, node, kind, 0, proposals);	}