提交 babfdf26 编写于 作者: J Johannes Rieken

context menu - append old contributed action to the end

上级 bb84ee81
......@@ -143,14 +143,18 @@ class ContextMenuController implements IEditorContribution {
return [];
}
const contributedActions = <OldContextMenuAction[]>this._editor.getActions().filter(action => {
const actions: IAction[] = [];
fillInActions(this._contextMenu, actions);
const oldContextMenuActions = <OldContextMenuAction[]>this._editor.getActions().filter(action => {
if (OldContextMenuAction.is(action)) {
return action.shouldShowInContextMenu() && action.isSupported();
}
});
if (oldContextMenuActions.length > 0) {
actions.push(new Separator(), ...ContextMenuController._prepareActions(oldContextMenuActions));
}
const actions = ContextMenuController._prepareActions(contributedActions);
fillInActions(this._contextMenu, actions);
return actions;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册