Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 298874

Summary: Expose API to reuse 'Clear all 'do not show again' settings and show all hidden dialogs again' option
Product: [Eclipse Project] JDT Reporter: Paul Klicnik <pklicnik>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, markus.kell.r
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Paul Klicnik CLA 2010-01-05 11:42:46 EST
Build Identifier: 3.5

The Java section in the workbench preference gives the 'Clear all 'do not show again' settings and show all hidden dialogs again' option. It would be nice to be able to re-use this functionality in adopting/extending products. 

Some investigation lead me to the OptionalMessageDialog class (which seems to be used under the covers) but unfortunately it's internal API. 

A particular use case:
- Adopting product contributes a workbench preference page under the Java section
- A 'do not show me again' dialog is displayed at some point in the execution of the contributors code
- Ideally it makes sense to have the 'Clear all dialogs' option on the Java page also clear the contributors dialog because, in this case, the extender also contributes to the Java section. Instead, now the extender has to also create new UI on the contributed page to reset its own dialogs. This can be a source of confusion for the user

Reproducible: Always
Comment 1 Markus Keller CLA 2010-01-05 12:30:33 EST
This should be implemented in the Platform, not in JDT/UI.

*** This bug has been marked as a duplicate of bug 151391 ***
Comment 2 Dani Megert CLA 2010-01-06 03:16:06 EST
Paul, for now you have to COPY (not use) OptionalMessageDialog.java from JDT UI. This will also give you the 'Clear' functionality for free.