@@ -14,7 +14,7 @@ import { FIND_IDS, FindModelBoundToEditorModel, ToggleCaseSensitiveKeybinding, T
1414import { FindReplaceState , FindReplaceStateChangedEvent , INewFindReplaceState } from 'vs/editor/contrib/find/findState' ;
1515import { Delayer } from 'vs/base/common/async' ;
1616import { EditorContextKeys } from 'vs/editor/common/editorContextKeys' ;
17- import { INextStorage2Service , StorageScope } from 'vs/platform/storage2/common/storage2' ;
17+ import { IStorageService , StorageScope } from 'vs/platform/storage2/common/storage2' ;
1818import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService' ;
1919import { IContextViewService } from 'vs/platform/contextview/browser/contextView' ;
2020import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding' ;
@@ -72,7 +72,7 @@ export class CommonFindController extends Disposable implements editorCommon.IEd
7272 protected _state : FindReplaceState ;
7373 protected _updateHistoryDelayer : Delayer < void > ;
7474 private _model : FindModelBoundToEditorModel ;
75- private _nextStorage2Service : INextStorage2Service ;
75+ private storageService : IStorageService ;
7676 private _clipboardService : IClipboardService ;
7777 protected readonly _contextKeyService : IContextKeyService ;
7878
@@ -83,14 +83,14 @@ export class CommonFindController extends Disposable implements editorCommon.IEd
8383 constructor (
8484 editor : ICodeEditor ,
8585 @IContextKeyService contextKeyService : IContextKeyService ,
86- @INextStorage2Service nextStorage2Service : INextStorage2Service ,
86+ @IStorageService storageService : IStorageService ,
8787 @IClipboardService clipboardService : IClipboardService
8888 ) {
8989 super ( ) ;
9090 this . _editor = editor ;
9191 this . _findWidgetVisible = CONTEXT_FIND_WIDGET_VISIBLE . bindTo ( contextKeyService ) ;
9292 this . _contextKeyService = contextKeyService ;
93- this . _nextStorage2Service = nextStorage2Service ;
93+ this . storageService = storageService ;
9494 this . _clipboardService = clipboardService ;
9595
9696 this . _updateHistoryDelayer = new Delayer < void > ( 500 ) ;
@@ -107,9 +107,9 @@ export class CommonFindController extends Disposable implements editorCommon.IEd
107107
108108 this . _state . change ( {
109109 searchScope : null ,
110- matchCase : this . _nextStorage2Service . getBoolean ( 'editor.matchCase' , StorageScope . WORKSPACE , false ) ,
111- wholeWord : this . _nextStorage2Service . getBoolean ( 'editor.wholeWord' , StorageScope . WORKSPACE , false ) ,
112- isRegex : this . _nextStorage2Service . getBoolean ( 'editor.isRegex' , StorageScope . WORKSPACE , false )
110+ matchCase : this . storageService . getBoolean ( 'editor.matchCase' , StorageScope . WORKSPACE , false ) ,
111+ wholeWord : this . storageService . getBoolean ( 'editor.wholeWord' , StorageScope . WORKSPACE , false ) ,
112+ isRegex : this . storageService . getBoolean ( 'editor.isRegex' , StorageScope . WORKSPACE , false )
113113 } , false ) ;
114114
115115 if ( shouldRestartFind ) {
@@ -159,21 +159,21 @@ export class CommonFindController extends Disposable implements editorCommon.IEd
159159
160160 private saveQueryState ( e : FindReplaceStateChangedEvent ) {
161161 if ( e . isRegex ) {
162- this . _nextStorage2Service . set ( 'editor.isRegex' , this . _state . actualIsRegex , StorageScope . WORKSPACE ) ;
162+ this . storageService . set ( 'editor.isRegex' , this . _state . actualIsRegex , StorageScope . WORKSPACE ) ;
163163 }
164164 if ( e . wholeWord ) {
165- this . _nextStorage2Service . set ( 'editor.wholeWord' , this . _state . actualWholeWord , StorageScope . WORKSPACE ) ;
165+ this . storageService . set ( 'editor.wholeWord' , this . _state . actualWholeWord , StorageScope . WORKSPACE ) ;
166166 }
167167 if ( e . matchCase ) {
168- this . _nextStorage2Service . set ( 'editor.matchCase' , this . _state . actualMatchCase , StorageScope . WORKSPACE ) ;
168+ this . storageService . set ( 'editor.matchCase' , this . _state . actualMatchCase , StorageScope . WORKSPACE ) ;
169169 }
170170 }
171171
172172 private loadQueryState ( ) {
173173 this . _state . change ( {
174- matchCase : this . _nextStorage2Service . getBoolean ( 'editor.matchCase' , StorageScope . WORKSPACE , this . _state . matchCase ) ,
175- wholeWord : this . _nextStorage2Service . getBoolean ( 'editor.wholeWord' , StorageScope . WORKSPACE , this . _state . wholeWord ) ,
176- isRegex : this . _nextStorage2Service . getBoolean ( 'editor.isRegex' , StorageScope . WORKSPACE , this . _state . isRegex )
174+ matchCase : this . storageService . getBoolean ( 'editor.matchCase' , StorageScope . WORKSPACE , this . _state . matchCase ) ,
175+ wholeWord : this . storageService . getBoolean ( 'editor.wholeWord' , StorageScope . WORKSPACE , this . _state . wholeWord ) ,
176+ isRegex : this . storageService . getBoolean ( 'editor.isRegex' , StorageScope . WORKSPACE , this . _state . isRegex )
177177 } , false ) ;
178178 }
179179
@@ -366,10 +366,10 @@ export class FindController extends CommonFindController implements IFindControl
366366 @IContextKeyService _contextKeyService : IContextKeyService ,
367367 @IKeybindingService private readonly _keybindingService : IKeybindingService ,
368368 @IThemeService private readonly _themeService : IThemeService ,
369- @INextStorage2Service nextStorage2Service : INextStorage2Service ,
369+ @IStorageService storageService : IStorageService ,
370370 @optional ( IClipboardService ) clipboardService : IClipboardService
371371 ) {
372- super ( editor , _contextKeyService , nextStorage2Service , clipboardService ) ;
372+ super ( editor , _contextKeyService , storageService , clipboardService ) ;
373373 }
374374
375375 protected _start ( opts : IFindStartOptions ) : void {
0 commit comments