mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-09 09:24:12 -05:00
debug: only show adapters that have initialConfigurations
This commit is contained in:
@@ -333,7 +333,7 @@ export class ConfigurationManager implements debug.IConfigurationManager {
|
||||
let configFileCreated = false;
|
||||
|
||||
return this.fileService.resolveContent(resource).then(content => true, err =>
|
||||
this.quickOpenService.pick([...this.adapters, { label: 'More...' }], { placeHolder: nls.localize('selectDebug', "Select Environment") })
|
||||
this.quickOpenService.pick([...this.adapters.filter(a => a.hasInitialConfiguration()), { label: 'More...' }], { placeHolder: nls.localize('selectDebug', "Select Environment") })
|
||||
.then(picked => {
|
||||
if (picked instanceof Adapter) {
|
||||
return picked ? picked.getInitialConfigurationContent() : null;
|
||||
|
||||
@@ -84,6 +84,10 @@ export class Adapter {
|
||||
objects.mixin(this.rawAdapter, secondRawAdapter, extensionDescription.isBuiltin);
|
||||
}
|
||||
|
||||
public hasInitialConfiguration(): boolean {
|
||||
return !!this.rawAdapter.initialConfigurations;
|
||||
}
|
||||
|
||||
public getInitialConfigurationContent(): TPromise<string> {
|
||||
const editorConfig = this.configurationService.getConfiguration<any>();
|
||||
if (typeof this.rawAdapter.initialConfigurations === 'string') {
|
||||
|
||||
Reference in New Issue
Block a user