private void addCompletionsForTypesInTargetModule(final List<Completion> completions, final String optionContext, final Pom targetModule, final String heading, final String prefix, final String formattedPrefix, final String topLevelPackage, final String basePackage) { final Collection<JavaType> typesInModule = getTypesForModule(optionContext, targetModule); completions.add(new Completion(prefix + topLevelPackage, formattedPrefix + topLevelPackage, heading, 1)); for (final JavaType javaType : typesInModule) { String type = javaType.getFullyQualifiedTypeName(); if (type.startsWith(basePackage)) { type = StringUtils.replace(type, topLevelPackage, TOP_LEVEL_PACKAGE_SYMBOL, 1); completions.add(new Completion(prefix + type, formattedPrefix + type, heading, 1)); } } }