Skip to content

Commit

Permalink
debug start view polish
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn authored and Chitoge Tomoyo committed Nov 27, 2019
1 parent 8ef5030 commit d20d02f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
padding: 0 20px 0 20px;
}

.debug-viewlet .debug-start-view .monaco-button {
.debug-viewlet .debug-start-view .monaco-button,
.debug-viewlet .debug-start-view .section {
margin-top: 20px;
}

Expand Down
26 changes: 12 additions & 14 deletions src/vs/workbench/contrib/debug/browser/startView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,31 @@ export class StartView extends ViewletPane {
}

protected renderBody(container: HTMLElement): void {

const messageContainer = $('.section');
container.appendChild(messageContainer);
const messageElement = $('span');
messageContainer.appendChild(messageElement);
messageElement.textContent = localize('noLaunchConfiguration', "You have not yet configured launching. For a more complete debug and run experience");
const clickElement = $('span.configure');
clickElement.textContent = localize('configure', " create a `launch.json`");
clickElement.onclick = () => this.commandService.executeCommand(ConfigureAction.ID);
messageContainer.appendChild(clickElement);


this.debugButton = new Button(container);
this.debugButton.label = localize('debug', "Debug Code");
this.debugButton.label = localize('debug', "Debug");
this._register(this.debugButton.onDidClick(() => {
this.commandService.executeCommand(StartAction.ID);
}));
attachButtonStyler(this.debugButton, this.themeService);

this.runButton = new Button(container);
this.runButton.label = localize('run', "Run Code");
this.runButton.label = localize('run', "Run");

dom.addClass(container, 'debug-start-view');
this._register(this.runButton.onDidClick(() => {
this.commandService.executeCommand(RunAction.ID);
}));
attachButtonStyler(this.runButton, this.themeService);

const messageContainer = $('.section');
container.appendChild(messageContainer);
const messageElement = $('span');
messageContainer.appendChild(messageElement);
messageElement.textContent = localize('noLaunchConfiguration', "To specify how to run and debug your code, ");
const clickElement = $('span.configure');
clickElement.textContent = localize('configure', " create a launch.json file.");
clickElement.onclick = () => this.commandService.executeCommand(ConfigureAction.ID);
messageContainer.appendChild(clickElement);
}

protected layoutBody(_: number, __: number): void {
Expand Down

0 comments on commit d20d02f

Please sign in to comment.