/// <summary> /// Returns the comments before the given vhdl element. /// </summary> /// <param name="element">the vhdl element</param> /// <returns>a list of line comments</returns> public static List <string> GetComments(VhdlElement element) { CommentAnnotationBefore annotation = Annotations.getAnnotation <CommentAnnotationBefore>(element); if (annotation == null) { return(new List <string>()); } else { return(annotation.getComments()); } }
/// <summary> /// Sets the comments before a vhdl element. /// </summary> /// <param name="element">the vhdl element</param> /// <param name="comments">a list of line comments</param> public static void SetComments(VhdlElement element, IList <string> comments) { CommentAnnotationBefore annotation = new CommentAnnotationBefore(comments); Annotations.putAnnotation(element, annotation); }