本文整理汇总了TypeScript中vs/workbench/browser/actions.prepareActions函数的典型用法代码示例。如果您正苦于以下问题:TypeScript prepareActions函数的具体用法?TypeScript prepareActions怎么用?TypeScript prepareActions使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了prepareActions函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: test
test('Workbench Action Bar prepareActions()', function () {
let a1 = new Separator();
let a2 = new Separator();
let a3 = new Action('a3');
let a4 = new Separator();
let a5 = new Separator();
let a6 = new Action('a6');
let a7 = new Separator();
let actions = prepareActions([a1, a2, a3, a4, a5, a6, a7]);
assert.strictEqual(actions.length, 3); // duplicate separators get removed
assert(actions[0] === a3);
assert(actions[1] === a5);
assert(actions[2] === a6);
});
示例2: updateActions
protected updateActions(): void {
this.toolBar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions()))();
this.toolBar.context = this.getActionsContext();
}