@@ -8,7 +8,7 @@ import { onUnexpectedError } from 'vs/base/common/errors';
88import { ReplaceCommand , ReplaceCommandWithoutChangingPosition , ReplaceCommandWithOffsetCursorState } from 'vs/editor/common/commands/replaceCommand' ;
99import { CursorColumns , CursorConfiguration , ICursorSimpleModel , EditOperationResult , EditOperationType } from 'vs/editor/common/controller/cursorCommon' ;
1010import { Range } from 'vs/editor/common/core/range' ;
11- import { ICommand , ITokenizedModel } from 'vs/editor/common/editorCommon' ;
11+ import { ICommand , IModel } from 'vs/editor/common/editorCommon' ;
1212import * as strings from 'vs/base/common/strings' ;
1313import { ShiftCommand } from 'vs/editor/common/commands/shiftCommand' ;
1414import { Selection } from 'vs/editor/common/core/selection' ;
@@ -136,7 +136,7 @@ export class TypeOperations {
136136 }
137137 }
138138
139- private static _goodIndentForLine ( config : CursorConfiguration , model : ITokenizedModel , lineNumber : number ) : string {
139+ private static _goodIndentForLine ( config : CursorConfiguration , model : IModel , lineNumber : number ) : string {
140140 let action : IndentAction | EnterAction ;
141141 let indentation : string ;
142142
@@ -207,7 +207,7 @@ export class TypeOperations {
207207 return new ReplaceCommand ( selection , typeText , insertsAutoWhitespace ) ;
208208 }
209209
210- public static tab ( config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] ) : ICommand [ ] {
210+ public static tab ( config : CursorConfiguration , model : IModel , selections : Selection [ ] ) : ICommand [ ] {
211211 let commands : ICommand [ ] = [ ] ;
212212 for ( let i = 0 , len = selections . length ; i < len ; i ++ ) {
213213 const selection = selections [ i ] ;
@@ -248,7 +248,7 @@ export class TypeOperations {
248248 return commands ;
249249 }
250250
251- public static replacePreviousChar ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] , txt : string , replaceCharCnt : number ) : EditOperationResult {
251+ public static replacePreviousChar ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : IModel , selections : Selection [ ] , txt : string , replaceCharCnt : number ) : EditOperationResult {
252252 let commands : ICommand [ ] = [ ] ;
253253 for ( let i = 0 , len = selections . length ; i < len ; i ++ ) {
254254 const selection = selections [ i ] ;
@@ -278,7 +278,7 @@ export class TypeOperations {
278278 }
279279 }
280280
281- private static _enter ( config : CursorConfiguration , model : ITokenizedModel , keepPosition : boolean , range : Range ) : ICommand {
281+ private static _enter ( config : CursorConfiguration , model : IModel , keepPosition : boolean , range : Range ) : ICommand {
282282 if ( ! model . isCheapToTokenize ( range . getStartPosition ( ) . lineNumber ) ) {
283283 let lineText = model . getLineContent ( range . startLineNumber ) ;
284284 let indentation = strings . getLeadingWhitespace ( lineText ) . substring ( 0 , range . startColumn - 1 ) ;
@@ -375,7 +375,7 @@ export class TypeOperations {
375375 }
376376 }
377377
378- private static _isAutoIndentType ( config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] ) : boolean {
378+ private static _isAutoIndentType ( config : CursorConfiguration , model : IModel , selections : Selection [ ] ) : boolean {
379379 if ( ! config . autoIndent ) {
380380 return false ;
381381 }
@@ -389,7 +389,7 @@ export class TypeOperations {
389389 return true ;
390390 }
391391
392- private static _runAutoIndentType ( config : CursorConfiguration , model : ITokenizedModel , range : Range , ch : string ) : ICommand {
392+ private static _runAutoIndentType ( config : CursorConfiguration , model : IModel , range : Range , ch : string ) : ICommand {
393393 let currentIndentation = LanguageConfigurationRegistry . getIndentationAtPosition ( model , range . startLineNumber , range . startColumn ) ;
394394 let actualIndentation = LanguageConfigurationRegistry . getIndentActionForType ( model , range , ch , {
395395 shiftIndent : ( indentation ) => {
@@ -425,7 +425,7 @@ export class TypeOperations {
425425 return null ;
426426 }
427427
428- private static _isAutoClosingCloseCharType ( config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] , ch : string ) : boolean {
428+ private static _isAutoClosingCloseCharType ( config : CursorConfiguration , model : IModel , selections : Selection [ ] , ch : string ) : boolean {
429429 if ( ! config . autoClosingBrackets || ! config . autoClosingPairsClose . hasOwnProperty ( ch ) ) {
430430 return false ;
431431 }
@@ -468,7 +468,7 @@ export class TypeOperations {
468468 return cnt ;
469469 }
470470
471- private static _runAutoClosingCloseCharType ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] , ch : string ) : EditOperationResult {
471+ private static _runAutoClosingCloseCharType ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : IModel , selections : Selection [ ] , ch : string ) : EditOperationResult {
472472 let commands : ICommand [ ] = [ ] ;
473473 for ( let i = 0 , len = selections . length ; i < len ; i ++ ) {
474474 const selection = selections [ i ] ;
@@ -482,7 +482,7 @@ export class TypeOperations {
482482 } ) ;
483483 }
484484
485- private static _isAutoClosingOpenCharType ( config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] , ch : string ) : boolean {
485+ private static _isAutoClosingOpenCharType ( config : CursorConfiguration , model : IModel , selections : Selection [ ] , ch : string ) : boolean {
486486 if ( ! config . autoClosingBrackets || ! config . autoClosingPairsOpen . hasOwnProperty ( ch ) ) {
487487 return false ;
488488 }
@@ -550,7 +550,7 @@ export class TypeOperations {
550550 return true ;
551551 }
552552
553- private static _runAutoClosingOpenCharType ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] , ch : string ) : EditOperationResult {
553+ private static _runAutoClosingOpenCharType ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : IModel , selections : Selection [ ] , ch : string ) : EditOperationResult {
554554 let commands : ICommand [ ] = [ ] ;
555555 for ( let i = 0 , len = selections . length ; i < len ; i ++ ) {
556556 const selection = selections [ i ] ;
@@ -563,7 +563,7 @@ export class TypeOperations {
563563 } ) ;
564564 }
565565
566- private static _isSurroundSelectionType ( config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] , ch : string ) : boolean {
566+ private static _isSurroundSelectionType ( config : CursorConfiguration , model : IModel , selections : Selection [ ] , ch : string ) : boolean {
567567 if ( ! config . autoClosingBrackets || ! config . surroundingPairs . hasOwnProperty ( ch ) ) {
568568 return false ;
569569 }
@@ -597,7 +597,7 @@ export class TypeOperations {
597597 return true ;
598598 }
599599
600- private static _runSurroundSelectionType ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] , ch : string ) : EditOperationResult {
600+ private static _runSurroundSelectionType ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : IModel , selections : Selection [ ] , ch : string ) : EditOperationResult {
601601 let commands : ICommand [ ] = [ ] ;
602602 for ( let i = 0 , len = selections . length ; i < len ; i ++ ) {
603603 const selection = selections [ i ] ;
@@ -610,14 +610,14 @@ export class TypeOperations {
610610 } ) ;
611611 }
612612
613- private static _isTypeInterceptorElectricChar ( config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] ) {
613+ private static _isTypeInterceptorElectricChar ( config : CursorConfiguration , model : IModel , selections : Selection [ ] ) {
614614 if ( selections . length === 1 && model . isCheapToTokenize ( selections [ 0 ] . getEndPosition ( ) . lineNumber ) ) {
615615 return true ;
616616 }
617617 return false ;
618618 }
619619
620- private static _typeInterceptorElectricChar ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : ITokenizedModel , selection : Selection , ch : string ) : EditOperationResult {
620+ private static _typeInterceptorElectricChar ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : IModel , selection : Selection , ch : string ) : EditOperationResult {
621621 if ( ! config . electricChars . hasOwnProperty ( ch ) || ! selection . isEmpty ( ) ) {
622622 return null ;
623623 }
@@ -680,7 +680,7 @@ export class TypeOperations {
680680 return null ;
681681 }
682682
683- public static typeWithInterceptors ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] , ch : string ) : EditOperationResult {
683+ public static typeWithInterceptors ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : IModel , selections : Selection [ ] , ch : string ) : EditOperationResult {
684684
685685 if ( ch === '\n' ) {
686686 let commands : ICommand [ ] = [ ] ;
@@ -747,7 +747,7 @@ export class TypeOperations {
747747 } ) ;
748748 }
749749
750- public static typeWithoutInterceptors ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] , str : string ) : EditOperationResult {
750+ public static typeWithoutInterceptors ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : IModel , selections : Selection [ ] , str : string ) : EditOperationResult {
751751 let commands : ICommand [ ] = [ ] ;
752752 for ( let i = 0 , len = selections . length ; i < len ; i ++ ) {
753753 commands [ i ] = new ReplaceCommand ( selections [ i ] , str ) ;
@@ -758,7 +758,7 @@ export class TypeOperations {
758758 } ) ;
759759 }
760760
761- public static lineInsertBefore ( config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] ) : ICommand [ ] {
761+ public static lineInsertBefore ( config : CursorConfiguration , model : IModel , selections : Selection [ ] ) : ICommand [ ] {
762762 let commands : ICommand [ ] = [ ] ;
763763 for ( let i = 0 , len = selections . length ; i < len ; i ++ ) {
764764 let lineNumber = selections [ i ] . positionLineNumber ;
@@ -775,7 +775,7 @@ export class TypeOperations {
775775 return commands ;
776776 }
777777
778- public static lineInsertAfter ( config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] ) : ICommand [ ] {
778+ public static lineInsertAfter ( config : CursorConfiguration , model : IModel , selections : Selection [ ] ) : ICommand [ ] {
779779 let commands : ICommand [ ] = [ ] ;
780780 for ( let i = 0 , len = selections . length ; i < len ; i ++ ) {
781781 const lineNumber = selections [ i ] . positionLineNumber ;
@@ -785,7 +785,7 @@ export class TypeOperations {
785785 return commands ;
786786 }
787787
788- public static lineBreakInsert ( config : CursorConfiguration , model : ITokenizedModel , selections : Selection [ ] ) : ICommand [ ] {
788+ public static lineBreakInsert ( config : CursorConfiguration , model : IModel , selections : Selection [ ] ) : ICommand [ ] {
789789 let commands : ICommand [ ] = [ ] ;
790790 for ( let i = 0 , len = selections . length ; i < len ; i ++ ) {
791791 commands [ i ] = this . _enter ( config , model , true , selections [ i ] ) ;
0 commit comments