Skip to content
This repository was archived by the owner on May 11, 2022. It is now read-only.

Commit d99a082

Browse files
committed
A few minor improvements
Signed-off-by: Brian Fitzpatrick <[email protected]>
1 parent cf65598 commit d99a082

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/hintBoxViewProvider.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ export class HintBoxViewProvider implements WebviewViewProvider {
4646
this._view.onDidDispose(() => this._view = undefined);
4747

4848
const extPath = this._extensionUri;
49-
if (!extPath) {
50-
console.error(`Error: Extension context not set on Didact manager`);
51-
}
52-
5349
const _localResourceRoots = [this._extensionUri];
5450
if (extPath) {
5551
_localResourceRoots.push(Uri.file(path.resolve(extPath.fsPath, 'media')));
@@ -64,6 +60,7 @@ export class HintBoxViewProvider implements WebviewViewProvider {
6460
localResourceRoots : _localResourceRoots
6561
};
6662

63+
// hardcoded example file for now
6764
const hintsPath = Uri.file(
6865
path.resolve(this._extensionUri.fsPath, 'demos', 'hints', 'demohints.didact.md')
6966
);
@@ -80,7 +77,7 @@ export class HintBoxViewProvider implements WebviewViewProvider {
8077
await commands.executeCommand(`${HintBoxViewProvider.viewType}.focus`);
8178
}
8279
await this._update();
83-
}
80+
}
8481

8582
private async _update() {
8683
const content = await extensionFunctions.getWebviewContent();
@@ -118,10 +115,6 @@ export class HintBoxViewProvider implements WebviewViewProvider {
118115
);
119116
}
120117

121-
public getDidactUriPath(): Uri | undefined {
122-
return this.didactUriPath;
123-
}
124-
125118
public async setDidactUriPath(inpath : Uri | undefined): Promise<void> {
126119
this.didactUriPath = inpath;
127120
await extensionFunctions.setDidactFileUri(inpath);

0 commit comments

Comments
 (0)