svoid gazelle_splitMultiRule(S ruleID) { PairS p = dm_textAndCommentForRule(ruleID); if (p == null) ret; LPair lines = ai_findDoubleArrowRulesAsPairs(p.a); Set textsNeeded = asSet(mapPairsToList gazelle_constructRuleText(lines)); S extractedComment = "extracted from multi-rule " + ruleID; S deployedPrefix = "deployed as rule "; LS coreComments = withoutLine(tlft(t.b), "multi-rule"); L rules = dm_gazelle_allRulesWithComment(extractedComment); LS allComments = withoutStartingWithIC(tlft(p.b), deployedPrefix); S commentsForDeployed = lines_rtrim(listPlus(coreComments, extractedComment)); new LS deployed; for (T3S t : rules) if (!textsNeeded.remove(t.a)) gazelle_deleteRule(t.c); else { gazelle_setRuleComment(t.c, commentsForDeployed); deployed.add(t.c); } for (S text : textsNeeded) deployed.add(dm_gazelle_addRuleWithComment(text, commentsForDeployed).a); for (S deployedID : deployed) allComments.add(deployedPrefix + deployedID); gazelle_setRuleComment(ruleID, allComments); }