Comparable (T element) { return ReadAction.compute(() -> { String elementText = getElementText(element); String containerText = getContainerText(element, elementText); TextWithIcon moduleTextWithIcon = getModuleTextWithIcon(element); return (containerText == null ? elementText : elementText + " " + containerText) + (moduleTextWithIcon != null ? " " + moduleTextWithIcon.getText() : ""); }); }