eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

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

Open raghucssit opened this issue 1 year ago • 1 comments

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 avatar Apr 18 '24 20:04 raghucssit

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 avatar Apr 18 '24 21:04 raghucssit

Anything else to do here or can we close?

mickaelistria avatar Jun 26 '24 10:06 mickaelistria

We should be done.

iloveeclipse avatar Jun 26 '24 10:06 iloveeclipse