for (TextRulerSlotPattern eachPattern : patterns) {
for (TextRulerRuleItem item : eachPattern.fillerPattern) {
if (item instanceof WhiskRuleItem) {
WhiskRuleItem wri = (WhiskRuleItem) item;
WhiskRule proposedRule = rule;
TextRulerWordConstraint wordConstraint = wri.getWordConstraint();
for (String eachFeature : consideredFeatures) {
if (wordConstraint != null) {
Map<String, String> featureMap = wordConstraint.getTokenAnnotation().getFeatureMap();
String stringValue = featureMap.get(eachFeature);
if (stringValue != null && !wri.getActivatedFeatures().contains(eachFeature)) {
wri.activateFeature(eachFeature);
WhiskRule proposedRuleF = proposedRule.copy();
wri.deactivateFeature(eachFeature);
proposedRuleF.setNeedsCompile(true);
if (!rulesToTest.contains(proposedRuleF)) {
rulesToTest.add(proposedRuleF);
}
}
}
}
if (wordConstraint != null && wordConstraint.isRegExpConstraint() && wri.isHideRegExp()) {
wri.setHideRegExp(false);
WhiskRule proposedRuleF = proposedRule.copy();
wri.setHideRegExp(true);
proposedRuleF.setNeedsCompile(true);
if (!rulesToTest.contains(proposedRuleF)) {