mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 01:25:37 -05:00
Merge from vscode 4636be2b71c87bfb0bfe3c94278b447a5efcc1f1 (#8722)
* Merge from vscode 4636be2b71c87bfb0bfe3c94278b447a5efcc1f1 * remove tests that aren't working
This commit is contained in:
@@ -135,7 +135,7 @@ export class CallStackView extends ViewPane {
|
||||
|
||||
this.dataSource = new CallStackDataSource(this.debugService);
|
||||
this.tree = this.instantiationService.createInstance<typeof WorkbenchAsyncDataTree, WorkbenchAsyncDataTree<CallStackItem | IDebugModel, CallStackItem, FuzzyScore>>(WorkbenchAsyncDataTree, 'CallStackView', treeContainer, new CallStackDelegate(), [
|
||||
new SessionsRenderer(this.instantiationService),
|
||||
new SessionsRenderer(this.instantiationService, this.debugService),
|
||||
new ThreadsRenderer(this.instantiationService),
|
||||
this.instantiationService.createInstance(StackFramesRenderer),
|
||||
new ErrorsRenderer(),
|
||||
@@ -404,7 +404,8 @@ class SessionsRenderer implements ITreeRenderer<IDebugSession, FuzzyScore, ISess
|
||||
static readonly ID = 'session';
|
||||
|
||||
constructor(
|
||||
private readonly instantiationService: IInstantiationService
|
||||
private readonly instantiationService: IInstantiationService,
|
||||
private readonly debugService: IDebugService
|
||||
) { }
|
||||
|
||||
get templateId(): string {
|
||||
@@ -426,14 +427,23 @@ class SessionsRenderer implements ITreeRenderer<IDebugSession, FuzzyScore, ISess
|
||||
const session = element.element;
|
||||
data.session.title = nls.localize({ key: 'session', comment: ['Session is a noun'] }, "Session");
|
||||
data.label.set(session.getLabel(), createMatches(element.filterData));
|
||||
const stoppedThread = session.getAllThreads().filter(t => t.stopped).pop();
|
||||
const thread = session.getAllThreads().filter(t => t.stopped).pop();
|
||||
|
||||
data.actionBar.clear();
|
||||
const actions = getActions(this.instantiationService, element.element);
|
||||
data.actionBar.push(actions, { icon: true, label: false });
|
||||
data.stateLabel.hidden = false;
|
||||
|
||||
data.stateLabel.textContent = stoppedThread ? nls.localize('paused', "Paused")
|
||||
: nls.localize({ key: 'running', comment: ['indicates state'] }, "Running");
|
||||
if (thread && thread.stoppedDetails) {
|
||||
data.stateLabel.textContent = thread.stoppedDetails.description || nls.localize('debugStopped', "Paused on {0}", thread.stoppedDetails.reason || '');
|
||||
} else {
|
||||
const hasChildSessions = this.debugService.getModel().getSessions().filter(s => s.parentSession === session).length > 0;
|
||||
if (!hasChildSessions) {
|
||||
data.stateLabel.textContent = nls.localize({ key: 'running', comment: ['indicates state'] }, "Running");
|
||||
} else {
|
||||
data.stateLabel.hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
disposeTemplate(templateData: ISessionTemplateData): void {
|
||||
|
||||
Reference in New Issue
Block a user