本文整理汇总了TypeScript中vs/editor/common/core/editOperation.EditOperation类的典型用法代码示例。如果您正苦于以下问题:TypeScript EditOperation类的具体用法?TypeScript EditOperation怎么用?TypeScript EditOperation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了EditOperation类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: test
test('decorations are updated when deleting multiple lines text', () => {
addDecoration(thisModel, 1, 2, 4, 1, 'myType');
modelHasDecoration(thisModel, 1, 2, 4, 1, 'myType');
thisModel.applyEdits([EditOperation.delete(new Range(1, 1, 3, 1))]);
modelHasDecoration(thisModel, 1, 1, 2, 1, 'myType');
});
示例2: test
test('model delete empty text', () => {
thisModel.applyEdits([EditOperation.delete(new Range(1, 1, 1, 1))]);
assert.equal(thisModel.getLineCount(), 5);
assert.equal(thisModel.getLineContent(1), 'My First Line');
});
示例3: assertEvent
return assertEvent(model.onDidSuggest, () => {
editor.executeEdits('test', [EditOperation.replace(new Range(1, 1, 1, 2), 'ä')]);
}, event => {
示例4: test
test('decorations are updated when inserting one line text before it 2', () => {
addDecoration(thisModel, 1, 1, 3, 2, 'myType');
modelHasDecoration(thisModel, 1, 1, 3, 2, 'myType');
thisModel.applyEdits([EditOperation.replace(new Range(1, 1, 1, 1), 'Hallo ')]);
modelHasDecoration(thisModel, 1, 1, 3, 2, 'myType');
});