-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Provide API to filter unwanted contributions from frontend extensions #9069
Comments
We implemented something similar to |
I also wonder if there would be interest in trying to change the way contributions are made in the first place to maybe exhaustively declare all contributions and add a mechanism to whitelist/blacklist those? A bit like how VS Code extensions define every contribution in |
Fixes eclipse-theia#9069 Signed-off-by: Tobias Ortmayr tortmayr@eclipsesource.com Contributed on behalf of STMicroelectronics
Fixes eclipse-theia#9069 Signed-off-by: Tobias Ortmayr tortmayr@eclipsesource.com Contributed on behalf of STMicroelectronics
Fixes eclipse-theia#9069 Signed-off-by: Tobias Ortmayr tortmayr@eclipsesource.com Contributed on behalf of STMicroelectronics
Fixes eclipse-theia#9069 Signed-off-by: Tobias Ortmayr tortmayr@eclipsesource.com Contributed on behalf of STMicroelectronics
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Implements eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr tortmayr@eclipsesource.com
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Implements eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com>
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Resolves eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com>
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Resolves eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com>
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Resolves eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com>
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Resolves eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com>
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Resolves eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com> Co-Authored-By: Paul Maréchal <paul.marechal@ericsson.com>
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Resolves eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com> Co-Authored-By: Paul Maréchal <paul.marechal@ericsson.com> squash me? Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Resolves eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com> Co-Authored-By: Paul Maréchal <paul.marechal@ericsson.com> squash me? Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Resolves eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com> Co-Authored-By: Paul Maréchal <paul.marechal@ericsson.com> squash me? Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Resolves eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com> Co-Authored-By: Paul Maréchal <paul.marechal@ericsson.com> squash me? Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Resolves eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com> Co-Authored-By: Paul Maréchal <paul.marechal@ericsson.com> squash me? Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Resolves #9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com> Co-Authored-By: Paul Maréchal <paul.marechal@ericsson.com> squash me? Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
Adds the ContributionFilterRegistry which can be used to filter contributions of Theia extensions before they are bound. This mechanism can be used by application developers to specifically filter individual contributions from Theia extensions they have no control over, i.e. core or 3rd party extensions. Resolves eclipse-theia#9069 Contributed on behalf of STMicroelectronics Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com> Co-Authored-By: Paul Maréchal <paul.marechal@ericsson.com> squash me? Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
When building custom tools or IDE’s with Theia that are heavily streamlined for a specific domain we might run into the issue that the custom solution only requires a subset of the functionality that is provided by existing core Theia extensions/plugins. This can be problematic when existing core extensions also provide frontend contributions that are not needed/unwanted. These contributions may clutter the UI so it should be possible to remove or at least hide them. The support of VSCode APIs also has a negative impact on this. The plugin system depends on many Theia extensions which means it is no longer possible to create minimal Theia applications because they will be pulled in indirectly again.(see also #7754).
The currently recommended workaround to hide unwanted contributions is to bind a stub implementation (see also #8293). The contribution will still get loaded at runtime but effectively does nothing. This is obviously not optimal and is not generally applicable. For instance, it is not possible to stub contributions that have been bound to a dynamic value. Typically core Theia extensions now provide a single contribution class implementing various contribution interfaces to support this stubbing approach. However, there are still some exceptions (e.g. some contributions in
@theia/callhierachy
are still dynamically bound) and for third-party extension no such assumption can be made. In addition, rebinding an external contribution to a no-op implementation could also have negative side effects on external extensions that use this contribution.We propose an alternative approach by introducing a generic contribution filter API that enables the specification of filters to hide/display certain UI contributions (similar to the concept of activities used in Eclipse RCP). A filter has to specify the contribution types (i.e. service identifier) it’s intended for (e.g. MenuContribution) and a test() method that indicates whether a contribution should be filtered out. Filters should be configurable via DI and a central registry should be available. This central registry can then be queried by the
ContainerBasedContributionProvider
s to retrieve the registered filters for a service identifier and filter the set of provided services accordingly.This approach is less invasive and more flexible than rebinding an external contribution to a stub implementation.
We have a running PoC for this approach. In particular we implemented two base filter classes that operate on string level and can be used to filter contributions either based on their class name or by evaluating a specific property (e.g id of the contribution).
If you agree with the suggested solution and are interested in integrating this Filter API directly into Theia we would happily provide a PR based on our current PoC.
We (EclipseSource) intend to contribute to this on behalf of ST Microelectronics.
The text was updated successfully, but these errors were encountered: