Merge VS Code 1.23.1 (#1520)

This commit is contained in:
Matt Irvine
2018-06-05 11:24:51 -07:00
committed by GitHub
parent e3baf5c443
commit 0c58f09e59
3651 changed files with 74249 additions and 48599 deletions

View File

@@ -107,6 +107,13 @@ export class BreakpointsView extends ViewsViewletPanel {
this.list.splice(0, this.list.length, this.elements);
}
public focus(): void {
if (this.list) {
this.list.domFocus();
}
super.focus();
}
protected layoutBody(size: number): void {
if (this.list) {
this.list.layout(size);
@@ -117,8 +124,9 @@ export class BreakpointsView extends ViewsViewletPanel {
const actions: IAction[] = [];
const element = e.element;
const breakpointType = element instanceof Breakpoint && element.logMessage ? nls.localize('logPoint', "Logpoint") : nls.localize('breakpoint', "Breakpoint");
if (element instanceof Breakpoint || element instanceof FunctionBreakpoint) {
actions.push(new Action('workbench.action.debug.openEditorAndEditBreakpoint', nls.localize('editConditionalBreakpoint', "Edit Breakpoint..."), undefined, true, () => {
actions.push(new Action('workbench.action.debug.openEditorAndEditBreakpoint', nls.localize('editBreakpoint', "Edit {0}...", breakpointType), undefined, true, () => {
if (element instanceof Breakpoint) {
return openBreakpointSource(element, false, false, this.debugService, this.editorService).then(editor => {
const codeEditor = editor.getControl();
@@ -135,8 +143,7 @@ export class BreakpointsView extends ViewsViewletPanel {
actions.push(new Separator());
}
actions.push(new RemoveBreakpointAction(RemoveBreakpointAction.ID, RemoveBreakpointAction.LABEL, this.debugService, this.keybindingService));
actions.push(new RemoveBreakpointAction(RemoveBreakpointAction.ID, nls.localize('removeBreakpoint', "Remove {0}", breakpointType), this.debugService, this.keybindingService));
if (this.debugService.getModel().getBreakpoints().length + this.debugService.getModel().getFunctionBreakpoints().length > 1) {
actions.push(new RemoveAllBreakpointsAction(RemoveAllBreakpointsAction.ID, RemoveAllBreakpointsAction.LABEL, this.debugService, this.keybindingService));
@@ -196,7 +203,7 @@ export class BreakpointsView extends ViewsViewletPanel {
private get elements(): IEnablement[] {
const model = this.debugService.getModel();
const elements = (<IEnablement[]>model.getExceptionBreakpoints()).concat(model.getFunctionBreakpoints()).concat(model.getBreakpoints());
const elements = (<ReadonlyArray<IEnablement>>model.getExceptionBreakpoints()).concat(model.getFunctionBreakpoints()).concat(model.getBreakpoints());
return elements;
}
@@ -547,7 +554,7 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, te
if (!breakpoint.enabled || !debugService.getModel().areBreakpointsActivated()) {
return {
className: breakpoint instanceof FunctionBreakpoint ? 'debug-function-breakpoint-disabled' : 'debug-breakpoint-disabled',
className: breakpoint instanceof FunctionBreakpoint ? 'debug-function-breakpoint-disabled' : breakpoint.logMessage ? 'debug-breakpoint-log-disabled' : 'debug-breakpoint-disabled',
message: nls.localize('breakpointDisabledHover', "Disabled breakpoint"),
};
}
@@ -557,7 +564,7 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, te
};
if (debugActive && !breakpoint.verified) {
return {
className: breakpoint instanceof FunctionBreakpoint ? 'debug-function-breakpoint-unverified' : 'debug-breakpoint-unverified',
className: breakpoint instanceof FunctionBreakpoint ? 'debug-function-breakpoint-unverified' : breakpoint.logMessage ? 'debug-breakpoint-log-unverified' : 'debug-breakpoint-unverified',
message: appendMessage(nls.localize('breakpointUnverifieddHover', "Unverified breakpoint")),
};
}
@@ -583,6 +590,20 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, te
};
}
if (breakpoint.logMessage) {
if (process && breakpoint.condition && !process.session.capabilities.supportsLogPoints) {
return {
className: 'debug-breakpoint-unsupported',
message: nls.localize('logBreakpointUnsupported', "Logpoints not supported by this debug type"),
};
}
return {
className: 'debug-breakpoint-log',
message: appendMessage(breakpoint.logMessage)
};
}
if (breakpoint.condition || breakpoint.hitCondition) {
if (process && breakpoint.condition && !process.session.capabilities.supportsConditionalBreakpoints) {
return {