private getManifestFromActiveEditor()

in src/BasePreviewManager.ts [107:125]


    private getManifestFromActiveEditor(): Promise<string> {

        let editor = vscode.window.activeTextEditor;
        let data = editor.document.getText();
        // Check to ensure that manifest file is not empty
        if (data) {
            return this.parseManifestFromActiveEditor(data);
        }
        //The manifest file is empty
        else {
            return new Promise<string>((resolve) => {
                resolve(Constants.ErrorMessages.EMPTY_MANIFEST);
            }).then((message) => {
                return message;
            }).catch(() => {
                return Constants.ErrorMessages.GET_MANIFEST_ERROR;
            })
        }
    }