Skip to content

Commit f24a908

Browse files
committed
callstack view: use dom.toggleClass
1 parent add344d commit f24a908

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/vs/workbench/contrib/debug/browser/callStackView.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class CallStackView extends ViewPane {
9393
if (thread && thread.stoppedDetails) {
9494
this.pauseMessageLabel.textContent = thread.stoppedDetails.description || nls.localize('debugStopped', "Paused on {0}", thread.stoppedDetails.reason || '');
9595
this.pauseMessageLabel.title = thread.stoppedDetails.text || '';
96-
this.pauseMessageLabel.toggleAttribute('exception', thread.stoppedDetails.reason === 'exception');
96+
dom.toggleClass(this.pauseMessageLabel, 'exception', thread.stoppedDetails.reason === 'exception');
9797
this.pauseMessage.hidden = false;
9898
if (this.toolbar) {
9999
this.toolbar.setActions([])();
@@ -511,11 +511,11 @@ class StackFramesRenderer implements ITreeRenderer<IStackFrame, FuzzyScore, ISta
511511

512512
renderElement(element: ITreeNode<IStackFrame, FuzzyScore>, index: number, data: IStackFrameTemplateData): void {
513513
const stackFrame = element.element;
514-
data.stackFrame.toggleAttribute('disabled', !stackFrame.source || !stackFrame.source.available || isDeemphasized(stackFrame));
515-
data.stackFrame.toggleAttribute('label', stackFrame.presentationHint === 'label');
516-
data.stackFrame.toggleAttribute('subtle', stackFrame.presentationHint === 'subtle');
514+
dom.toggleClass(data.stackFrame, 'disabled', !stackFrame.source || !stackFrame.source.available || isDeemphasized(stackFrame));
515+
dom.toggleClass(data.stackFrame, 'label', stackFrame.presentationHint === 'label');
516+
dom.toggleClass(data.stackFrame, 'subtle', stackFrame.presentationHint === 'subtle');
517517
const hasActions = !!stackFrame.thread.session.capabilities.supportsRestartFrame && stackFrame.presentationHint !== 'label' && stackFrame.presentationHint !== 'subtle';
518-
data.stackFrame.toggleAttribute('has-actions', hasActions);
518+
dom.toggleClass(data.stackFrame, 'has-actions', hasActions);
519519

520520
data.file.title = stackFrame.source.inMemory ? stackFrame.source.uri.path : this.labelService.getUriLabel(stackFrame.source.uri);
521521
if (stackFrame.source.raw.origin) {

0 commit comments

Comments
 (0)