本文整理汇总了Java中edu.umd.cs.findbugs.workflow.Update类的典型用法代码示例。如果您正苦于以下问题:Java Update类的具体用法?Java Update怎么用?Java Update使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Update类属于edu.umd.cs.findbugs.workflow包,在下文中一共展示了Update类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: redoAnalysisKeepComments
import edu.umd.cs.findbugs.workflow.Update; //导入依赖的package包/类
/**
* Does what it says it does, hit apple r (control r on pc) and the analysis
* is redone using the current project
*
* @param p
* @return the bugs from the reanalysis, or null if canceled
*/
public static @CheckForNull
BugCollection redoAnalysisKeepComments(@Nonnull Project p) {
if (p == null)
throw new NullPointerException("null project");
BugCollection current = MainFrame.getInstance().getBugCollection();
Update update = new Update();
RedoAnalysisCallback ac = new RedoAnalysisCallback();
new AnalyzingDialog(p, ac, true);
if (!ac.finished)
return null;
if (current == null)
current = ac.getBugCollection();
else {
current = update.mergeCollections(current, ac.getBugCollection(), true, false);
if (current.hasDeadBugs()) {
addDeadBugMatcher(current);
}
}
return current;
}
示例2: mergeBugCollections
import edu.umd.cs.findbugs.workflow.Update; //导入依赖的package包/类
private SortedBugCollection mergeBugCollections(SortedBugCollection firstCollection, SortedBugCollection secondCollection,
boolean incremental) {
Update update = new Update();
// TODO copyDeadBugs must be true, otherwise incremental compile leads
// to
// unknown bug instances appearing (merged collection doesn't contain
// all bugs)
boolean copyDeadBugs = incremental;
SortedBugCollection merged = (SortedBugCollection) (update.mergeCollections(firstCollection, secondCollection,
copyDeadBugs, incremental));
return merged;
}