Skip to content

Commit 0feb1d5

Browse files
Merge pull request #602 from gjsjohnmurray/fix-599
fix #599 use `contributes/resourceLabelFormatters` instead of proposed API
2 parents 4e0249d + efd9f3b commit 0feb1d5

File tree

2 files changed

+26
-27
lines changed

2 files changed

+26
-27
lines changed

package.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,32 @@
994994
}
995995
]
996996
}
997+
],
998+
"resourceLabelFormatters": [
999+
{
1000+
"scheme": "isfs",
1001+
"authority": "*",
1002+
"formatting": {
1003+
"label": "${authority}:${path}",
1004+
"separator": "/"
1005+
}
1006+
},
1007+
{
1008+
"scheme": "isfs-readonly",
1009+
"authority": "*",
1010+
"formatting": {
1011+
"label": "${authority}:${path}",
1012+
"separator": "/"
1013+
}
1014+
},
1015+
{
1016+
"scheme": "objectscript",
1017+
"authority": "*",
1018+
"formatting": {
1019+
"label": "${path} (read-only)",
1020+
"separator": "/"
1021+
}
1022+
}
9971023
]
9981024
},
9991025
"scripts": {

src/extension.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -580,33 +580,6 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
580580
packageJson.enableProposedApi && typeof vscode.workspace.registerTextSearchProvider === "function"
581581
? vscode.workspace.registerTextSearchProvider(FILESYSTEM_READONLY_SCHEMA, new TextSearchProvider())
582582
: null,
583-
packageJson.enableProposedApi && typeof vscode.workspace.registerResourceLabelFormatter === "function"
584-
? vscode.workspace.registerResourceLabelFormatter({
585-
scheme: FILESYSTEM_SCHEMA,
586-
formatting: {
587-
label: "${authority}:${path}",
588-
separator: "/",
589-
},
590-
})
591-
: null,
592-
packageJson.enableProposedApi && typeof vscode.workspace.registerResourceLabelFormatter === "function"
593-
? vscode.workspace.registerResourceLabelFormatter({
594-
scheme: FILESYSTEM_READONLY_SCHEMA,
595-
formatting: {
596-
label: "${authority}:${path}",
597-
separator: "/",
598-
},
599-
})
600-
: null,
601-
packageJson.enableProposedApi && typeof vscode.workspace.registerResourceLabelFormatter === "function"
602-
? vscode.workspace.registerResourceLabelFormatter({
603-
scheme: OBJECTSCRIPT_FILE_SCHEMA,
604-
formatting: {
605-
label: "${path} (read-only)",
606-
separator: "/",
607-
},
608-
})
609-
: null,
610583
].filter(notNull);
611584

612585
if (proposed.length > 0) {

0 commit comments

Comments
 (0)