}
}
// the main workhorse
private void convertRuleFile() {
RuleConverter rc = getCurrentRuleConverter();
this.rulesBox.removeAllItems();
try {
// the generic rule objects, just used for building the other lists
rc.parseRuleFile();
ruleObjects = rc.getRules();
// lists of strings
allRulesList = rc.getAllLtRules();
// rules in LT format, as strings
ruleStrings = new ArrayList<String>();
// original rule strings
originalRuleStrings = rc.getOriginalRuleStrings();
// warnings
warnings = rc.getWarnings();
// populating the string lists
for (int i = 0; i < allRulesList.size(); i++) {
List<String> ruleList = allRulesList.get(i);
String ruleString = RuleConverter
.getRuleStringFromList(ruleList);
ruleStrings.add(ruleString);
}
// take out exact copies of rules (this messes up navigating through
// the rules with the arrow keys)
removeDuplicateRules();
disambigRuleIndices = new boolean[allRulesList.size()];
// list of existing LT rules that cover the new rules
coveredByList = new ArrayList<String[]>();
numberOfRules = allRulesList.size();
numRulesPane.setText(Integer.toString(numberOfRules));
for (int i = 0; i < ruleObjects.size(); i++) {
Object ruleObject = ruleObjects.get(i);
if (rc.isDisambiguationRule(ruleObject)) {
disambigRuleIndices[i] = true;
} else {
disambigRuleIndices[i] = false;
}
coveredByList.add(new String[0]);