mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
* Changed the activation event from onCommand to startup "*" * Refractored some code to fix the issue * Made some PR related changes and fixed a condition where the same error was occurring when the flatFileImport has to download binaries from the internet. * Reverted activation event back to previous state as it had no effect. * Made changes mentioned in the PR Co-authored-by: Aasim Shahnawaz Khan <aaskhan@microsoft.com>
This commit is contained in:
@@ -25,17 +25,19 @@ export default class MainController extends ControllerBase {
|
||||
public deactivate(): void {
|
||||
}
|
||||
|
||||
public activate(): Promise<boolean> {
|
||||
const outputChannel = vscode.window.createOutputChannel(constants.serviceName);
|
||||
new ServiceClient(outputChannel).startService(this._context);
|
||||
|
||||
managerInstance.onRegisteredApi<FlatFileProvider>(ApiType.FlatFileProvider)(provider => {
|
||||
this.initializeFlatFileProvider(provider);
|
||||
public async activate(): Promise<boolean> {
|
||||
return new Promise<boolean>(async (resolve) => {
|
||||
const outputChannel = vscode.window.createOutputChannel(constants.serviceName);
|
||||
managerInstance.onRegisteredApi<FlatFileProvider>(ApiType.FlatFileProvider)(provider => {
|
||||
this.initializeFlatFileProvider(provider);
|
||||
resolve(true);
|
||||
});
|
||||
await new ServiceClient(outputChannel).startService(this._context);
|
||||
});
|
||||
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private initializeFlatFileProvider(provider: FlatFileProvider) {
|
||||
azdata.tasks.registerTask('flatFileImport.start', (profile: azdata.IConnectionProfile, ...args: any[]) => new FlatFileWizard(provider).start(profile, args));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user