shouldBeIncluded = false;
for (int i = 0; i < valueProposals.length(); i++) {
if (valueProposals.get(i).startsWith(incomplete)
&& (isRepeatingProperty || !inExistingValues(
currentValue, valuesAndSpecialValuesBefore, valuesAndSpecialValuesAfter))) {
proposals.add(new AutocompleteProposal(valueProposals.get(i)));
}
}
}
} else {
shouldBeIncluded = true;
}
} else {
for (int keyTriggerCt = 0; keyTriggerCt < keyTriggerSet.length(); keyTriggerCt++) {
String triggerValue = keyTriggerSet.get(keyTriggerCt);
int triggerSlot = triggers.<Jso>cast().getIntField(triggerValue);
if (triggerValue.charAt(0) == '<') {
JsArrayString specialValueProposalsAfterCheck =
checkIfSpecialValueAndGetSpecialValueProposals(
valuesBefore.get(triggerSlot), triggerValue);
if (specialValueProposalsAfterCheck.length() != 0) {
shouldBeIncluded = false;
for (int i = 0; i < specialValueProposalsAfterCheck.length(); i++) {
if (specialValueProposalsAfterCheck.get(i).startsWith(incomplete)
&& (isRepeatingProperty
|| !inExistingValues(triggerValue, valuesAndSpecialValuesBefore,
valuesAndSpecialValuesAfter))) {
proposals.add(new AutocompleteProposal(specialValueProposalsAfterCheck.get(i)));
}
}
}
} else if (valuesBefore.get(triggerSlot).compareTo(triggerValue) == 0) {
shouldBeIncluded = true;
}
}
}
if (shouldBeIncluded) {
if (currentValue.startsWith(incomplete) && (isRepeatingProperty || !inExistingValues(
currentValue, valuesAndSpecialValuesBefore, valuesAndSpecialValuesAfter))) {
proposals.add(new AutocompleteProposal(currentValue));
}
}
}
}
return proposals;