mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 12:08:36 -05:00
Merge from vscode 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 (#6516)
* Merge from vscode 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 * fix tests
This commit is contained in:
@@ -83,7 +83,7 @@ export class BreakpointsView extends ViewletPanel {
|
||||
getRole: (breakpoint: IEnablement) => 'checkbox',
|
||||
isChecked: (breakpoint: IEnablement) => breakpoint.enabled
|
||||
}
|
||||
}) as WorkbenchList<IEnablement>;
|
||||
});
|
||||
|
||||
CONTEXT_BREAKPOINTS_FOCUSED.bindTo(this.list.contextKeyService);
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ export class CallStackView extends ViewletPanel {
|
||||
return nls.localize('showMoreStackFrames2', "Show More Stack Frames");
|
||||
}
|
||||
}
|
||||
}) as WorkbenchAsyncDataTree<CallStackItem | IDebugModel, CallStackItem, FuzzyScore>;
|
||||
});
|
||||
|
||||
this.tree.setInput(this.debugService.getModel()).then(undefined, onUnexpectedError);
|
||||
|
||||
|
||||
@@ -539,7 +539,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
||||
// Touch Bar
|
||||
if (isMacintosh) {
|
||||
|
||||
const registerTouchBarEntry = (id: string, title: string, order: number, when: ContextKeyExpr, icon: string) => {
|
||||
const registerTouchBarEntry = (id: string, title: string, order: number, when: ContextKeyExpr | undefined, icon: string) => {
|
||||
MenuRegistry.appendMenuItem(MenuId.TouchBarContext, {
|
||||
command: {
|
||||
id,
|
||||
|
||||
@@ -21,7 +21,7 @@ import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { IWorkspaceContextService, IWorkspaceFolder, WorkbenchState } from 'vs/platform/workspace/common/workspace';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IDebugConfigurationProvider, ICompound, IDebugConfiguration, IConfig, IGlobalConfig, IConfigurationManager, ILaunch, IDebugAdapterDescriptorFactory, IDebugAdapter, ITerminalSettings, IDebugSession, IAdapterDescriptor, CONTEXT_DEBUG_CONFIGURATION_TYPE, IDebugAdapterFactory, IDebugService } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { IDebugConfigurationProvider, ICompound, IDebugConfiguration, IConfig, IGlobalConfig, IConfigurationManager, ILaunch, IDebugAdapterDescriptorFactory, IDebugAdapter, IDebugSession, IAdapterDescriptor, CONTEXT_DEBUG_CONFIGURATION_TYPE, IDebugAdapterFactory, IDebugService } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { Debugger } from 'vs/workbench/contrib/debug/common/debugger';
|
||||
import { IEditorService, ACTIVE_GROUP, SIDE_GROUP } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { isCodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
@@ -108,10 +108,10 @@ export class ConfigurationManager implements IConfigurationManager {
|
||||
return Promise.resolve(config);
|
||||
}
|
||||
|
||||
runInTerminal(debugType: string, args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): Promise<number | undefined> {
|
||||
runInTerminal(debugType: string, args: DebugProtocol.RunInTerminalRequestArguments): Promise<number | undefined> {
|
||||
let tl = this.debugAdapterFactories.get(debugType);
|
||||
if (tl) {
|
||||
return tl.runInTerminal(args, config);
|
||||
return tl.runInTerminal(args);
|
||||
}
|
||||
return Promise.resolve(void 0);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ export class DebugHoverWidget implements IContentWidget {
|
||||
accessibilityProvider: new DebugHoverAccessibilityProvider(),
|
||||
mouseSupport: false,
|
||||
horizontalScrolling: true
|
||||
}) as any as AsyncDataTree<IExpression, IExpression, any>;
|
||||
});
|
||||
|
||||
this.valueContainer = $('.value');
|
||||
this.valueContainer.tabIndex = 0;
|
||||
|
||||
@@ -31,7 +31,6 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
import { ReplModel } from 'vs/workbench/contrib/debug/common/replModel';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { ISignService } from 'vs/platform/sign/common/sign';
|
||||
|
||||
export class DebugSession implements IDebugSession {
|
||||
|
||||
@@ -66,7 +65,6 @@ export class DebugSession implements IDebugSession {
|
||||
@IViewletService private readonly viewletService: IViewletService,
|
||||
@IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
|
||||
@INotificationService private readonly notificationService: INotificationService,
|
||||
@ISignService private readonly signService: ISignService,
|
||||
@IProductService private readonly productService: IProductService,
|
||||
@IWindowsService private readonly windowsService: IWindowsService
|
||||
) {
|
||||
@@ -169,7 +167,7 @@ export class DebugSession implements IDebugSession {
|
||||
|
||||
return dbgr.createDebugAdapter(this).then(debugAdapter => {
|
||||
|
||||
this.raw = new RawDebugSession(debugAdapter, dbgr, this.telemetryService, customTelemetryService, this.signService, this.windowsService);
|
||||
this.raw = new RawDebugSession(debugAdapter, dbgr, this.telemetryService, customTelemetryService, this.windowsService);
|
||||
|
||||
return this.raw!.start().then(() => {
|
||||
|
||||
|
||||
@@ -433,7 +433,7 @@ export class LoadedScriptsView extends ViewletPanel {
|
||||
accessibilityProvider: new LoadedSciptsAccessibilityProvider(),
|
||||
ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'loadedScriptsAriaLabel' }, "Debug Loaded Scripts"),
|
||||
}
|
||||
) as WorkbenchAsyncDataTree<LoadedScriptsItem, LoadedScriptsItem, FuzzyScore>;
|
||||
);
|
||||
|
||||
this.tree.setInput(root);
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { formatPII, isUri } from 'vs/workbench/contrib/debug/common/debugUtils';
|
||||
import { IDebugAdapter, IConfig, AdapterEndEvent, IDebugger } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { createErrorWithActions } from 'vs/base/common/errorsWithActions';
|
||||
import { ISignService } from 'vs/platform/sign/common/sign';
|
||||
import { ParsedArgs } from 'vs/platform/environment/common/environment';
|
||||
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
@@ -74,7 +73,6 @@ export class RawDebugSession {
|
||||
dbgr: IDebugger,
|
||||
private readonly telemetryService: ITelemetryService,
|
||||
public readonly customTelemetryService: ITelemetryService | undefined,
|
||||
private readonly signService: ISignService,
|
||||
private readonly windowsService: IWindowsService
|
||||
|
||||
) {
|
||||
@@ -548,19 +546,6 @@ export class RawDebugSession {
|
||||
safeSendResponse(response);
|
||||
});
|
||||
break;
|
||||
case 'handshake':
|
||||
try {
|
||||
const signature = await this.signService.sign(request.arguments.value);
|
||||
response.body = {
|
||||
signature: signature
|
||||
};
|
||||
safeSendResponse(response);
|
||||
} catch (e) {
|
||||
response.success = false;
|
||||
response.message = e.message;
|
||||
safeSendResponse(response);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
response.success = false;
|
||||
response.message = `unknown request '${request.command}'`;
|
||||
@@ -602,7 +587,13 @@ export class RawDebugSession {
|
||||
}
|
||||
|
||||
} else {
|
||||
args._.push(a2);
|
||||
const match = /^--(.+)$/.exec(a2);
|
||||
if (match && match.length === 2) {
|
||||
const key = match[1];
|
||||
(<any>args)[key] = true;
|
||||
} else {
|
||||
args._.push(a2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,12 +378,19 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati
|
||||
this.replDelegate = new ReplDelegate(this.configurationService);
|
||||
const wordWrap = this.configurationService.getValue<IDebugConfiguration>('debug').console.wordWrap;
|
||||
dom.toggleClass(treeContainer, 'word-wrap', wordWrap);
|
||||
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, treeContainer, this.replDelegate, [
|
||||
this.instantiationService.createInstance(VariablesRenderer),
|
||||
this.instantiationService.createInstance(ReplSimpleElementsRenderer),
|
||||
new ReplExpressionsRenderer(),
|
||||
new ReplRawObjectsRenderer()
|
||||
], new ReplDataSource(), {
|
||||
this.tree = this.instantiationService.createInstance(
|
||||
WorkbenchAsyncDataTree,
|
||||
treeContainer,
|
||||
this.replDelegate,
|
||||
[
|
||||
this.instantiationService.createInstance(VariablesRenderer),
|
||||
this.instantiationService.createInstance(ReplSimpleElementsRenderer),
|
||||
new ReplExpressionsRenderer(),
|
||||
new ReplRawObjectsRenderer()
|
||||
],
|
||||
// https://github.com/microsoft/TypeScript/issues/32526
|
||||
new ReplDataSource() as IAsyncDataSource<IDebugSession, IReplElement>,
|
||||
{
|
||||
ariaLabel: nls.localize('replAriaLabel', "Read Eval Print Loop Panel"),
|
||||
accessibilityProvider: new ReplAccessibilityProvider(),
|
||||
identityProvider: { getId: (element: IReplElement) => element.getId() },
|
||||
@@ -392,7 +399,7 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati
|
||||
horizontalScrolling: !wordWrap,
|
||||
setRowLineHeight: false,
|
||||
supportDynamicHeights: wordWrap
|
||||
}) as WorkbenchAsyncDataTree<IDebugSession, IReplElement, FuzzyScore>;
|
||||
});
|
||||
this._register(this.tree.onContextMenu(e => this.onContextMenu(e)));
|
||||
let lastSelectedString: string;
|
||||
this._register(this.tree.onMouseClick(() => {
|
||||
|
||||
@@ -91,7 +91,7 @@ export class VariablesView extends ViewletPanel {
|
||||
accessibilityProvider: new VariablesAccessibilityProvider(),
|
||||
identityProvider: { getId: (element: IExpression | IScope) => element.getId() },
|
||||
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression | IScope) => e }
|
||||
}) as WorkbenchAsyncDataTree<IViewModel | IExpression | IScope, IExpression | IScope, FuzzyScore>;
|
||||
});
|
||||
|
||||
this.tree.setInput(this.debugService.getViewModel()).then(null, onUnexpectedError);
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ export class WatchExpressionsView extends ViewletPanel {
|
||||
identityProvider: { getId: (element: IExpression) => element.getId() },
|
||||
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression) => e },
|
||||
dnd: new WatchExpressionsDragAndDrop(this.debugService),
|
||||
}) as WorkbenchAsyncDataTree<IDebugService | IExpression, IExpression, FuzzyScore>;
|
||||
});
|
||||
|
||||
this.tree.setInput(this.debugService).then(undefined, onUnexpectedError);
|
||||
CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bindTo(this.tree.contextKeyService);
|
||||
|
||||
Reference in New Issue
Block a user