mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 3c6f6af7347d38e87bc6406024e8dcf9e9bce229 (#8962)
* Merge from vscode 3c6f6af7347d38e87bc6406024e8dcf9e9bce229 * skip failing tests * update mac build image
This commit is contained in:
committed by
Karl Burtram
parent
0eaee18dc4
commit
fefe1454de
@@ -33,6 +33,7 @@ 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';
|
||||
import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
@@ -66,9 +67,10 @@ export class BreakpointsView extends ViewPane {
|
||||
@IEditorService private readonly editorService: IEditorService,
|
||||
@IContextViewService private readonly contextViewService: IContextViewService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
) {
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('breakpointsSection', "Breakpoints Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, instantiationService);
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('breakpointsSection', "Breakpoints Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService);
|
||||
|
||||
this.minimumBodySize = this.maximumBodySize = getExpandedBodySize(this.debugService.getModel());
|
||||
this._register(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange()));
|
||||
|
||||
@@ -24,7 +24,7 @@ import { IAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { createAndFillInContextMenuActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
|
||||
import { ITreeRenderer, ITreeNode, ITreeContextMenuEvent, IAsyncDataSource } from 'vs/base/browser/ui/tree/tree';
|
||||
import { TreeResourceNavigator2, WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService';
|
||||
import { TreeResourceNavigator, WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService';
|
||||
import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
|
||||
import { createMatches, FuzzyScore } from 'vs/base/common/filters';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
@@ -35,6 +35,7 @@ import { STOP_ID, STOP_LABEL, DISCONNECT_ID, DISCONNECT_LABEL, RESTART_SESSION_I
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { CollapseAction } from 'vs/workbench/browser/viewlet';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
@@ -92,12 +93,13 @@ export class CallStackView extends ViewPane {
|
||||
@IDebugService private readonly debugService: IDebugService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
|
||||
@IEditorService private readonly editorService: IEditorService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IMenuService menuService: IMenuService,
|
||||
@IContextKeyService readonly contextKeyService: IContextKeyService,
|
||||
) {
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, instantiationService);
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService);
|
||||
this.callStackItemType = CONTEXT_CALLSTACK_ITEM_TYPE.bindTo(contextKeyService);
|
||||
|
||||
this.contributedContextMenu = menuService.createMenu(MenuId.DebugCallStackContext, contextKeyService);
|
||||
@@ -201,7 +203,7 @@ export class CallStackView extends ViewPane {
|
||||
|
||||
this.tree.setInput(this.debugService.getModel());
|
||||
|
||||
const callstackNavigator = new TreeResourceNavigator2(this.tree);
|
||||
const callstackNavigator = new TreeResourceNavigator(this.tree);
|
||||
this._register(callstackNavigator);
|
||||
this._register(callstackNavigator.onDidOpenResource(e => {
|
||||
if (this.ignoreSelectionChangedEvent) {
|
||||
|
||||
@@ -596,8 +596,9 @@ export class DebugService implements IDebugService {
|
||||
return Promise.resolve(TaskRunResult.Success);
|
||||
}
|
||||
|
||||
await this.taskRunner.runTask(session.root, session.configuration.postDebugTask);
|
||||
return this.taskRunner.runTaskAndCheckErrors(session.root, session.configuration.preLaunchTask, (msg, actions) => this.showError(msg, actions));
|
||||
const root = session.root || this.contextService.getWorkspace();
|
||||
await this.taskRunner.runTask(root, session.configuration.postDebugTask);
|
||||
return this.taskRunner.runTaskAndCheckErrors(root, session.configuration.preLaunchTask, (msg, actions) => this.showError(msg, actions));
|
||||
};
|
||||
|
||||
const extensionDebugSession = getExtensionHostDebugSession(session);
|
||||
|
||||
@@ -33,6 +33,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
|
||||
import { TogglePanelAction } from 'vs/workbench/browser/panel';
|
||||
import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
|
||||
import { StartView } from 'vs/workbench/contrib/debug/browser/startView';
|
||||
import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
|
||||
export class DebugViewPaneContainer extends ViewPaneContainer {
|
||||
|
||||
@@ -59,9 +60,10 @@ export class DebugViewPaneContainer extends ViewPaneContainer {
|
||||
@IContextViewService private readonly contextViewService: IContextViewService,
|
||||
@IMenuService private readonly menuService: IMenuService,
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||
@INotificationService private readonly notificationService: INotificationService
|
||||
@INotificationService private readonly notificationService: INotificationService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService
|
||||
) {
|
||||
super(VIEWLET_ID, `${VIEWLET_ID}.state`, { mergeViewWithContainerWhenSingleView: true }, instantiationService, configurationService, layoutService, contextMenuService, telemetryService, extensionService, themeService, storageService, contextService);
|
||||
super(VIEWLET_ID, `${VIEWLET_ID}.state`, { mergeViewWithContainerWhenSingleView: true }, instantiationService, configurationService, layoutService, contextMenuService, telemetryService, extensionService, themeService, storageService, contextService, viewDescriptorService);
|
||||
|
||||
this._register(this.debugService.onDidChangeState(state => this.onDebugServiceStateChange(state)));
|
||||
this._register(this.debugService.onDidNewSession(() => this.updateToolBar()));
|
||||
@@ -238,6 +240,6 @@ export class OpenDebugPanelAction extends TogglePanelAction {
|
||||
@IPanelService panelService: IPanelService,
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService
|
||||
) {
|
||||
super(id, label, DEBUG_PANEL_ID, panelService, layoutService);
|
||||
super(id, label, DEBUG_PANEL_ID, panelService, layoutService, 'codicon-repl');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
|
||||
import { ITreeNode, ITreeFilter, TreeVisibility, TreeFilterResult, ITreeElement } from 'vs/base/browser/ui/tree/tree';
|
||||
import { IAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { TreeResourceNavigator2, WorkbenchCompressibleObjectTree } from 'vs/platform/list/browser/listService';
|
||||
import { TreeResourceNavigator, WorkbenchCompressibleObjectTree } from 'vs/platform/list/browser/listService';
|
||||
import { dispose } from 'vs/base/common/lifecycle';
|
||||
import { createMatches, FuzzyScore } from 'vs/base/common/filters';
|
||||
import { DebugContentProvider } from 'vs/workbench/contrib/debug/common/debugContentProvider';
|
||||
@@ -37,6 +37,7 @@ import { ILabelService } from 'vs/platform/label/common/label';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import type { ICompressedTreeNode } from 'vs/base/browser/ui/tree/compressedObjectTreeModel';
|
||||
import type { ICompressibleTreeRenderer } from 'vs/base/browser/ui/tree/objectTree';
|
||||
import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
|
||||
const NEW_STYLE_COMPRESS = true;
|
||||
|
||||
@@ -415,6 +416,7 @@ export class LoadedScriptsView extends ViewPane {
|
||||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IEditorService private readonly editorService: IEditorService,
|
||||
@IContextKeyService readonly contextKeyService: IContextKeyService,
|
||||
@@ -423,7 +425,7 @@ export class LoadedScriptsView extends ViewPane {
|
||||
@IDebugService private readonly debugService: IDebugService,
|
||||
@ILabelService private readonly labelService: ILabelService
|
||||
) {
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('loadedScriptsSection', "Loaded Scripts Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, instantiationService);
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('loadedScriptsSection', "Loaded Scripts Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService);
|
||||
this.loadedScriptsItemType = CONTEXT_LOADED_SCRIPTS_ITEM_TYPE.bindTo(contextKeyService);
|
||||
}
|
||||
|
||||
@@ -481,7 +483,7 @@ export class LoadedScriptsView extends ViewPane {
|
||||
}, 300);
|
||||
this._register(this.changeScheduler);
|
||||
|
||||
const loadedScriptsNavigator = new TreeResourceNavigator2(this.tree);
|
||||
const loadedScriptsNavigator = new TreeResourceNavigator(this.tree);
|
||||
this._register(loadedScriptsNavigator);
|
||||
this._register(loadedScriptsNavigator.onDidOpenResource(e => {
|
||||
if (e.element instanceof BaseTreeItem) {
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
}
|
||||
|
||||
.monaco-workbench .monaco-list-row .expression .value.number {
|
||||
color: #09885a;
|
||||
color: #098658;
|
||||
}
|
||||
|
||||
.monaco-workbench .monaco-list-row .expression .value.boolean {
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
}
|
||||
|
||||
.monaco-editor .debug-hover-widget .value.number {
|
||||
color: #09885A;
|
||||
color: #098658;
|
||||
}
|
||||
|
||||
.monaco-editor .debug-hover-widget .value.boolean {
|
||||
|
||||
@@ -173,8 +173,13 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list-row:hover .stack-frame.has-actions .file {
|
||||
display: none;
|
||||
.debug-viewlet .debug-call-stack .monaco-list-row:hover .stack-frame.has-actions .file .line-number {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list-row:hover .stack-frame.has-actions .monaco-action-bar {
|
||||
position: absolute;
|
||||
right: 2px;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list-row .monaco-action-bar {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
|
||||
.monaco-workbench.mac .repl .repl-tree .monaco-tl-twistie {
|
||||
padding-right: 0px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.repl .repl-tree .output.expression.value-and-source {
|
||||
@@ -63,6 +63,10 @@
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.repl .repl-tree .monaco-list-rows > .monaco-list-row .monaco-tl-twistie.collapsible {
|
||||
padding-left: 18px !important;
|
||||
}
|
||||
|
||||
.repl .repl-tree .output.expression > .value,
|
||||
.repl .repl-tree .evaluation-result.expression > .value {
|
||||
margin-left: 0px;
|
||||
|
||||
@@ -55,7 +55,7 @@ import { ReplDelegate, ReplVariablesRenderer, ReplSimpleElementsRenderer, ReplEv
|
||||
import { localize } from 'vs/nls';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IViewsService } from 'vs/workbench/common/views';
|
||||
import { IViewsService, IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
@@ -109,6 +109,7 @@ export class Repl extends ViewPane implements IPrivateReplService, IHistoryNavig
|
||||
@IModelService private readonly modelService: IModelService,
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||
@ICodeEditorService codeEditorService: ICodeEditorService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
|
||||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@ITextResourcePropertiesService private readonly textResourcePropertiesService: ITextResourcePropertiesService,
|
||||
@@ -116,7 +117,7 @@ export class Repl extends ViewPane implements IPrivateReplService, IHistoryNavig
|
||||
@IEditorService private readonly editorService: IEditorService,
|
||||
@IKeybindingService keybindingService: IKeybindingService
|
||||
) {
|
||||
super({ ...(options as IViewPaneOptions), id: REPL_VIEW_ID, ariaHeaderLabel: localize('debugConsole', "Debug Console") }, keybindingService, contextMenuService, configurationService, contextKeyService, instantiationService);
|
||||
super({ ...(options as IViewPaneOptions), id: REPL_VIEW_ID, ariaHeaderLabel: localize('debugConsole', "Debug Console") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService);
|
||||
|
||||
this.history = new HistoryNavigator(JSON.parse(this.storageService.get(HISTORY_STORAGE_KEY, StorageScope.WORKSPACE, '[]')), 50);
|
||||
codeEditorService.registerDecorationType(DECORATION_KEY, {});
|
||||
|
||||
@@ -60,7 +60,7 @@ export class ReplEvaluationInputsRenderer implements ITreeRenderer<ReplEvaluatio
|
||||
}
|
||||
|
||||
renderTemplate(container: HTMLElement): IReplEvaluationInputTemplateData {
|
||||
dom.append(container, $('span.arrow.codicon.codicon-chevron-right'));
|
||||
dom.append(container, $('span.arrow.codicon.codicon-arrow-small-right'));
|
||||
const input = dom.append(container, $('.expression'));
|
||||
const label = new HighlightedLabel(input, false);
|
||||
return { label };
|
||||
@@ -86,7 +86,6 @@ export class ReplEvaluationResultsRenderer implements ITreeRenderer<ReplEvaluati
|
||||
constructor(private readonly linkDetector: LinkDetector) { }
|
||||
|
||||
renderTemplate(container: HTMLElement): IReplEvaluationResultTemplateData {
|
||||
dom.append(container, $('span.arrow.codicon.codicon-chevron-left'));
|
||||
const output = dom.append(container, $('.evaluation-result.expression'));
|
||||
const value = dom.append(output, $('span.value'));
|
||||
const annotation = dom.append(output, $('span'));
|
||||
|
||||
@@ -25,6 +25,7 @@ import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
const $ = dom.$;
|
||||
|
||||
interface DebugStartMetrics {
|
||||
@@ -73,9 +74,10 @@ export class StartView extends ViewPane {
|
||||
@IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
|
||||
@IFileDialogService private readonly dialogService: IFileDialogService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
|
||||
@ITelemetryService private readonly telemetryService: ITelemetryService
|
||||
) {
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: localize('debugStart', "Debug Start Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, instantiationService);
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: localize('debugStart', "Debug Start Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService);
|
||||
this._register(editorService.onDidActiveEditorChange(() => this.updateView()));
|
||||
this._register(this.debugService.getConfigurationManager().onDidRegisterDebugger(() => this.updateView()));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { localize } from 'vs/nls';
|
||||
import { registerColor, contrastBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { IDebugService, State } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { IDebugService, State, IDebugSession } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';
|
||||
import { STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_NO_FOLDER_FOREGROUND, STATUS_BAR_BACKGROUND, Themable, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_BORDER, STATUS_BAR_BORDER } from 'vs/workbench/common/theme';
|
||||
import { addClass, removeClass, createStyleSheet } from 'vs/base/browser/dom';
|
||||
@@ -58,7 +58,7 @@ export class StatusBarColorProvider extends Themable implements IWorkbenchContri
|
||||
super.updateStyles();
|
||||
|
||||
const container = assertIsDefined(this.layoutService.getContainer(Parts.STATUSBAR_PART));
|
||||
if (isStatusbarInDebugMode(this.debugService)) {
|
||||
if (isStatusbarInDebugMode(this.debugService.state, this.debugService.getViewModel().focusedSession)) {
|
||||
addClass(container, 'debugging');
|
||||
} else {
|
||||
removeClass(container, 'debugging');
|
||||
@@ -90,7 +90,7 @@ export class StatusBarColorProvider extends Themable implements IWorkbenchContri
|
||||
private getColorKey(noFolderColor: string, debuggingColor: string, normalColor: string): string {
|
||||
|
||||
// Not debugging
|
||||
if (!isStatusbarInDebugMode(this.debugService)) {
|
||||
if (!isStatusbarInDebugMode(this.debugService.state, this.debugService.getViewModel().focusedSession)) {
|
||||
if (this.contextService.getWorkbenchState() !== WorkbenchState.EMPTY) {
|
||||
return normalColor;
|
||||
}
|
||||
@@ -103,12 +103,10 @@ export class StatusBarColorProvider extends Themable implements IWorkbenchContri
|
||||
}
|
||||
}
|
||||
|
||||
function isStatusbarInDebugMode(debugService: IDebugService): boolean {
|
||||
if (debugService.state === State.Inactive || debugService.state === State.Initializing) {
|
||||
export function isStatusbarInDebugMode(state: State, session: IDebugSession | undefined): boolean {
|
||||
if (state === State.Inactive || state === State.Initializing) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const session = debugService.getViewModel().focusedSession;
|
||||
const isRunningWithoutDebug = session?.configuration?.noDebug;
|
||||
if (isRunningWithoutDebug) {
|
||||
return false;
|
||||
|
||||
@@ -31,6 +31,7 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { dispose } from 'vs/base/common/lifecycle';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
|
||||
const $ = dom.$;
|
||||
let forgetScopes = true;
|
||||
@@ -51,10 +52,11 @@ export class VariablesView extends ViewPane {
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
|
||||
@IClipboardService private readonly clipboardService: IClipboardService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService
|
||||
) {
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, instantiationService);
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService);
|
||||
|
||||
// Use scheduler to prevent unnecessary flashing
|
||||
this.onFocusStackFrameScheduler = new RunOnceScheduler(async () => {
|
||||
|
||||
@@ -31,6 +31,7 @@ import { variableSetEmitter, VariablesRenderer } from 'vs/workbench/contrib/debu
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { dispose } from 'vs/base/common/lifecycle';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
|
||||
const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024;
|
||||
let ignoreVariableSetEmitter = false;
|
||||
@@ -48,10 +49,11 @@ export class WatchExpressionsView extends ViewPane {
|
||||
@IDebugService private readonly debugService: IDebugService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
) {
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('watchExpressionsSection', "Watch Expressions Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, instantiationService);
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('watchExpressionsSection', "Watch Expressions Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService);
|
||||
|
||||
this.onWatchExpressionsUpdatedScheduler = new RunOnceScheduler(() => {
|
||||
this.needsRefresh = false;
|
||||
|
||||
@@ -6,12 +6,15 @@
|
||||
import * as assert from 'assert';
|
||||
import { replaceWhitespace, renderExpressionValue, renderVariable, renderViewTree } from 'vs/workbench/contrib/debug/browser/baseDebugView';
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
import { Expression, Variable, Scope, StackFrame, Thread } from 'vs/workbench/contrib/debug/common/debugModel';
|
||||
import { Expression, Variable, Scope, StackFrame, Thread, DebugModel } from 'vs/workbench/contrib/debug/common/debugModel';
|
||||
import { MockSession } from 'vs/workbench/contrib/debug/test/common/mockDebug';
|
||||
import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
|
||||
import { LinkDetector } from 'vs/workbench/contrib/debug/browser/linkDetector';
|
||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
import { workbenchInstantiationService } from 'vs/workbench/test/workbenchTestServices';
|
||||
import { createMockSession } from 'vs/workbench/contrib/debug/test/browser/callStack.test';
|
||||
import { isStatusbarInDebugMode } from 'vs/workbench/contrib/debug/browser/statusbarColorProvider';
|
||||
import { State } from 'vs/workbench/contrib/debug/common/debug';
|
||||
const $ = dom.$;
|
||||
|
||||
suite('Debug - Base Debug View', () => {
|
||||
@@ -124,4 +127,15 @@ suite('Debug - Base Debug View', () => {
|
||||
assert.equal(label.element.title, 'console');
|
||||
assert.equal(value.className, 'value number');
|
||||
});
|
||||
|
||||
test('statusbar in debug mode', () => {
|
||||
const model = new DebugModel([], [], [], [], [], <any>{ isDirty: (e: any) => false });
|
||||
const session = createMockSession(model);
|
||||
assert.equal(isStatusbarInDebugMode(State.Inactive, undefined), false);
|
||||
assert.equal(isStatusbarInDebugMode(State.Initializing, session), false);
|
||||
assert.equal(isStatusbarInDebugMode(State.Running, session), true);
|
||||
assert.equal(isStatusbarInDebugMode(State.Stopped, session), true);
|
||||
session.configuration.noDebug = true;
|
||||
assert.equal(isStatusbarInDebugMode(State.Running, session), false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user