@@ -37,9 +37,6 @@ import { Color } from 'vs/base/common/color';
3737import { Constants } from 'vs/base/common/uint' ;
3838import { EditorTheme } from 'vs/editor/common/view/viewContext' ;
3939import { IUndoRedoService } from 'vs/platform/undoRedo/common/undoRedo' ;
40- import { UndoRedoService } from 'vs/platform/undoRedo/common/undoRedoService' ;
41- import { IDialogService } from 'vs/platform/dialogs/common/dialogs' ;
42- import { NoOpNotification , INotificationService } from 'vs/platform/notification/common/notification' ;
4340
4441function createTextBufferBuilder ( ) {
4542 return new PieceTreeTextBufferBuilder ( ) ;
@@ -191,27 +188,6 @@ export class TextModel extends Disposable implements model.ITextModel {
191188 largeFileOptimizations : EDITOR_MODEL_DEFAULTS . largeFileOptimizations ,
192189 } ;
193190
194- public static createFromString ( text : string , options : model . ITextModelCreationOptions = TextModel . DEFAULT_CREATION_OPTIONS , languageIdentifier : LanguageIdentifier | null = null , uri : URI | null = null ) : TextModel {
195- const dialogService = new class implements IDialogService {
196- _serviceBrand : undefined ;
197- confirm ( ) { return Promise . resolve ( { confirmed : false } ) ; }
198- show ( ) { return Promise . resolve ( { choice : 0 } ) ; }
199- about ( ) { return Promise . resolve ( ) ; }
200- } ;
201- const noop = new NoOpNotification ( ) ;
202- const notificationService = new class implements INotificationService {
203- _serviceBrand : undefined ;
204- info ( ) { return noop ; }
205- warn ( ) { return noop ; }
206- error ( ) { return noop ; }
207- notify ( ) { return noop ; }
208- prompt ( ) { return noop ; }
209- status ( ) { return Disposable . None ; }
210- setFilter ( ) { }
211- } ;
212- return new TextModel ( text , options , languageIdentifier , uri , new UndoRedoService ( dialogService , notificationService ) ) ;
213- }
214-
215191 public static resolveOptions ( textBuffer : model . ITextBuffer , options : model . ITextModelCreationOptions ) : model . TextModelResolvedOptions {
216192 if ( options . detectIndentation ) {
217193 const guessedIndentation = guessIndentation ( textBuffer , options . tabSize , options . insertSpaces ) ;
0 commit comments