Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Extension Points #66574

Closed
21 tasks done
alexdima opened this issue Jan 16, 2019 · 2 comments
Closed
21 tasks done

Dynamic Extension Points #66574

alexdima opened this issue Jan 16, 2019 · 2 comments
Assignees
Labels
extensions Issues concerning extensions on-testplan plan-item VS Code - planned item for upcoming

Comments

@alexdima
Copy link
Member

alexdima commented Jan 16, 2019

We want to be able to dynamically install/enable or uninstall/disable extensions. For this, we need to adopt that extension points are dynamic. This is done by adding isDynamic: true to the registerExtensionPoint call.

When an extension is added/removed at runtime, all of its extension points will have their handlers invoked again. The handler conforms to the following type:

export interface IExtensionPointHandler<T> {
	(extensions: IExtensionPointUser<T>[], delta: ExtensionPointUserDelta<T>): void;
}

The first argument will always be the complete list of extensions that use the extension point and the second (newly added) argument will be the delta since last time the handler was called.


You can test this by having an extension that exercises your extension point and enabling/disabling the extension.

Extension points:

@vscodebot vscodebot bot added the extensions Issues concerning extensions label Jan 16, 2019
@alexdima alexdima added the plan-item VS Code - planned item for upcoming label Jan 16, 2019
@isidorn
Copy link
Contributor

isidorn commented Jan 18, 2019

I have made the following contributions dynamic: debuggers, breakpoints and resourceLabelFormatters.

If a user disables a debugger of a type that he is currently debugging we will stop that session. Example: user is debugging Pyhtong and disables the python extension -> the python debug session will quit.

@alexdima
Copy link
Member Author

Thank you! ❤️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions Issues concerning extensions on-testplan plan-item VS Code - planned item for upcoming
Projects
None yet
Development

No branches or pull requests

7 participants