import { extensions, Extension } from 'vscode'; export class ExtensionManifestReader { constructor(extensionId: string) { this._extension = extensions.getExtension(extensionId); } private _extension: Extension name: string; version: string; publisher: string; displayName: string; description: string; categories: string[]; keywords: string[]; icon: string; private _checkPropertyExists(propertyName: string) { for (let property in this) { if (property === propertyName) return true; } return false; } refresh(): void { let manifest: any = this._extension.packageJSON; for (let property in manifest) { if (this._checkPropertyExists(property)) { this[property] = manifest[property]; } } } }