boolean (@NotNull @NlsSafe final String key, @Nullable @NonNls final String id) { return ContainerUtil.or(getElements(), template -> key.equals(template.getKey()) || id != null && id.equals(template.getId())); }