diff --git a/src/configurationSettings.ts b/src/configurationSettings.ts deleted file mode 100644 index 3704ac6..0000000 --- a/src/configurationSettings.ts +++ /dev/null @@ -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(); - - public get onDidChangeConfiguration(): Event { - 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("showResponseInDifferentTab", false); - } - -} \ No newline at end of file