Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

Expand Down Expand Up @@ -120,20 +120,12 @@ public static Map<String, Map<String, Artifact>> artifacts(Project project) {
.forEach(artifact -> {
String category = Artifact.getCategory(artifact.type());
String artifactId = artifact.id();
artifactMap.computeIfAbsent(category, k -> new HashMap<>()).put(artifactId, artifact);
artifactMap.computeIfAbsent(category, k -> new TreeMap<>()).put(artifactId, artifact);
idMap.computeIfAbsent(category, k -> new ArrayList<>()).add(artifactId);
});
documentMap.put(document.name(), idMap);
});

artifactMap.forEach((category, artifacts) -> {
Map<String, Artifact> sortedArtifacts = new LinkedHashMap<>();
artifacts.entrySet().stream()
.sorted(Map.Entry.comparingByKey())
.forEach(entry -> sortedArtifacts.put(entry.getKey(), entry.getValue()));
artifactMap.put(category, sortedArtifacts);
});

ArtifactsCache.getInstance().initializeProject(project.sourceRoot().toString(), documentMap);
return artifactMap;
}
Expand Down
Loading