| commit | edd61880f7b9eafeb2a1d4b8693049687a646ab3 | [log] [tgz] |
|---|---|---|
| author | Holger Voormann <eclipse@voormann.de> | Wed Apr 28 17:37:21 2021 +0200 |
| committer | Lars Vogel <Lars.Vogel@vogella.com> | Fri Jul 30 07:03:20 2021 -0400 |
| tree | 11a9a1489ad3cb07279f148bfac25f605159f60b | |
| parent | b93815d824fa5dad602ce43d02a378903d304a00 [diff] |
Bug 573221 - ListSelectionDialog: Improve usability and extend its API
Improve the usability of org.eclipse.ui.dialogs.ListSelectionDialog
(which is used e.g. in the "Save Resources" dialog: see bug 572939) and
extend its API in the following ways:
(a) Enabling/Disabling of the "Select All" and the "Deselect All"
buttons
Actual: Both buttons are always enabled.
Expected:
- When all elements are selected, the "Select All" button should be
disabled, otherwise enabled.
- When no elements are selected, the "Deselect All" button should be
disabled, otherwise enabled.
(b) Extend API
The class is marked as "@noextend This class is not intended to be
subclassed by clients.", but internally, it is extended several times
for different purposes. The goal is that subclassing should no longer be
necessary for customizations, to achieve more consistency and avoid
duplicate code, and to give clients the same capabilities as the dialogs
used internally.
The extended API should provide following additional possibilities via a
fluent API using the builder pattern:
- Dialog title (easier than via setTitle() after creating the dialog)
- OK button label:
- When nothing is selected: For example, "Launch without Saving"
- When one or more elements are selected: With {0} as placeholder for
the current selected elements and with {1} for the total number of
elements; for example, "Save {0} of {1} and Launch"
- Whether the dialog can be canceled (via Cancel button or by closing
the dialog window)
- Whether to use SWT#SHEET (modal dialog that is attached to a parent
window)
- Optional checkbox:
- Label
- Initial value
The existing constructor should be marked as deprecated in favor of the
new API.
Change-Id: I7a4f548bc41a346685751220e9853ee36df8e344
Signed-off-by: Holger Voormann <eclipse@voormann.de>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/179930
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Lars Vogel <Lars.Vogel@vogella.com>
Thanks for your interest in this project.
Platform UI provides the basic building blocks for user interfaces built with Eclipse.
Some of these form the Eclipse Rich Client Platform (RCP) and can be used for arbitrary rich client applications, while others are specific to the Eclipse IDE. The Platform UI codebase is built on top of the Eclipse Standard Widget Toolkit (SWT), which is developed as an independent project.
Website: http://www.eclipse.org/platform/ui/
For more information, refer to the Platform UI wiki page.
Contributions to Platform UI are most welcome. There are many ways to contribute, from entering high quality bug reports, to contributing code or documentation changes. For a complete guide, see the Platform UI - How to contribute wiki page page on the team wiki.
Several test plug-ins have a dependency to the Mockito and Hamcrest libraries. Please install them from the Orbit Download page]3:
Currently the following plug-ins are required:
You need Maven 3.3.1 installed. After this you can run the build via the following command:
mvn clean verify -Pbuild-individual-bundles
Information regarding source code management, builds, coding standards, and more.
Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).
This project uses Bugzilla to track ongoing development and issues.
Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!
Contact the project developers via the project's “dev” list.