Skip to content

Commit

Permalink
command abl.getMap (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
ezequielgandolfi committed Feb 11, 2021
1 parent 684faaf commit 6afc99f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

## 1.0.3

### Integration
- New integration command: `abl.getMap` (fsPath)

## 1.0.2

### Fixes
- Fix: Performance issues with Symbol Provider forcing

## 1.0.1

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "openedge-zext",
"displayName": "OpenEdge ABL (Progress 4GL)",
"description": "OpenEdge ABL Extension for VSCode",
"version": "1.0.2",
"version": "1.0.3",
"publisher": "ezequielgandolfi",
"author": "Ezequiel Gandolfi",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function deploy(workspace: vscode.WorkspaceFolder, filename: string, dirname: st
// check if file exists
if (!fs.existsSync(filename)) {
vscode.window.showErrorMessage(`File ${path.basename(filename)} not found`);
return Promise.resolve();
return Promise.resolve(null);
}

let oeConfig = ExtensionConfig.getInstance().getConfig();
Expand All @@ -78,6 +78,6 @@ function deploy(workspace: vscode.WorkspaceFolder, filename: string, dirname: st
// notification
if (tasks.length > 0)
vscode.window.showInformationMessage('File ' + path.basename(filename) + ' deployed!');
resolve();
resolve(null);
});
}
9 changes: 9 additions & 0 deletions src/provider/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class Integration {
context.subscriptions.push(vscode.commands.registerCommand('abl.tables', this.tables.bind(this)));
context.subscriptions.push(vscode.commands.registerCommand('abl.table', this.table.bind(this)));
context.subscriptions.push(vscode.commands.registerCommand('abl.compile', this.compile.bind(this)));
context.subscriptions.push(vscode.commands.registerCommand('abl.getMap', this.fileGetMap.bind(this)));
}

private currentFileSaveMap(args) {
Expand Down Expand Up @@ -101,6 +102,14 @@ export class Integration {
});
}

private fileGetMap(fsPath: string) {
let document = AblSource.Controller.getInstance().getDocument(vscode.Uri.file(fsPath));
if (document) {
return IntegrationV1.Generate.map(document);
}
return {};
}

}

namespace IntegrationV1 {
Expand Down
2 changes: 1 addition & 1 deletion src/provider/symbol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Symbol implements vscode.DocumentSymbolProvider {
let documentSymbols = this.documentSymbols.bind(this);
if (!token.isCancellationRequested)
resolve(documentSymbols(doc));
resolve();
resolve(null);
});
}
return;
Expand Down

0 comments on commit 6afc99f

Please sign in to comment.