Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349743 - enable/disable a widget dependent on an event in another widget (JAXB RM)
Summary: enable/disable a widget dependent on an event in another widget (JAXB RM)
Status: CLOSED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RM (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Albert L. Rossi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-17 18:21 EDT by Albert L. Rossi CLA
Modified: 2011-06-26 01:30 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Albert L. Rossi CLA 2011-06-17 18:21:12 EDT
Currently there is no way to enable/disable a widget dependent on an event in another widget: for instance, if there is an advanced mode checkbox, one might want to enable/disable other widgets depending on the checkbox state.

This particular example could be implemented as an action (see bug 349740), but it may be desirable to allow for a generalized set of elements on the widget, such as:

<enabled-if>(widgetA#enabled && widgetB#enabled) | !widgetC#selected</enabled-if>
<visible-if>widgetA#visible && widgetB#visible</visible-if>

The changes required would be:

1.  give all widgets an id that is visible in the configuration;
2.  map the widgets to their ids;
3.  write a parser for the enabled/visible/selected expressions (this would support the usual logical operators !()&|);
4.  maintain for each widget a validator for each of its boolean properties (visible, enabled, selected ...) and run it on each update. The meaning of selected would be specific to the widget and would be up to the specific resource manager definition to make sure it corresponds to what is expected.
Comment 1 Albert L. Rossi CLA 2011-06-26 01:30:17 EDT
Implementation completed.  Closing bug unless issues discovered.