mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 01:25:37 -05:00
Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d (#5949)
* Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d * Fix vs unit tests and hygiene issue * Fix strict null check issue
This commit is contained in:
@@ -23,6 +23,7 @@ import { commonSuffixLength } from 'vs/base/common/strings';
|
||||
import { posix } from 'vs/base/common/path';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { ITextEditor } from 'vs/workbench/common/editor';
|
||||
|
||||
export class SimpleReplElement implements IReplElement {
|
||||
constructor(
|
||||
@@ -89,7 +90,7 @@ export class RawObjectReplElement implements IExpression {
|
||||
|
||||
export class ExpressionContainer implements IExpressionContainer {
|
||||
|
||||
public static allValues: Map<string, string> = new Map<string, string>();
|
||||
public static allValues = new Map<string, string>();
|
||||
// Use chunks to support variable paging #9537
|
||||
private static readonly BASE_CHUNK_SIZE = 100;
|
||||
|
||||
@@ -302,7 +303,7 @@ export class Scope extends ExpressionContainer implements IScope {
|
||||
indexedVariables?: number,
|
||||
public range?: IRange
|
||||
) {
|
||||
super(stackFrame.thread.session, reference, `scope:${stackFrame.getId()}:${name}:${index}`, namedVariables, indexedVariables);
|
||||
super(stackFrame.thread.session, reference, `scope:${name}:${index}`, namedVariables, indexedVariables);
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
@@ -387,7 +388,7 @@ export class StackFrame implements IStackFrame {
|
||||
return sourceToString === UNKNOWN_SOURCE_LABEL ? this.name : `${this.name} (${sourceToString})`;
|
||||
}
|
||||
|
||||
openInEditor(editorService: IEditorService, preserveFocus?: boolean, sideBySide?: boolean, pinned?: boolean): Promise<any> {
|
||||
openInEditor(editorService: IEditorService, preserveFocus?: boolean, sideBySide?: boolean, pinned?: boolean): Promise<ITextEditor | null> {
|
||||
return !this.source.available ? Promise.resolve(null) :
|
||||
this.source.openInEditor(editorService, this.range, preserveFocus, sideBySide, pinned);
|
||||
}
|
||||
@@ -659,6 +660,13 @@ export class Breakpoint extends BaseBreakpoint implements IBreakpoint {
|
||||
return data ? data.endColumn : undefined;
|
||||
}
|
||||
|
||||
get sessionAgnosticData(): { lineNumber: number, column: number | undefined } {
|
||||
return {
|
||||
lineNumber: this._lineNumber,
|
||||
column: this._column
|
||||
};
|
||||
}
|
||||
|
||||
setSessionData(sessionId: string, data: DebugProtocol.Breakpoint): void {
|
||||
super.setSessionData(sessionId, data);
|
||||
if (!this._adapterData) {
|
||||
@@ -954,10 +962,10 @@ export class DebugModel implements IDebugModel {
|
||||
this._onDidChangeBreakpoints.fire({ removed: toRemove });
|
||||
}
|
||||
|
||||
updateBreakpoints(data: { [id: string]: IBreakpointUpdateData }): void {
|
||||
updateBreakpoints(data: Map<string, IBreakpointUpdateData>): void {
|
||||
const updated: IBreakpoint[] = [];
|
||||
this.breakpoints.forEach(bp => {
|
||||
const bpData = data[bp.getId()];
|
||||
const bpData = data.get(bp.getId());
|
||||
if (bpData) {
|
||||
bp.update(bpData);
|
||||
updated.push(bp);
|
||||
@@ -967,15 +975,15 @@ export class DebugModel implements IDebugModel {
|
||||
this._onDidChangeBreakpoints.fire({ changed: updated });
|
||||
}
|
||||
|
||||
setBreakpointSessionData(sessionId: string, data: { [id: string]: DebugProtocol.Breakpoint }): void {
|
||||
setBreakpointSessionData(sessionId: string, data: Map<string, DebugProtocol.Breakpoint>): void {
|
||||
this.breakpoints.forEach(bp => {
|
||||
const bpData = data[bp.getId()];
|
||||
const bpData = data.get(bp.getId());
|
||||
if (bpData) {
|
||||
bp.setSessionData(sessionId, bpData);
|
||||
}
|
||||
});
|
||||
this.functionBreakpoints.forEach(fbp => {
|
||||
const fbpData = data[fbp.getId()];
|
||||
const fbpData = data.get(fbp.getId());
|
||||
if (fbpData) {
|
||||
fbp.setSessionData(sessionId, fbpData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user