private FunctionDeclaration resolveMethodDeclaration(ASTNode node) {
   if (node instanceof FunctionDeclaration) return (FunctionDeclaration) node;
   JSdoc doc = (JSdoc) ASTNodes.getParent(node, ASTNode.JSDOC);
   if (doc == null) return null;
   if (doc.getParent() instanceof FunctionDeclaration)
     return (FunctionDeclaration) doc.getParent();
   return null;
 }
 private AbstractTypeDeclaration getContainingTypeDeclarationNode()
     throws JavaScriptModelException {
   AbstractTypeDeclaration result =
       (AbstractTypeDeclaration)
           ASTNodes.getParent(
               getSelectedExpression().getAssociatedNode(), AbstractTypeDeclaration.class);
   Assert.isNotNull(result);
   return result;
 }