mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-25 14:20:30 -04:00
Refresh master with initial release/0.24 snapshot (#332)
* Initial port of release/0.24 source code * Fix additional headers * Fix a typo in launch.json
This commit is contained in:
@@ -15,7 +15,6 @@ import { SelectActionItem, IActionItem } from 'vs/base/browser/ui/actionbar/acti
|
||||
import { EventEmitter } from 'vs/base/common/eventEmitter';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen';
|
||||
import { IDebugService } from 'vs/workbench/parts/debug/common/debug';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { attachSelectBoxStyler, attachStylerCallback } from 'vs/platform/theme/common/styler';
|
||||
@@ -42,8 +41,7 @@ export class StartDebugActionItem extends EventEmitter implements IActionItem {
|
||||
@IDebugService private debugService: IDebugService,
|
||||
@IThemeService private themeService: IThemeService,
|
||||
@IConfigurationService private configurationService: IConfigurationService,
|
||||
@ICommandService private commandService: ICommandService,
|
||||
@IQuickOpenService private quickOpenService: IQuickOpenService
|
||||
@ICommandService private commandService: ICommandService
|
||||
) {
|
||||
super();
|
||||
this.toDispose = [];
|
||||
@@ -56,8 +54,8 @@ export class StartDebugActionItem extends EventEmitter implements IActionItem {
|
||||
}
|
||||
|
||||
private registerListeners(): void {
|
||||
this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => {
|
||||
if (e.sourceConfig.launch) {
|
||||
this.toDispose.push(this.configurationService.onDidChangeConfiguration(e => {
|
||||
if (e.affectsConfiguration('launch')) {
|
||||
this.updateOptions();
|
||||
}
|
||||
}));
|
||||
@@ -160,7 +158,7 @@ export class StartDebugActionItem extends EventEmitter implements IActionItem {
|
||||
if (name === manager.selectedName && launch === manager.selectedLaunch) {
|
||||
this.selected = this.options.length;
|
||||
}
|
||||
const label = launches.length > 1 ? `${name} (${launch.name})` : name;
|
||||
const label = launches.length > 1 ? `${name} (${launch.workspace.name})` : name;
|
||||
this.options.push({ label, handler: () => { manager.selectConfiguration(launch, name); return true; } });
|
||||
}));
|
||||
|
||||
@@ -171,10 +169,10 @@ export class StartDebugActionItem extends EventEmitter implements IActionItem {
|
||||
|
||||
const disabledIdx = this.options.length - 1;
|
||||
launches.forEach(l => {
|
||||
const label = launches.length > 1 ? nls.localize("addConfigTo", "Add Config ({0})...", l.name) : nls.localize('addConfiguration', "Add Configuration...");
|
||||
const label = launches.length > 1 ? nls.localize("addConfigTo", "Add Config ({0})...", l.workspace.name) : nls.localize('addConfiguration', "Add Configuration...");
|
||||
this.options.push({
|
||||
label, handler: () => {
|
||||
this.commandService.executeCommand('debug.addConfiguration', l.workspaceUri.toString()).done(undefined, errors.onUnexpectedError);
|
||||
this.commandService.executeCommand('debug.addConfiguration', l.workspace.uri.toString()).done(undefined, errors.onUnexpectedError);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user