本文整理汇总了Java中org.eclipse.egit.github.core.Comment.setBodyHtml方法的典型用法代码示例。如果您正苦于以下问题:Java Comment.setBodyHtml方法的具体用法?Java Comment.setBodyHtml怎么用?Java Comment.setBodyHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.egit.github.core.Comment
的用法示例。
在下文中一共展示了Comment.setBodyHtml方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import org.eclipse.egit.github.core.Comment; //导入方法依赖的package包/类
@Override
public FullGist run(Account account) throws Exception {
Gist gist = store.refreshGist(id);
List<Comment> comments;
if (gist.getComments() > 0)
comments = service.getComments(id);
else
comments = Collections.emptyList();
for (Comment comment : comments) {
String formatted = HtmlUtils.format(comment.getBodyHtml())
.toString();
comment.setBodyHtml(formatted);
imageGetter.encode(comment, formatted);
}
return new FullGist(gist, service.isStarred(id), comments);
}
示例2: run
import org.eclipse.egit.github.core.Comment; //导入方法依赖的package包/类
@Override
public FullIssue run(Account account) throws Exception {
Issue issue = store.refreshIssue(repositoryId, issueNumber);
bodyImageGetter.encode(issue.getId(), issue.getBodyHtml());
List<Comment> comments;
if (issue.getComments() > 0)
comments = service.getComments(repositoryId, issueNumber);
else
comments = Collections.emptyList();
for (Comment comment : comments) {
String formatted = HtmlUtils.format(comment.getBodyHtml())
.toString();
comment.setBodyHtml(formatted);
commentImageGetter.encode(comment.getId(), formatted);
}
return new FullIssue(issue, comments);
}
示例3: run
import org.eclipse.egit.github.core.Comment; //导入方法依赖的package包/类
@Override
public Comment run(Account account) throws Exception {
Comment created = service.createComment(id, comment);
String formatted = HtmlUtils.format(created.getBodyHtml()).toString();
created.setBodyHtml(formatted);
return created;
}
示例4: run
import org.eclipse.egit.github.core.Comment; //导入方法依赖的package包/类
@Override
protected Comment run(Account account) throws Exception {
Comment created = service.createComment(repository, issueNumber,
comment);
String formatted = HtmlUtils.format(created.getBodyHtml()).toString();
created.setBodyHtml(formatted);
return created;
}