@@ -65,11 +65,6 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient i
6565
6666 openExtensionDevelopmentHostWindow ( args : string [ ] , env : IProcessEnvironment ) : Promise < void > {
6767
68- if ( ! this . workspaceProvider . payload ) {
69- // TODO@Ben remove me once environment is adopted
70- return this . openExtensionDevelopmentHostWindowLegacy ( args ) ;
71- }
72-
7368 // Find out which workspace to open debug window on
7469 let debugWorkspace : IWorkspace = undefined ;
7570 const folderUriArg = this . findArgument ( 'folder-uri' , args ) ;
@@ -117,66 +112,6 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient i
117112 } ) ;
118113 }
119114
120- private openExtensionDevelopmentHostWindowLegacy ( args : string [ ] ) : Promise < void > {
121- // we pass the "args" as query parameters of the URL
122-
123- let newAddress = `${ document . location . origin } ${ document . location . pathname } ?` ;
124- let gotFolder = false ;
125-
126- const addQueryParameter = ( key : string , value : string ) => {
127- const lastChar = newAddress . charAt ( newAddress . length - 1 ) ;
128- if ( lastChar !== '?' && lastChar !== '&' ) {
129- newAddress += '&' ;
130- }
131- newAddress += `${ key } =${ encodeURIComponent ( value ) } ` ;
132- } ;
133-
134- const findArgument = ( key : string ) => {
135- for ( let a of args ) {
136- const k = `--${ key } =` ;
137- if ( a . indexOf ( k ) === 0 ) {
138- return a . substr ( k . length ) ;
139- }
140- }
141- return undefined ;
142- } ;
143-
144- const f = findArgument ( 'folder-uri' ) ;
145- if ( f ) {
146- const u = URI . parse ( f ) ;
147- gotFolder = true ;
148- addQueryParameter ( 'folder' , u . path ) ;
149- }
150- if ( ! gotFolder ) {
151- // request empty window
152- addQueryParameter ( 'ew' , 'true' ) ;
153- }
154-
155- const ep = findArgument ( 'extensionDevelopmentPath' ) ;
156- if ( ep ) {
157- addQueryParameter ( 'extensionDevelopmentPath' , ep ) ;
158- }
159-
160- const etp = findArgument ( 'extensionTestsPath' ) ;
161- if ( etp ) {
162- addQueryParameter ( 'extensionTestsPath' , etp ) ;
163- }
164-
165- const di = findArgument ( 'debugId' ) ;
166- if ( di ) {
167- addQueryParameter ( 'debugId' , di ) ;
168- }
169-
170- const ibe = findArgument ( 'inspect-brk-extensions' ) ;
171- if ( ibe ) {
172- addQueryParameter ( 'inspect-brk-extensions' , ibe ) ;
173- }
174-
175- window . open ( newAddress ) ;
176-
177- return Promise . resolve ( ) ;
178- }
179-
180115 private findArgument ( key : string , args : string [ ] ) : string | undefined {
181116 for ( const a of args ) {
182117 const k = `--${ key } =` ;
0 commit comments