Skip to content

Commit

Permalink
Minor graph legibility improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Dec 28, 2024
1 parent ac97f50 commit 565c440
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public CallGraph newCallGraph(@Nonnull Workspace workspace) {
public CallGraph getCurrentWorkspaceCallGraph() {
CallGraph graph = currentWorkspaceGraph;

// Lazily initialize the graph so that we don't do a full graph
// Lazily initialize the graph so that we don't do a full graph immediately when the workspace is opened.
// It will only initialize when a user needs to use it.
if (!graph.isInitialized())
CompletableFuture.runAsync(graph::initialize);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.LinkedList;
import java.util.Map;
import java.util.Queue;
import java.util.SequencedSet;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
Expand Down Expand Up @@ -297,7 +298,7 @@ public String getCommon(@Nonnull String first, @Nonnull String second) {
if (vertex == null || OBJECT.equals(first) || OBJECT.equals(second))
return OBJECT;

Set<String> firstParents = vertex.allParents()
SequencedSet<String> firstParents = vertex.allParents()
.map(InheritanceVertex::getName)
.collect(Collectors.toCollection(LinkedHashSet::new));
firstParents.add(first);
Expand Down

0 comments on commit 565c440

Please sign in to comment.