modeTransition.ts 804 字节
Newer Older
A
Alex Dima 已提交
1 2 3 4 5 6 7 8
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
'use strict';

import {Arrays} from 'vs/editor/common/core/arrays';

9 10
export class ModeTransition {
	_modeTransitionBrand: void;
A
Alex Dima 已提交
11 12

	public startIndex:number;
A
Alex Dima 已提交
13
	public modeId: string;
A
Alex Dima 已提交
14

A
Alex Dima 已提交
15
	constructor(startIndex:number, modeId:string) {
A
Alex Dima 已提交
16
		this.startIndex = startIndex|0;
A
Alex Dima 已提交
17 18 19
		this.modeId = modeId;
	}

A
Alex Dima 已提交
20 21 22 23
	public static findIndexInSegmentsArray(arr:ModeTransition[], desiredIndex: number): number {
		return Arrays.findIndexInSegmentsArray(arr, desiredIndex);
	}
}