File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/main/java/com/github/_1c_syntax/bsl/languageserver/context/computer Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ public SymbolTree compute() {
64
64
currentParent = placeSymbol (topLevelSymbols , currentParent , symbol );
65
65
}
66
66
67
+ collapseChildrenCollection (moduleSymbol );
68
+
67
69
return new SymbolTree (moduleSymbol );
68
70
}
69
71
@@ -89,4 +91,12 @@ private static SourceDefinedSymbol placeSymbol(
89
91
return placeSymbol (topLevelSymbols , maybeParent .get (), symbol );
90
92
}
91
93
94
+ private static void collapseChildrenCollection (SourceDefinedSymbol symbol ) {
95
+ var children = symbol .getChildren ();
96
+ if (children instanceof ArrayList ) {
97
+ ((ArrayList <SourceDefinedSymbol >) children ).trimToSize ();
98
+ }
99
+
100
+ children .forEach (SymbolTreeComputer ::collapseChildrenCollection );
101
+ }
92
102
}
You can’t perform that action at this time.
0 commit comments