Skip to content

Commit

Permalink
GH-22: Restored common cut/copy/paste command registration.
Browse files Browse the repository at this point in the history
But not the menu contribution.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
  • Loading branch information
kittaakos committed Apr 13, 2017
1 parent c5b2d29 commit 14d784c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/application/common/commands-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ export namespace CommonCommands {
export const EDIT_MENU_UNDO_GROUP = "1_undo/redo"
export const EDIT_MENU_COPYPASTE_GROUP = "2_copy"

export const EDIT_UNDO = monaco.editor.Handler.Undo;
export const EDIT_REDO = monaco.editor.Handler.Redo;
export const EDIT_CUT = 'edit_cut';
export const EDIT_COPY = 'edit_copy';
export const EDIT_PASTE = 'edit_paste';

export const EDIT_UNDO = 'edit_undo';
export const EDIT_REDO = 'edit_redo';
}

@injectable()
Expand All @@ -34,6 +38,18 @@ export class CommonMenuContribution implements MenuContribution {
export class CommonCommandContribution implements CommandContribution {

contribute(commandRegistry: CommandRegistry): void {
commandRegistry.registerCommand({
id: CommonCommands.EDIT_CUT,
label: 'Cut'
})
commandRegistry.registerCommand({
id: CommonCommands.EDIT_COPY,
label: 'Copy',
})
commandRegistry.registerCommand({
id: CommonCommands.EDIT_PASTE,
label: 'Paste'
})
commandRegistry.registerCommand({
id: CommonCommands.EDIT_UNDO,
label: 'Undo'
Expand Down

0 comments on commit 14d784c

Please sign in to comment.