82
83
asCanonicalUri(uri: URI): URI {
85
>
// (1) normalize URI
86
>
if (this._fileService.hasProvider(uri)) {
87
>
uri = normalizePath(uri);
88
>
}
89
>
90
>
// (2) find the uri in its canonical form or use this uri to define it
91
>
const uriKey = this.extUri.getComparisonKey(uri, true);
92
>
const item = this._canonicalUris.get(uriKey);
93
>
if (item) {
94
return item.touch().uri.with({ fragment: uri.fragment });
95
}
97
>
// this uri is first and defines the canonical form
98
>
this._canonicalUris.set(uriKey, new Entry(uri));
99
>
this._checkTrim();
100
>
101
>
return uri;
102
>
}
103
104
private _checkTrim(): void {
106
>
return;
107
>
}
108
109
Entry._clock = 1;