Bug 209867 - [TabbedProperties] Add wildcards to the enablesFor attribute of propertySection
Summary: [TabbedProperties] Add wildcards to the enablesFor attribute of propertySec...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-14 16:46 EST by Simon Ringuette CLA
Modified: 2019-09-06 16:17 EDT (History)
0 users

See Also:


Attachments
Diff file for the enhancement (8.35 KB, patch)
2007-11-14 16:46 EST, Simon Ringuette CLA
no flags Details | Diff
This is a demo project using the enhencement (12.96 KB, application/x-zip-compressed)
2007-11-14 16:52 EST, Simon Ringuette CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Ringuette CLA 2007-11-14 16:46:14 EST
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
Comment 1 Simon Ringuette CLA 2007-11-14 16:52:03 EST
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)
Comment 2 Simon Ringuette CLA 2007-11-14 16:53:46 EST
A last comment on the enhancement implementaiton. I've re-used the org.eclipse.ui.SelectionEnabler to enablesFor wildcard.
Comment 3 Eclipse Webmaster CLA 2019-09-06 16:17:46 EDT
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.