private void calculateToLift(LookupElement element) { for (String string : CompletionUtil.iterateLookupStrings(element)) { for (int len = 1; len < string.length(); len++) { String prefix = string.substring(0, len); for (LookupElement shorterElement : myElements.get(prefix)) { if (myCondition.shouldLift(shorterElement, element)) { myToLift.putValue(element, shorterElement); myReversedToLift.putValue(shorterElement, element); } } } } }
private void updateLongerItem(LookupElement shorter, LookupElement longer) { if (myCondition.shouldLift(shorter, longer)) { myToLift.putValue(longer, shorter); myReversedToLift.putValue(shorter, longer); } }