String (@NotNull List<String> modules) { final int maxModulesToShow = 10; List<String> actualNamesToInclude = new ArrayList<>(ContainerUtil.getFirstItems(modules, maxModulesToShow)); if (modules.size() > maxModulesToShow) { actualNamesToInclude.add(JavaCompilerBundle.message("error.jdk.module.names.overflow.element.ellipsis")); } return NlsMessages.formatNarrowAndList(actualNamesToInclude); }