Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c (#8525)

* Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c

* remove files we don't want

* fix hygiene

* update distro

* update distro

* fix hygiene

* fix strict nulls

* distro

* distro

* fix tests

* fix tests

* add another edit

* fix viewlet icon

* fix azure dialog

* fix some padding

* fix more padding issues
This commit is contained in:
Anthony Dresser
2019-12-04 19:28:22 -08:00
committed by GitHub
parent a8818ab0df
commit f5ce7fb2a5
1507 changed files with 42813 additions and 27370 deletions

View File

@@ -28,9 +28,11 @@ import { attachInputBoxStyler } from 'vs/platform/theme/common/styler';
import { isCodeEditor } from 'vs/editor/browser/editorBrowser';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from 'vs/workbench/services/editor/common/editorService';
import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/views/panelViewlet';
import { ViewletPane, IViewletPaneOptions } from 'vs/workbench/browser/parts/views/paneViewlet';
import { ILabelService } from 'vs/platform/label/common/label';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
import { Gesture } from 'vs/base/browser/touch';
const $ = dom.$;
@@ -38,11 +40,12 @@ function createCheckbox(): HTMLInputElement {
const checkbox = <HTMLInputElement>$('input');
checkbox.type = 'checkbox';
checkbox.tabIndex = -1;
Gesture.ignoreTarget(checkbox);
return checkbox;
}
export class BreakpointsView extends ViewletPanel {
export class BreakpointsView extends ViewletPane {
private static readonly MAX_VISIBLE_FILES = 9;
private list!: WorkbenchList<IEnablement>;
@@ -60,7 +63,7 @@ export class BreakpointsView extends ViewletPanel {
@IConfigurationService configurationService: IConfigurationService,
@IContextKeyService contextKeyService: IContextKeyService,
) {
super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('breakpointsSection', "Breakpoints Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
super({ ...(options as IViewletPaneOptions), ariaHeaderLabel: nls.localize('breakpointsSection', "Breakpoints Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
this.minimumBodySize = this.maximumBodySize = this.getExpandedBodySize();
this._register(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange()));
@@ -85,6 +88,9 @@ export class BreakpointsView extends ViewletPanel {
getPosInSet: (_: IEnablement, index: number) => index,
getRole: (breakpoint: IEnablement) => 'checkbox',
isChecked: (breakpoint: IEnablement) => breakpoint.enabled
},
overrideStyles: {
listBackground: SIDE_BAR_BACKGROUND
}
});
@@ -346,7 +352,7 @@ class BreakpointsRenderer implements IListRenderer<IBreakpoint, IBreakpointTempl
data.checkbox.checked = breakpoint.enabled;
const { message, className } = getBreakpointMessageAndClassName(this.debugService, breakpoint);
data.icon.className = className + ' icon';
data.icon.className = `codicon ${className}`;
data.breakpoint.title = breakpoint.message || message || '';
const debugActive = this.debugService.state === State.Running || this.debugService.state === State.Stopped;
@@ -441,7 +447,7 @@ class FunctionBreakpointsRenderer implements IListRenderer<FunctionBreakpoint, I
data.context = functionBreakpoint;
data.name.textContent = functionBreakpoint.name;
const { className, message } = getBreakpointMessageAndClassName(this.debugService, functionBreakpoint);
data.icon.className = className + ' icon';
data.icon.className = `codicon ${className}`;
data.icon.title = message ? message : '';
data.checkbox.checked = functionBreakpoint.enabled;
data.breakpoint.title = message ? message : '';
@@ -496,7 +502,7 @@ class DataBreakpointsRenderer implements IListRenderer<DataBreakpoint, IBaseBrea
data.context = dataBreakpoint;
data.name.textContent = dataBreakpoint.label;
const { className, message } = getBreakpointMessageAndClassName(this.debugService, dataBreakpoint);
data.icon.className = className + ' icon';
data.icon.className = `codicon ${className}`;
data.icon.title = message ? message : '';
data.checkbox.checked = dataBreakpoint.enabled;
data.breakpoint.title = message ? message : '';
@@ -587,7 +593,7 @@ class FunctionBreakpointInputRenderer implements IListRenderer<IFunctionBreakpoi
data.reactedOnEvent = false;
const { className, message } = getBreakpointMessageAndClassName(this.debugService, functionBreakpoint);
data.icon.className = className + ' icon';
data.icon.className = `codicon ${className}`;
data.icon.title = message ? message : '';
data.checkbox.checked = functionBreakpoint.enabled;
data.checkbox.disabled = true;
@@ -638,7 +644,7 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
if (!breakpoint.enabled || !debugService.getModel().areBreakpointsActivated()) {
return {
className: breakpoint instanceof DataBreakpoint ? 'debug-data-breakpoint-disabled' : breakpoint instanceof FunctionBreakpoint ? 'debug-function-breakpoint-disabled' : breakpoint.logMessage ? 'debug-breakpoint-log-disabled' : 'debug-breakpoint-disabled',
className: breakpoint instanceof DataBreakpoint ? 'codicon-debug-breakpoint-data-disabled' : breakpoint instanceof FunctionBreakpoint ? 'codicon-debug-breakpoint-function-disabled' : breakpoint.logMessage ? 'codicon-debug-breakpoint-log-disabled' : 'codicon-debug-breakpoint-disabled',
message: breakpoint.logMessage ? nls.localize('disabledLogpoint', "Disabled Logpoint") : nls.localize('disabledBreakpoint', "Disabled Breakpoint"),
};
}
@@ -648,7 +654,7 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
};
if (debugActive && !breakpoint.verified) {
return {
className: breakpoint instanceof DataBreakpoint ? 'debug-data-breakpoint-unverified' : breakpoint instanceof FunctionBreakpoint ? 'debug-function-breakpoint-unverified' : breakpoint.logMessage ? 'debug-breakpoint-log-unverified' : 'debug-breakpoint-unverified',
className: breakpoint instanceof DataBreakpoint ? 'codicon-debug-breakpoint-data-unverified' : breakpoint instanceof FunctionBreakpoint ? 'codicon-debug-breakpoint-function-unverified' : breakpoint.logMessage ? 'codicon-debug-breakpoint-log-unverified' : 'codicon-debug-breakpoint-unverified',
message: breakpoint.message || (breakpoint.logMessage ? nls.localize('unverifiedLogpoint', "Unverified Logpoint") : nls.localize('unverifiedBreakopint', "Unverified Breakpoint")),
};
}
@@ -656,13 +662,13 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
if (breakpoint instanceof FunctionBreakpoint) {
if (!breakpoint.supported) {
return {
className: 'debug-function-breakpoint-unverified',
className: 'codicon-debug-breakpoint-function-unverified',
message: nls.localize('functionBreakpointUnsupported', "Function breakpoints not supported by this debug type"),
};
}
return {
className: 'debug-function-breakpoint',
className: 'codicon-debug-breakpoint-function',
message: breakpoint.message || nls.localize('functionBreakpoint', "Function Breakpoint")
};
}
@@ -670,13 +676,13 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
if (breakpoint instanceof DataBreakpoint) {
if (!breakpoint.supported) {
return {
className: 'debug-data-breakpoint-unverified',
className: 'codicon-debug-breakpoint-data-unverified',
message: nls.localize('dataBreakpointUnsupported', "Data breakpoints not supported by this debug type"),
};
}
return {
className: 'debug-data-breakpoint',
className: 'codicon-debug-breakpoint-data',
message: breakpoint.message || nls.localize('dataBreakpoint', "Data Breakpoint")
};
}
@@ -686,7 +692,7 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
if (!breakpoint.supported) {
return {
className: 'debug-breakpoint-unsupported',
className: 'codicon-debug-breakpoint-unsupported',
message: nls.localize('breakpointUnsupported', "Breakpoints of this type are not supported by the debugger"),
};
}
@@ -702,13 +708,32 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
}
return {
className: breakpoint.logMessage ? 'debug-breakpoint-log' : 'debug-breakpoint-conditional',
className: breakpoint.logMessage ? 'codicon-debug-breakpoint-log' : 'codicon-debug-breakpoint-conditional',
message: appendMessage(messages.join('\n'))
};
}
const focusedThread = debugService.getViewModel().focusedThread;
if (focusedThread) {
const callStack = focusedThread ? focusedThread.getCallStack() : undefined;
const topStackFrame = callStack ? callStack[0] : undefined;
if (topStackFrame && topStackFrame.source.uri.toString() === breakpoint.uri.toString() && topStackFrame.range.startLineNumber === breakpoint.lineNumber) {
if (topStackFrame.range.startColumn === breakpoint.column) {
return {
className: 'codicon-debug-breakpoint-stackframe-dot',
message: breakpoint.message || nls.localize('breakpoint', "Breakpoint")
};
} else if (breakpoint.column === undefined) {
return {
className: 'codicon-debug-breakpoint',
message: breakpoint.message || nls.localize('breakpoint', "Breakpoint")
};
}
}
}
return {
className: 'debug-breakpoint',
className: 'codicon-debug-breakpoint',
message: breakpoint.message || nls.localize('breakpoint', "Breakpoint")
};
}