linesSliceCharSequence.ts ×7
Frontier kind: Code frontier
unlabeled · c_bf00c0b9499a
54 tests · 8724 LOC · 52 files · introduces 0 tests · 31 LOC · 3 files
Introduces — evidence that enters the hierarchy at this concept
Code
14 ranges 31 lines · 3 files
Tests
0 tests
Contains — complete concept membership
Neighbourhood graph
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Focus concept
Ancestors (broader)
Descendants (narrower)
Introduced files
Introduced tests
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
JavaScript is disabled; use the native relationship evidence on this page to explore the same evidence.
Native relationship evidence
Every exact file and test below is linked only from the concept that introduces it.
Introduced tests
Every collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Introduced code
Every collected source range enters the hierarchy at exactly one concept.
3 files ranked by introduced lines: 31 introduced LOC across 14 ranges.
Expand a file to inspect source; the > gutter marks introduced lines.
src/vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence.ts 15 introduced LOC · 7 ranges
Open complete file
122
*/
123
public findWordContaining ( offset : number ) : OffsetRange | undefined {
125
return undefined ;
126
}
128
>
if ( ! isWordChar ( this . elements [ offset ])) {
129
>
return undefined ;
130
>
}
131
132
// find start
133
let start = offset ;
135
start -- ;
136
}
138
// find end
139
let end = offset ;
141
end ++ ;
142
}
143
144
return new OffsetRange ( start , end );
146
147
/** fooBar has the two sub-words foo and bar */
175
176
public isStronglyEqual ( offset1 : number , offset2 : number ) : boolean {
178
>
}
179
180
public extendToFullLines ( range : OffsetRange ) : OffsetRange {
185
}
186
188
>
return charCode >= CharCode . a && charCode <= CharCode . z
189
>
|| charCode >= CharCode . A && charCode <= CharCode . Z
190
>
|| charCode >= CharCode . Digit0 && charCode <= CharCode . Digit9 ;
191
>
}
192
193
function isUpperCase ( charCode : number ) : boolean {
src/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.ts 13 introduced LOC · 5 ranges
Open complete file
234
235
function scanWord ( pair : OffsetPair , equalMapping : SequenceDiff ) {
237
return ;
238
}
240
>
const w1 = findParent ( sequence1 , pair . offset1 );
241
>
const w2 = findParent ( sequence2 , pair . offset2 );
242
>
if ( ! w1 || ! w2 ) {
243
>
return ;
244
>
}
245
let w = new SequenceDiff ( w1 , w2 );
246
const equalPart = w . intersect ( equalMapping ) ! ;
278
}
279
280
>
if (( force && equalChars1 + equalChars2 < w . seq1Range . length + w . seq2Range . length ) || equalChars1 + equalChars2 < ( w . seq1Range . length + w . seq2Range . length ) * 2 / 3 ) {
heuristicSequenceOptimizations.ts
281
additional . push ( w );
282
}
283
284
lastPoint = w . getEndExclusives ();
286
287
while ( equalMappings . length > 0 ) {
290
continue ;
291
}
293
>
// The equal parts are not empty, so -1 gives us a character that is equal in both parts.
294
>
scanWord ( next . getEndExclusives (). delta ( - 1 ), next );
295
>
}
296
297
const merged = mergeSequenceDiffs ( sequenceDiffs , additional );
src/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm.ts 3 introduced LOC · 2 ranges
Open complete file
140
141
public delta ( offset : number ) : OffsetPair {
143
return this ;
144
}
145
>
return new OffsetPair ( this . offset1 + offset , this . offset2 + offset );
diffAlgorithm.ts
146
>
}
147
148
public equals ( other : OffsetPair ) : boolean {