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

Components which are disabled via Activities are accessible via Quick Access (Ctrl + 3) #1828

Open
raghucssit opened this issue Apr 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@raghucssit
Copy link
Contributor

raghucssit commented Apr 18, 2024

We can disable specific component via Preference -> General -> Capabilities as shown below.
Component means set of eclipse functionalities like Views, Editors, Commands, Menu Items etc.

CapabilityPref

This kind of disablement/enablement of components are achieved through extension called org.eclipse.ui.activities
Functionalities disabled via activities are still accessible via Quick Access Dialog.
For example in the below example, We can access Javadoc View using command Show View (Javadoc).

QuickAccessDiff

The problem here is, Commands shown in the list are not filtered through Activity Support.

@raghucssit raghucssit added the bug Something isn't working label Apr 18, 2024
@raghucssit
Copy link
Contributor Author

By default org.eclipse.ui.activities.WorkbenchActivityHelper.filterItem(Object) here supports only filtering of org.eclipse.ui.IPluginContribution. I have improved it to support org.eclipse.core.commands.Command.
And i have introduced filtering at org.eclipse.ui.internal.quickaccess.providers.CommandProvider.retrieveCommand(String) here.
But this is not enough like ViewProvider here because CommandProvider creates Parameterised Commands for commands like org.eclipse.ui.views.showView, org.eclipse.ui.navigate.showIn, org.eclipse.ui.file.export etc.
So here we need to consider if all the parameters for each of the ParameterisedCommand is also hidden by ActivitySupport seems to be expensive(But easily doable) considering many parameterisable commands available.

Second part is there may be components which are not defined by ActivitySupport.
For example org.eclipse.jdt.ui.generate.javadoc : [[],**true**,org.eclipse.jdt.ui.generate.javadoc]. This command shows up list of commands because it has true flag inside at org.eclipse.ui.internal.activities.MutableActivityManager.getIdentifier(org.eclipse.jdt.ui.generate.javadoc) here

raghucssit added a commit to raghucssit/eclipse.platform that referenced this issue Apr 19, 2024
Existing patterns does not filter out commands from JDT. This pattern
will filter out all the commands.

see eclipse-platform/eclipse.platform.ui#1828
raghucssit added a commit to raghucssit/eclipse.platform.ui that referenced this issue Apr 19, 2024
There was no filter support at all for commands. This leaked the
commands which are filtered by activity support to be accessed via
QuickAccessDialog.

see eclipse-platform#1828
raghucssit added a commit to raghucssit/eclipse.platform.ui that referenced this issue Apr 22, 2024
There was no filter support at all for commands. This leaked the
commands which are filtered by activity support to be accessed via
QuickAccessDialog.

see eclipse-platform#1828
raghucssit added a commit to raghucssit/eclipse.platform.ui that referenced this issue Apr 23, 2024
There was no filter support at all for commands. This leaked the
commands which are filtered by activity support to be accessed via
QuickAccessDialog.

see eclipse-platform#1828
raghucssit added a commit to raghucssit/eclipse.platform.ui that referenced this issue Apr 23, 2024
There was no filter support at all for commands. This leaked the
commands which are filtered by activity support to be accessed via
QuickAccessDialog.

see eclipse-platform#1828
fedejeanne pushed a commit that referenced this issue Apr 23, 2024
There was no filter support at all for commands. This leaked the
commands which are filtered by activity support to be accessed via
QuickAccessDialog.

see #1828
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant