@@ -7,7 +7,13 @@ const { workspace, window } = vscode;
77export const OBJECTSCRIPT_FILE_SCHEMA = "objectscript" ;
88export const OBJECTSCRIPTXML_FILE_SCHEMA = "objectscriptxml" ;
99export const FILESYSTEM_SCHEMA = "isfs" ;
10- export const schemas = [ OBJECTSCRIPT_FILE_SCHEMA , OBJECTSCRIPTXML_FILE_SCHEMA , FILESYSTEM_SCHEMA ] ;
10+ export const FILESYSTEM_READONLY_SCHEMA = "isfs-readonly" ;
11+ export const schemas = [
12+ OBJECTSCRIPT_FILE_SCHEMA ,
13+ OBJECTSCRIPTXML_FILE_SCHEMA ,
14+ FILESYSTEM_SCHEMA ,
15+ FILESYSTEM_READONLY_SCHEMA ,
16+ ] ;
1117
1218import * as url from "url" ;
1319import WebSocket = require( "ws" ) ;
@@ -380,9 +386,15 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
380386 packageJson . enableProposedApi && typeof vscode . workspace . registerFileSearchProvider === "function"
381387 ? vscode . workspace . registerFileSearchProvider ( FILESYSTEM_SCHEMA , new FileSearchProvider ( ) )
382388 : null ,
389+ packageJson . enableProposedApi && typeof vscode . workspace . registerFileSearchProvider === "function"
390+ ? vscode . workspace . registerFileSearchProvider ( FILESYSTEM_READONLY_SCHEMA , new FileSearchProvider ( ) )
391+ : null ,
383392 packageJson . enableProposedApi && typeof vscode . workspace . registerTextSearchProvider === "function"
384393 ? vscode . workspace . registerTextSearchProvider ( FILESYSTEM_SCHEMA , new TextSearchProvider ( ) )
385394 : null ,
395+ packageJson . enableProposedApi && typeof vscode . workspace . registerTextSearchProvider === "function"
396+ ? vscode . workspace . registerTextSearchProvider ( FILESYSTEM_READONLY_SCHEMA , new TextSearchProvider ( ) )
397+ : null ,
386398 ] . filter ( notNull ) ;
387399
388400 context . subscriptions . push (
@@ -518,7 +530,13 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
518530
519531 vscode . workspace . registerTextDocumentContentProvider ( OBJECTSCRIPT_FILE_SCHEMA , documentContentProvider ) ,
520532 vscode . workspace . registerTextDocumentContentProvider ( OBJECTSCRIPTXML_FILE_SCHEMA , xmlContentProvider ) ,
521- vscode . workspace . registerFileSystemProvider ( FILESYSTEM_SCHEMA , fileSystemProvider , { isCaseSensitive : true } ) ,
533+ vscode . workspace . registerFileSystemProvider ( FILESYSTEM_SCHEMA , fileSystemProvider , {
534+ isCaseSensitive : true ,
535+ } ) ,
536+ vscode . workspace . registerFileSystemProvider ( FILESYSTEM_READONLY_SCHEMA , fileSystemProvider , {
537+ isCaseSensitive : true ,
538+ isReadonly : true ,
539+ } ) ,
522540 vscode . languages . setLanguageConfiguration ( "objectscript-class" , getLanguageConfiguration ( "class" ) ) ,
523541 vscode . languages . setLanguageConfiguration ( "objectscript" , getLanguageConfiguration ( "routine" ) ) ,
524542 vscode . languages . setLanguageConfiguration ( "objectscript-macros" , getLanguageConfiguration ( "routine" ) ) ,
0 commit comments