Skip to content

Commit a7a1f95

Browse files
author
Alberto Iannaccone
authored
Adjust "Edit" menu to remove "Copy for Forum"/"Copy for GitHub" redundancy (#491)
1 parent 835e991 commit a7a1f95

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

Diff for: arduino-ide-extension/src/browser/contributions/edit-contributions.ts

+4-27
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,6 @@ export class EditContributions extends Contribution {
7979
{ execute: () => this.run('editor.action.formatDocument') }
8080
);
8181
registry.registerCommand(EditContributions.Commands.COPY_FOR_FORUM, {
82-
execute: async () => {
83-
const value = await this.currentValue();
84-
if (value !== undefined) {
85-
this.clipboardService.writeText(`[code]
86-
${value}
87-
[/code]`);
88-
}
89-
},
90-
});
91-
registry.registerCommand(EditContributions.Commands.COPY_FOR_GITHUB, {
9282
execute: async () => {
9383
const value = await this.currentValue();
9484
if (value !== undefined) {
@@ -111,26 +101,21 @@ ${value}
111101
});
112102
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
113103
commandId: EditContributions.Commands.COPY_FOR_FORUM.id,
114-
label: 'Copy for Forum',
104+
label: 'Copy for Forum (Markdown)',
115105
order: '2',
116106
});
117-
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
118-
commandId: EditContributions.Commands.COPY_FOR_GITHUB.id,
119-
label: 'Copy for GitHub',
120-
order: '3',
121-
});
122107
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
123108
commandId: CommonCommands.PASTE.id,
124-
order: '4',
109+
order: '3',
125110
});
126111
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
127112
commandId: CommonCommands.SELECT_ALL.id,
128-
order: '5',
113+
order: '4',
129114
});
130115
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
131116
commandId: EditContributions.Commands.GO_TO_LINE.id,
132117
label: 'Go to Line...',
133-
order: '6',
118+
order: '5',
134119
});
135120

136121
registry.registerMenuAction(ArduinoMenus.EDIT__CODE_CONTROL_GROUP, {
@@ -195,11 +180,6 @@ ${value}
195180
keybinding: 'CtrlCmd+Shift+C',
196181
when: 'editorFocus',
197182
});
198-
registry.registerKeybinding({
199-
command: EditContributions.Commands.COPY_FOR_GITHUB.id,
200-
keybinding: 'CtrlCmd+Alt+C',
201-
when: 'editorFocus',
202-
});
203183
registry.registerKeybinding({
204184
command: EditContributions.Commands.GO_TO_LINE.id,
205185
keybinding: 'CtrlCmd+L',
@@ -280,9 +260,6 @@ export namespace EditContributions {
280260
export const COPY_FOR_FORUM: Command = {
281261
id: 'arduino-copy-for-forum',
282262
};
283-
export const COPY_FOR_GITHUB: Command = {
284-
id: 'arduino-copy-for-github',
285-
};
286263
export const GO_TO_LINE: Command = {
287264
id: 'arduino-go-to-line',
288265
};

0 commit comments

Comments
 (0)