private void createParseFailureClassification(GraphRewrite event, EvaluationContext context, XmlFileModel sourceFile) { sourceFile.setGenerateSourceReport(true); ClassificationService classificationService = new ClassificationService(event.getGraphContext()); ClassificationModel model = classificationService.attachClassification(event, context, sourceFile, XmlFileModel.NOT_VALID_XML, null); model.setEffort(0); // do not rely on default 0 value and set it that transparently IssueCategoryRegistry issueCategoryRegistry = IssueCategoryRegistry.instance(event.getRewriteContext()); model.setIssueCategory(issueCategoryRegistry.loadFromGraph(event.getGraphContext(), IssueCategoryRegistry.POTENTIAL)); TagSetService tagSetService = new TagSetService(event.getGraphContext()); model.setTagModel(tagSetService.getOrCreate(event, Collections.singleton(NOT_VALID_XML_TAG))); } }
private void createParseFailureClassification(GraphRewrite event, EvaluationContext context, XmlFileModel sourceFile) { sourceFile.setGenerateSourceReport(true); ClassificationService classificationService = new ClassificationService(event.getGraphContext()); ClassificationModel model = classificationService.attachClassification(event, context, sourceFile, XmlFileModel.NOT_VALID_XML, null); model.setEffort(0); // do not rely on default 0 value and set it that transparently IssueCategoryRegistry issueCategoryRegistry = IssueCategoryRegistry.instance(event.getRewriteContext()); model.setIssueCategory(issueCategoryRegistry.loadFromGraph(event.getGraphContext(), IssueCategoryRegistry.POTENTIAL)); TagSetService tagSetService = new TagSetService(event.getGraphContext()); model.setTagModel(tagSetService.getOrCreate(event, Collections.singleton(NOT_VALID_XML_TAG))); } }
classification.setTagModel(tagSetService.getOrCreate(event, tags));
classification.setTagModel(tagSetService.getOrCreate(event, tags));