Skip to content
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
6d980f4
Sort&Filter: created new TreeView display
thorstendb-ARM Mar 25, 2026
5b53e79
Merge branch 'main' into filterEntriesSmart
thorstendb-ARM Mar 26, 2026
cae3495
Merge branch 'main' into filterEntriesSmart
thorstendb-ARM Mar 27, 2026
9f2a363
Merge branch 'main' into filterEntriesSmart
thorstendb-ARM Mar 30, 2026
4efd7aa
Merge branch 'main' into filterEntriesSmart
thorstendb-ARM Mar 31, 2026
c3beca6
fixed minor issues, hardened webview
thorstendb-ARM Mar 31, 2026
113ba89
linter
thorstendb-ARM Mar 31, 2026
fb60fd3
added tests
thorstendb-ARM Mar 31, 2026
7e0a9bd
Merge branch 'main' into filterEntriesSmart
thorstendb-ARM Apr 1, 2026
d40c1c3
Merge branch 'main' into filterEntriesSmart
jreineckearm Apr 13, 2026
f73758c
Merge branch 'main' into filterEntriesSmart
jreineckearm Apr 16, 2026
283fe21
Merge branch 'main' into filterEntriesSmart
thorstendb-ARM Apr 20, 2026
12671da
Bump Created React-based "flat" Tree View with Name / Value columns
thorstendb-ARM Apr 27, 2026
411e7f2
Merge branch 'main' into filterEntriesSmart
thorstendb-ARM Apr 29, 2026
346d37f
added tests
thorstendb-ARM Apr 29, 2026
8eee5c0
Refactor: simplify command conditions for core peripherals to show `c…
jthuangarm May 29, 2026
297eb09
Refactor: remove header properties (Name and Value) in TreeTable comp…
jthuangarm Jun 1, 2026
db63e27
Enhance loading and empty state handling
jthuangarm Jun 1, 2026
915f775
Refactor: prevent default context menu on TreeTable component
jthuangarm Jun 1, 2026
7930f2f
Move TreeTable webview sources under ./src
jthuangarm Jun 1, 2026
94aa5e3
Merge branch 'main' into filterEntriesSmart
jthuangarm Jun 1, 2026
70a1bcd
Update `webview` dependencies and TPIP entries
jthuangarm Jun 1, 2026
9d2dfc9
Fix conflict and merge remote-tracking branch 'origin/main' into filt…
jthuangarm Jun 1, 2026
95a5707
Update scroll handling and adjust column resize handle width
jthuangarm Jun 1, 2026
89140ae
Update TPIP report and add `@vscode/codicons` dependency
jthuangarm Jun 2, 2026
9bb60ee
Merge remote-tracking branch 'origin/main' into filterEntriesSmart
jthuangarm Jun 2, 2026
07bf555
Restore filter auto-expansion in component webview
jthuangarm Jun 2, 2026
1119a63
Enhance component viewer to display appropriate empty messages
jthuangarm Jun 5, 2026
98e9c68
Refine workflow about `setLoading` and `setEmptyMessage`
jthuangarm Jun 5, 2026
abbbc3b
Fix and add unit tests
jthuangarm Jun 5, 2026
af2fed8
Enhance filter handling for collapsing/expanding filtered elements
jthuangarm Jun 8, 2026
97a62aa
Enhabce scroll bar handling and reset view states behaviour for webview
jthuangarm Jun 8, 2026
89230a0
Hide view toolbar buttons when no session or AUX GDB is unavailable
jthuangarm Jun 10, 2026
75123ea
Hide unavailable periodic update commands from palette
jthuangarm Jun 10, 2026
b4ae91c
Restore filter on cancelled filter input
jthuangarm Jun 10, 2026
62deae4
Refine changes
jthuangarm Jun 10, 2026
7441068
Adjust navigation group for expand/collapse commands
jthuangarm Jun 15, 2026
6f0ecac
Preserve expansion state when restoring filters
jthuangarm Jun 15, 2026
6a86c8a
Merge branch 'main' into filterEntriesSmart
jthuangarm Jun 15, 2026
6028937
Merge branch 'filterEntriesSmart' of https://github.com/Open-CMSIS-Pa…
jthuangarm Jun 15, 2026
9f61f44
Trigger a update when enabling periodic refresh
jthuangarm Jun 15, 2026
29421aa
Refine loading workflow
jthuangarm Jun 15, 2026
3a28c91
Merge branch 'filterEntriesSmart' into webview-buttonFilter
jthuangarm Jun 15, 2026
4b2d22a
Merge branch 'main' into filterEntriesSmart
jthuangarm Jun 15, 2026
8060eea
Remove fire-and-forget `void`
jthuangarm Jun 15, 2026
617b3eb
Merge branch 'filterEntriesSmart' into webview-buttonFilter
jthuangarm Jun 15, 2026
cee37de
Merge branch 'main' into filterEntriesSmart
jthuangarm Jun 15, 2026
a781ad9
Add comment for `dangerouslySetInnerHTML` under tooltip
jthuangarm Jun 16, 2026
e516645
Merge branch 'main' into filterEntriesSmart
jthuangarm Jun 16, 2026
d5e82a9
Update pictures
jthuangarm Jun 16, 2026
f3faf5e
Revert "Update pictures"
jthuangarm Jun 16, 2026
96d30a8
Add missing `inDebugMode` condition
jthuangarm Jun 16, 2026
dca918e
Merge branch 'filterEntriesSmart' into webview-buttonFilter
jthuangarm Jun 16, 2026
f547701
Cleanup conditions in package.json
jthuangarm Jun 17, 2026
4c1e73f
Cleanup again
jthuangarm Jun 17, 2026
005bb4f
Merge branch 'main' into webview-buttonFilter
jthuangarm Jun 19, 2026
7adce97
Fix conflict
jthuangarm Jun 19, 2026
3ba35a3
Update `package-lock.json`
jthuangarm Jun 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 27 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,11 @@
},
{
"command": "vscode-cmsis-debugger.liveWatch.enablePeriodicUpdate",
"when": "!liveWatch.periodicUpdateEnabled"
"when": "inDebugMode && liveWatch.canAccessWhileRunning && !liveWatch.periodicUpdateEnabled"
},
{
"command": "vscode-cmsis-debugger.liveWatch.disablePeriodicUpdate",
"when": "liveWatch.periodicUpdateEnabled"
"when": "inDebugMode && liveWatch.canAccessWhileRunning && liveWatch.periodicUpdateEnabled"
},
{
"command": "vscode-cmsis-debugger.liveWatch.setValue",
Expand All @@ -392,16 +392,20 @@
},
{
"command": "vscode-cmsis-debugger.componentViewer.enablePeriodicUpdate",
"when": "!componentViewer.periodicUpdateEnabled"
"when": "inDebugMode && componentViewer.canAccessWhileRunning && !componentViewer.periodicUpdateEnabled"
},
{
"command": "vscode-cmsis-debugger.componentViewer.disablePeriodicUpdate",
"when": "componentViewer.periodicUpdateEnabled"
"when": "inDebugMode && componentViewer.canAccessWhileRunning && componentViewer.periodicUpdateEnabled"
},
{
"command": "vscode-cmsis-debugger.componentViewer.expandAll",
"when": "false"
},
{
"command": "vscode-cmsis-debugger.componentViewer.collapseAll",
"when": "false"
},
{
"command": "vscode-cmsis-debugger.componentViewer.filterTree",
"when": "false"
Expand All @@ -420,11 +424,11 @@
},
{
"command": "vscode-cmsis-debugger.corePeripherals.enablePeriodicUpdate",
"when": "!corePeripherals.periodicUpdateEnabled"
"when": "inDebugMode && corePeripherals.canAccessWhileRunning && !corePeripherals.periodicUpdateEnabled"
},
{
"command": "vscode-cmsis-debugger.corePeripherals.disablePeriodicUpdate",
"when": "corePeripherals.periodicUpdateEnabled"
"when": "inDebugMode && corePeripherals.canAccessWhileRunning && corePeripherals.periodicUpdateEnabled"
},
{
"command": "vscode-cmsis-debugger.corePeripherals.expandAll",
Expand Down Expand Up @@ -454,7 +458,7 @@
},
{
"command": "vscode-cmsis-debugger.liveWatch.refresh",
"when": "view == cmsis-debugger.liveWatch"
"when": "inDebugMode && view == cmsis-debugger.liveWatch"
},
{
"command": "vscode-cmsis-debugger.liveWatch.add",
Expand All @@ -468,42 +472,42 @@
},
{
"command": "vscode-cmsis-debugger.liveWatch.refresh",
"when": "view == cmsis-debugger.liveWatch",
"when": "inDebugMode && view == cmsis-debugger.liveWatch",
"group": "navigation@2"
},
{
"command": "vscode-cmsis-debugger.liveWatch.disablePeriodicUpdate",
"when": "view == cmsis-debugger.liveWatch && liveWatch.periodicUpdateEnabled",
"when": "inDebugMode && view == cmsis-debugger.liveWatch && liveWatch.canAccessWhileRunning && liveWatch.periodicUpdateEnabled",
"group": "navigation@3"
},
{
"command": "vscode-cmsis-debugger.liveWatch.enablePeriodicUpdate",
"when": "view == cmsis-debugger.liveWatch && !liveWatch.periodicUpdateEnabled",
"when": "inDebugMode && view == cmsis-debugger.liveWatch && liveWatch.canAccessWhileRunning && !liveWatch.periodicUpdateEnabled",
"group": "navigation@3"
},
{
"command": "vscode-cmsis-debugger.componentViewer.expandAll",
"when": "view == cmsis-debugger.componentViewer",
"when": "inDebugMode && view == cmsis-debugger.componentViewer",
"group": "navigation@3"
},
{
"command": "vscode-cmsis-debugger.componentViewer.collapseAll",
"when": "view == cmsis-debugger.componentViewer",
"when": "inDebugMode && view == cmsis-debugger.componentViewer",
"group": "navigation@4"
},
{
"command": "vscode-cmsis-debugger.corePeripherals.expandAll",
"when": "view == cmsis-debugger.corePeripherals",
"when": "inDebugMode && view == cmsis-debugger.corePeripherals",
"group": "navigation@3"
},
{
"command": "vscode-cmsis-debugger.corePeripherals.collapseAll",
"when": "view == cmsis-debugger.corePeripherals",
"when": "inDebugMode && view == cmsis-debugger.corePeripherals",
"group": "navigation@4"
},
{
"command": "vscode-cmsis-debugger.componentViewer.filterTree",
"when": "view == cmsis-debugger.componentViewer",
"when": "inDebugMode && view == cmsis-debugger.componentViewer",
"group": "navigation@1"
},
{
Expand All @@ -513,7 +517,7 @@
},
{
"command": "vscode-cmsis-debugger.corePeripherals.filterTree",
"when": "view == cmsis-debugger.corePeripherals",
"when": "inDebugMode && view == cmsis-debugger.corePeripherals",
"group": "navigation@1"
},
{
Expand All @@ -523,22 +527,22 @@
},
{
"command": "vscode-cmsis-debugger.componentViewer.disablePeriodicUpdate",
"when": "view == cmsis-debugger.componentViewer && componentViewer.periodicUpdateEnabled",
"when": "inDebugMode && view == cmsis-debugger.componentViewer && componentViewer.canAccessWhileRunning && componentViewer.periodicUpdateEnabled",
"group": "navigation@3"
},
{
"command": "vscode-cmsis-debugger.componentViewer.enablePeriodicUpdate",
"when": "view == cmsis-debugger.componentViewer && !componentViewer.periodicUpdateEnabled",
"when": "inDebugMode && view == cmsis-debugger.componentViewer && componentViewer.canAccessWhileRunning && !componentViewer.periodicUpdateEnabled",
"group": "navigation@3"
},
{
"command": "vscode-cmsis-debugger.corePeripherals.disablePeriodicUpdate",
"when": "view == cmsis-debugger.corePeripherals && corePeripherals.periodicUpdateEnabled",
"when": "inDebugMode && view == cmsis-debugger.corePeripherals && corePeripherals.canAccessWhileRunning && corePeripherals.periodicUpdateEnabled",
"group": "navigation@3"
},
{
"command": "vscode-cmsis-debugger.corePeripherals.enablePeriodicUpdate",
"when": "view == cmsis-debugger.corePeripherals && !corePeripherals.periodicUpdateEnabled",
"when": "inDebugMode && view == cmsis-debugger.corePeripherals && corePeripherals.canAccessWhileRunning && !corePeripherals.periodicUpdateEnabled",
"group": "navigation@3"
}
],
Expand Down Expand Up @@ -575,7 +579,7 @@
},
{
"command": "vscode-cmsis-debugger.liveWatch.setValue",
"when": "view == cmsis-debugger.liveWatch && inDebugMode && vscode-cmsis-debugger.setExpressionSupported",
"when": "inDebugMode && view == cmsis-debugger.liveWatch && vscode-cmsis-debugger.setExpressionSupported",
"group": "contextMenuG1@5"
},
{
Expand All @@ -595,12 +599,12 @@
},
{
"command": "cdt.debug.setOutputRadixToDecimal",
"when": "(view == cmsis-debugger.liveWatch) && inDebugMode && cdt.debug.outputRadix && cdt.debug.outputRadix != 'decimal' && (debugType == 'gdb' || debugType == 'gdbtarget')",
"when": "inDebugMode && (view == cmsis-debugger.liveWatch) && cdt.debug.outputRadix && cdt.debug.outputRadix != 'decimal' && (debugType == 'gdb' || debugType == 'gdbtarget')",
"group": "contextMenuG4@1"
},
{
"command": "cdt.debug.setOutputRadixToHex",
"when": "(view == cmsis-debugger.liveWatch) && inDebugMode && cdt.debug.outputRadix && cdt.debug.outputRadix != 'hexadecimal' && (debugType == 'gdb' || debugType == 'gdbtarget')",
"when": "inDebugMode && (view == cmsis-debugger.liveWatch) && cdt.debug.outputRadix && cdt.debug.outputRadix != 'hexadecimal' && (debugType == 'gdb' || debugType == 'gdbtarget')",
"group": "contextMenuG4@2"
},
{
Expand Down
8 changes: 4 additions & 4 deletions src/features/cpu-states/cpu-states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class CpuStates {
tracker.onContinued(event => this.handleContinuedEvent(event));
tracker.onStopped(event => this.handleStoppedEvent(event));
tracker.onStackTrace(stackTrace => this.handleStackTrace(stackTrace));
void vscode.commands.executeCommand('setContext', 'vscode-cmsis-debugger.cpuTimerEnabled', true);
vscode.commands.executeCommand('setContext', 'vscode-cmsis-debugger.cpuTimerEnabled', true);
}

protected handleOnWillStartSession(session: GDBTargetDebugSession): void {
Expand Down Expand Up @@ -101,7 +101,7 @@ export class CpuStates {
this.activeSession = session;
// Restore enabled/disabled state of CPU Time commands based on persisted settings
const enabled = session ? (this.sessionCpuStates.get(session.session.id)?.enableCpuStatesFlag ?? true) : false;
void vscode.commands.executeCommand('setContext', 'vscode-cmsis-debugger.cpuTimerEnabled', enabled);
vscode.commands.executeCommand('setContext', 'vscode-cmsis-debugger.cpuTimerEnabled', enabled);
this._onRefresh.fire(0);
}

Expand All @@ -115,7 +115,7 @@ export class CpuStates {
cpuStates.configStateKey = configStateKey;
cpuStates.enableCpuStatesFlag = readCpuStates(configStateKey) ?? true;
if (this.activeSession?.session.id === session.session.id) {
void vscode.commands.executeCommand('setContext', 'vscode-cmsis-debugger.cpuTimerEnabled', cpuStates.enableCpuStatesFlag);
vscode.commands.executeCommand('setContext', 'vscode-cmsis-debugger.cpuTimerEnabled', cpuStates.enableCpuStatesFlag);
}
// Following call might fail if target not stopped on connect, returns undefined
// Retry on first Stopped Event.
Expand Down Expand Up @@ -369,7 +369,7 @@ export class CpuStates {
for (const states of this.sessionCpuStates.values()) {
states.enableCpuStatesFlag = true;
}
void vscode.commands.executeCommand('setContext', 'vscode-cmsis-debugger.cpuTimerEnabled', true);
vscode.commands.executeCommand('setContext', 'vscode-cmsis-debugger.cpuTimerEnabled', true);
logger.info('CPU States: CPU Timer reset');
}
};
40 changes: 27 additions & 13 deletions src/views/component-viewer/component-viewer-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export class ComponentViewerBase {
clearFilterCommandDisposable
);
vscode.commands.executeCommand('setContext', `${this._viewId}.periodicUpdateEnabled`, true);
vscode.commands.executeCommand('setContext', `${this._viewId}.canAccessWhileRunning`, false);
return true;
}

Expand Down Expand Up @@ -201,44 +202,53 @@ export class ComponentViewerBase {

protected handleFilterTree(): void {
const inputBox = vscode.window.createInputBox();
const originalFilter = this._componentViewerTreeDataProvider.filterPattern;
let accepted = false;
inputBox.placeholder = 'Type a text pattern to filter nodes...';
inputBox.prompt = `Filter ${this._viewName} tree`;
inputBox.value = this._componentViewerTreeDataProvider.filterPattern ?? '';
inputBox.value = originalFilter ?? '';
inputBox.ignoreFocusOut = false;
this._activeInputBox = inputBox;

const applyFilter = (value: string): void => {
if (value === '') {
this.handleClearFilter();
this._componentViewerTreeDataProvider.setFilter(undefined);
vscode.commands.executeCommand('setContext', `${this._viewId}.filterActive`, false);
} else {
componentViewerLogger.info(`${this._viewName}: Filter set to '${value}'`);
this._componentViewerTreeDataProvider.setFilter(value);
void vscode.commands.executeCommand('setContext', `${this._viewId}.filterActive`, true);
vscode.commands.executeCommand('setContext', `${this._viewId}.filterActive`, true);
}
// Reset the timer so the view state is saved only after the user stops typing for filterDebounceMs.
if (this._filterDebounceTimer) {
clearTimeout(this._filterDebounceTimer);
}
this._filterDebounceTimer = setTimeout(() => {
this._filterDebounceTimer = undefined;
void this.saveCurrentState();
this.saveCurrentState();
}, ComponentViewerBase.filterDebounceMs);
};

inputBox.onDidChangeValue(value => {
if (value.length === 0) {
this.handleClearFilter();
} else {
applyFilter(value);
}
applyFilter(value);
});

inputBox.onDidAccept(() => {
accepted = true;
applyFilter(inputBox.value);
inputBox.hide();
});

inputBox.onDidHide(() => {
if (!accepted && this._activeInputBox === inputBox) {
if (this._filterDebounceTimer) {
clearTimeout(this._filterDebounceTimer);
this._filterDebounceTimer = undefined;
}
this._componentViewerTreeDataProvider.setFilter(originalFilter);
vscode.commands.executeCommand('setContext', `${this._viewId}.filterActive`, originalFilter !== undefined);
this.saveCurrentState();
}
this._activeInputBox = undefined;
inputBox.dispose();
});
Expand All @@ -249,16 +259,18 @@ export class ComponentViewerBase {
protected handleClearFilter(): void {
componentViewerLogger.info(`${this._viewName}: Filter cleared`);
this._componentViewerTreeDataProvider.setFilter(undefined);
void vscode.commands.executeCommand('setContext', `${this._viewId}.filterActive`, false);
vscode.commands.executeCommand('setContext', `${this._viewId}.filterActive`, false);
if (this._activeInputBox) {
this._activeInputBox.hide();
const activeInputBox = this._activeInputBox;
this._activeInputBox = undefined;
activeInputBox.hide();
}
// Cancel any pending debounced save and persist the cleared state immediately.
if (this._filterDebounceTimer) {
clearTimeout(this._filterDebounceTimer);
this._filterDebounceTimer = undefined;
}
void this.saveCurrentState();
this.saveCurrentState();
}

protected async readScvdFiles(tracker: GDBTargetDebugTracker, session?: GDBTargetDebugSession): Promise<void> {
Expand Down Expand Up @@ -400,6 +412,7 @@ export class ComponentViewerBase {
// Clear active session if it is the one being stopped
if (this._activeSession?.session.id === session.session.id) {
this._activeSession = undefined;
vscode.commands.executeCommand('setContext', `${this._viewId}.canAccessWhileRunning`, false);
this._webviewProvider?.setEmptyMessage('');
this._webviewProvider?.setLoading(false);
}
Expand Down Expand Up @@ -456,6 +469,7 @@ export class ComponentViewerBase {
private async handleOnDidChangeActiveDebugSession(session: GDBTargetDebugSession | undefined): Promise<void> {
// Update debug session
this._activeSession = session;
vscode.commands.executeCommand('setContext', `${this._viewId}.canAccessWhileRunning`, session?.canAccessWhileRunning === true);
if (session) {
this._webviewProvider?.setLoading(true);
await this.restorePeriodicUpdateAndFilter(session);
Expand All @@ -473,7 +487,7 @@ export class ComponentViewerBase {
}
this._pendingUpdateTimer = setTimeout(() => {
this._pendingUpdateTimer = undefined;
void this.runUpdate(updateReason);
this.runUpdate(updateReason);
}, ComponentViewerBase.pendingUpdateDelayMs);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class ComponentViewerWebviewProvider implements vscode.WebviewViewProvide
return;
}
this._renderScheduled = true;
void Promise.resolve().then(() => {
Promise.resolve().then(() => {
this._renderScheduled = false;
this.flushRender();
});
Expand Down Expand Up @@ -188,7 +188,7 @@ export class ComponentViewerWebviewProvider implements vscode.WebviewViewProvide
resetViewState: this._pendingViewStateReset,
};
this._pendingViewStateReset = false;
void this._view.webview.postMessage(message);
this._view.webview.postMessage(message);
}

/**
Expand Down
Loading
Loading