提交 c4ed5444 编写于 作者: I isidor

debug start view: remove run button, so we have just Run and Debug

fixes #87162
上级 0664ac40
...@@ -14,7 +14,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur ...@@ -14,7 +14,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { localize } from 'vs/nls'; import { localize } from 'vs/nls';
import { ICommandService } from 'vs/platform/commands/common/commands'; import { ICommandService } from 'vs/platform/commands/common/commands';
import { StartAction, RunAction, ConfigureAction } from 'vs/workbench/contrib/debug/browser/debugActions'; import { StartAction, ConfigureAction } from 'vs/workbench/contrib/debug/browser/debugActions';
import { IDebugService } from 'vs/workbench/contrib/debug/common/debug'; import { IDebugService } from 'vs/workbench/contrib/debug/common/debug';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';
...@@ -31,7 +31,6 @@ export class StartView extends ViewPane { ...@@ -31,7 +31,6 @@ export class StartView extends ViewPane {
static LABEL = localize('start', "Start"); static LABEL = localize('start', "Start");
private debugButton!: Button; private debugButton!: Button;
private runButton!: Button;
private firstMessageContainer!: HTMLElement; private firstMessageContainer!: HTMLElement;
private secondMessageContainer!: HTMLElement; private secondMessageContainer!: HTMLElement;
private clickElement: HTMLElement | undefined; private clickElement: HTMLElement | undefined;
...@@ -63,21 +62,13 @@ export class StartView extends ViewPane { ...@@ -63,21 +62,13 @@ export class StartView extends ViewPane {
const enabled = this.debuggerLabels.length > 0; const enabled = this.debuggerLabels.length > 0;
this.debugButton.enabled = enabled; this.debugButton.enabled = enabled;
this.runButton.enabled = enabled;
const debugKeybinding = this.keybindingService.lookupKeybinding(StartAction.ID); const debugKeybinding = this.keybindingService.lookupKeybinding(StartAction.ID);
let debugLabel = this.debuggerLabels.length !== 1 ? localize('debug', "Debug") : localize('debugWith', "Debug with {0}", this.debuggerLabels[0]); let debugLabel = this.debuggerLabels.length !== 1 ? localize('debug', "Run and Debug") : localize('debugWith', "Run and Debug {0}", this.debuggerLabels[0]);
if (debugKeybinding) { if (debugKeybinding) {
debugLabel += ` (${debugKeybinding.getLabel()})`; debugLabel += ` (${debugKeybinding.getLabel()})`;
} }
this.debugButton.label = debugLabel; this.debugButton.label = debugLabel;
let runLabel = this.debuggerLabels.length !== 1 ? localize('run', "Run") : localize('runWith', "Run with {0}", this.debuggerLabels[0]);
const runKeybinding = this.keybindingService.lookupKeybinding(RunAction.ID);
if (runKeybinding) {
runLabel += ` (${runKeybinding.getLabel()})`;
}
this.runButton.label = runLabel;
const emptyWorkbench = this.workspaceContextService.getWorkbenchState() === WorkbenchState.EMPTY; const emptyWorkbench = this.workspaceContextService.getWorkbenchState() === WorkbenchState.EMPTY;
this.firstMessageContainer.innerHTML = ''; this.firstMessageContainer.innerHTML = '';
this.secondMessageContainer.innerHTML = ''; this.secondMessageContainer.innerHTML = '';
...@@ -152,14 +143,7 @@ export class StartView extends ViewPane { ...@@ -152,14 +143,7 @@ export class StartView extends ViewPane {
})); }));
attachButtonStyler(this.debugButton, this.themeService); attachButtonStyler(this.debugButton, this.themeService);
this.runButton = new Button(container);
this.runButton.label = localize('run', "Run");
dom.addClass(container, 'debug-start-view'); dom.addClass(container, 'debug-start-view');
this._register(this.runButton.onDidClick(() => {
this.commandService.executeCommand(RunAction.ID);
}));
attachButtonStyler(this.runButton, this.themeService);
this.secondMessageContainer = $('.section'); this.secondMessageContainer = $('.section');
container.appendChild(this.secondMessageContainer); container.appendChild(this.secondMessageContainer);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册