* @param newCommentText the new value
*/
@SuppressWarnings("rawtypes")
public static void setCommentText(Doc doc, String newCommentText) throws Exception{
ObjectAnalyzer analyzer = new ObjectAnalyzer(doc);
Object comment = analyzer.getPrivateField("comment");
if (comment != null){
ObjectAnalyzer commentanalyzer = new ObjectAnalyzer(comment);
commentanalyzer.setPrivateField("text", newCommentText);
} else {
doc.setRawCommentText(newCommentText);
comment = doc.commentText();
}