Delete configurationSettings.ts

This commit is contained in:
Matthew Burleigh 2019-09-24 08:29:56 -04:00 коммит произвёл GitHub
Родитель e6eddd0e7d
Коммит c199230b01
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 0 добавлений и 50 удалений

Просмотреть файл

@ -1,50 +0,0 @@
import { Event, EventEmitter, window, workspace } from 'vscode';
export interface IAzureCliToolsSettings {
showResponseInDifferentTab: boolean;
}
export class AzureCliToolsSettings implements IAzureCliToolsSettings {
public showResponseInDifferentTab: boolean = false;
private static _instance: AzureCliToolsSettings;
public static get Instance(): AzureCliToolsSettings {
if (!AzureCliToolsSettings._instance) {
AzureCliToolsSettings._instance = new AzureCliToolsSettings();
}
return AzureCliToolsSettings._instance;
}
public readonly configurationUpdateEventEmitter = new EventEmitter<void>();
public get onDidChangeConfiguration(): Event<void> {
return this.configurationUpdateEventEmitter.event;
}
private constructor() {
workspace.onDidChangeConfiguration(() => {
this.initializeSettings();
this.configurationUpdateEventEmitter.fire();
});
window.onDidChangeActiveTextEditor(e => {
if (e) {
this.initializeSettings();
this.configurationUpdateEventEmitter.fire();
}
});
this.initializeSettings();
}
private initializeSettings() {
const editor = window.activeTextEditor;
const document = editor && editor.document;
const azureCliToolsSettings = workspace.getConfiguration("ms-azurecli", document ? document.uri : null);
this.showResponseInDifferentTab = azureCliToolsSettings.get<boolean>("showResponseInDifferentTab", false);
}
}