public static ASTNode findParentType(ASTNode node) { while ((node != null) && !(node instanceof AbstractTypeDeclaration) && !(node instanceof AnonymousClassDeclaration)) {
public static ASTNode findParentType(ASTNode node, boolean treatModifiersOutside) { StructuralPropertyDescriptor lastLocation= null;  while (node != null) { if (node instanceof AbstractTypeDeclaration) { AbstractTypeDeclaration decl= (AbstractTypeDeclaration) node; if (!treatModifiersOutside || lastLocation != decl.getModifiersProperty()) { return decl; } } else if (node instanceof AnonymousClassDeclaration) { return node; } lastLocation= node.getLocationInParent();
	public static ASTNode findParentType(ASTNode node) {		while ((node != null) && !(node instanceof AbstractTypeDeclaration) && !(node instanceof AnonymousClassDeclaration)) {			node= node.getParent();		}		return node;	}