PrefixMatcher (@NotNull LookupElement item) { PrefixMatcher matcher = item.getUserData(myMatcherKey); if (matcher == null) { throw new AssertionError("Item not in lookup: item=" + item + "; lookup items=" + myItems); } return matcher; }