boolean (CompletionParameters parameters, CompletionResultSet result) { Ref<Boolean> hasRef = Ref.create(false); LegacyCompletionContributor.processReferences(parameters, result, (reference, resultSet) -> { if (reference instanceof XmlEnumeratedValueReference) { hasRef.set(true); } }); return hasRef.get(); }