void (@NotNull CompletionParameters parameters, @NotNull ProcessingContext context, @NotNull CompletionResultSet result) { PsiElement mapOrArgumentList = findMapOrArgumentList(parameters); if (mapOrArgumentList == null) { return; } if (isMapKeyCompletion(parameters)) { result.stopHere(); } final Map<String, NamedArgumentDescriptor> map = new HashMap<>(calculateNamedArguments(mapOrArgumentList)); for (GrNamedArgument argument : getSiblingNamedArguments(mapOrArgumentList)) { map.remove(argument.getLabelName()); } for (Map.Entry<String, NamedArgumentDescriptor> entry : map.entrySet()) { LookupElementBuilder lookup = LookupElementBuilder.create(entry.getValue(), entry.getKey()) .withInsertHandler(NamedArgumentInsertHandler.INSTANCE) .withTailText(":"); if (entry.getValue().getPriority() == NamedArgumentDescriptor.Priority.UNLIKELY) { TextAttributes defaultAttributes = GroovySyntaxHighlighter.MAP_KEY.getDefaultAttributes(); if (defaultAttributes != null) { Color fg = defaultAttributes.getForegroundColor(); if (fg != null) { lookup = lookup.withItemTextForeground(fg); } } } else { lookup = lookup.withIcon(IconManager.getInstance().getPlatformIcon(PlatformIcons.Property)); } LookupElement customized = entry.getValue().customizeLookupElement(lookup); result.addElement(customized == null ? lookup : customized); } }