Community
Participate
Working Groups
Created attachment 82915 [details] Diff file for the enhancement The enablesFor attribute of the propertySection attribute of the propertySections.exsd should follow the same standard as the enablesFor found in the schema actionSets of the org.eclipse.ui plugin. This means that enablesFor could have the values: enablesFor - a value indicating the selection count which must be met to enable the property section If specified and the condition is not met, the property section is disabled. If omitted, the property section enablement state is not affected. The following attribute formats are supported: ! - 0 items selected ? - 0 or 1 items selected + - 1 or more items selected multiple, 2+ - 2 or more items selected n - a precise number of items selected.a precise number of items selected. For example: enablesFor=" 4" enables the action only when 4 items are selected * - any number of items selected I've included the patch to add this enhancement
Created attachment 82917 [details] This is a demo project using the enhencement I've included a sample project that uses the enhencements. The project is a plugin project that adds an editor for .sample files. Simply create a .sample file in a project and open it (the content does not matter). The editor is simply a list and depending on your seleciton various sections will appear in the proeprties. There are 3 possible sections: - One will show if exactly 3 items are selected (backward compatibility) - One will show if none or one item is selected (well... one item is selected since if nothing is selected the property tabs will not show but this uses the wildcard for 0 or 1) - One will show if two or more Srings are selected (using the 2+ wildcard)
A last comment on the enhancement implementaiton. I've re-used the org.eclipse.ui.SelectionEnabler to enablesFor wildcard.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.