本文整理汇总了Java中edu.umd.cs.findbugs.workflow.Update.mergeCollections方法的典型用法代码示例。如果您正苦于以下问题:Java Update.mergeCollections方法的具体用法?Java Update.mergeCollections怎么用?Java Update.mergeCollections使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.umd.cs.findbugs.workflow.Update
的用法示例。
在下文中一共展示了Update.mergeCollections方法的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;
}