Skip to content

Commit e07731c

Browse files
committed
better formatting and rolling back on adding Show in Mem Insp in the watch window
1 parent 5c7e1c2 commit e07731c

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,6 @@
156156
"command": "vscode-cmsis-debugger.liveWatch.addToLiveWatchFromWatchWindow",
157157
"when": "inDebugMode",
158158
"group": "z_commands"
159-
},
160-
{
161-
"command": "vscode-cmsis-debugger.liveWatch.showInMemoryInspector",
162-
"when": "inDebugMode",
163-
"group": "z_commands"
164159
}
165160
],
166161
"commandPalette": [

src/views/live-watch/live-watch.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,25 @@ export class LiveWatchTreeDataProvider implements vscode.TreeDataProvider<LiveWa
140140
const refreshCommand = vscode.commands.registerCommand('vscode-cmsis-debugger.liveWatch.refresh', async () => await this.refresh());
141141
const modifyCommand = vscode.commands.registerCommand('vscode-cmsis-debugger.liveWatch.modify', async (node) => await this.registerRenameCommand(node));
142142
const copyCommand = vscode.commands.registerCommand('vscode-cmsis-debugger.liveWatch.copy', async (node) => { await this.registerCopyCommand(node); });
143-
const addToLiveWatchCommand = vscode.commands.registerCommand('vscode-cmsis-debugger.liveWatch.addToLiveWatchFromTextEditor', async () => { await this.registerAddFromSelectionCommand(); });
143+
const addToLiveWatchCommand = vscode.commands.registerCommand('vscode-cmsis-debugger.liveWatch.addToLiveWatchFromTextEditor',
144+
async () => { await this.registerAddFromSelectionCommand(); });
144145
/* I am using the same callback function for both watch window and variables view, as they have the same payload structure for now.
145146
However, I believe the payload structure will change for the watch window in the future as the developer who created the PR for contributing to watch window context menu
146147
mentioned he used variables' window payload structure for simplicity.
147148
Find the PR here:
148149
https://github.com/microsoft/vscode/pull/237751
149150
*/
150-
const addToLiveWatchFromWatchWindowCommand = vscode.commands.registerCommand('vscode-cmsis-debugger.liveWatch.addToLiveWatchFromWatchWindow', async (payload: { container: DebugProtocol.Scope; variable: DebugProtocol.Variable; }) => { await this.registerAddToLiveWatchFromVariablesView(payload); });
151-
const addToLiveWatchFromVariablesViewCommand = vscode.commands.registerCommand('vscode-cmsis-debugger.liveWatch.addToLiveWatchFromVariablesView', async (payload: { container: DebugProtocol.Scope; variable: DebugProtocol.Variable; }) => { await this.registerAddToLiveWatchFromVariablesView(payload); });
152-
const showInMemoryInspectorCommand = vscode.commands.registerCommand('vscode-cmsis-debugger.liveWatch.showInMemoryInspector', async (node: LiveWatchNode) => { await this.showInMemoryInspector(node); });
151+
const addToLiveWatchFromWatchWindowCommand = vscode.commands.registerCommand('vscode-cmsis-debugger.liveWatch.addToLiveWatchFromWatchWindow',
152+
async (payload: { container: DebugProtocol.Scope; variable: DebugProtocol.Variable; }) => { await this.registerAddToLiveWatchFromVariablesView(payload); });
153+
const addToLiveWatchFromVariablesViewCommand = vscode.commands.registerCommand('vscode-cmsis-debugger.liveWatch.addToLiveWatchFromVariablesView',
154+
async (payload: { container: DebugProtocol.Scope; variable: DebugProtocol.Variable; }) => { await this.registerAddToLiveWatchFromVariablesView(payload); });
155+
const showInMemoryInspectorCommand = vscode.commands.registerCommand('vscode-cmsis-debugger.liveWatch.showInMemoryInspector',
156+
async (node: LiveWatchNode) => { await this.showInMemoryInspector(node); });
153157
this._context.subscriptions.push(registerLiveWatchView,
154158
addCommand,
155-
deleteAllCommand, deleteCommand, refreshCommand, modifyCommand, copyCommand, addToLiveWatchCommand, addToLiveWatchFromWatchWindowCommand, addToLiveWatchFromVariablesViewCommand, showInMemoryInspectorCommand);
159+
deleteAllCommand, deleteCommand, refreshCommand, modifyCommand,
160+
copyCommand, addToLiveWatchCommand, addToLiveWatchFromWatchWindowCommand, addToLiveWatchFromVariablesViewCommand,
161+
showInMemoryInspectorCommand);
156162
}
157163

158164
private async registerAddCommand() {

0 commit comments

Comments
 (0)