Bug 565499 - StatusDialog shows nonsense "OK" error messages
Summary: StatusDialog shows nonsense "OK" error messages
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.16   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-23 13:55 EDT by Mattias Bertilsson CLA
Modified: 2020-09-07 05:28 EDT (History)
1 user (show)

See Also:


Attachments
StatusDialog snippet (870 bytes, application/octet-stream)
2020-07-24 05:42 EDT, Mattias Bertilsson CLA
no flags Details
AddRepository dialog with "OK" (instead of empty error message) (6.18 KB, image/png)
2020-08-17 06:20 EDT, Mattias Bertilsson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mattias Bertilsson CLA 2020-07-23 13:55:21 EDT
Testing with 4.16 I notice the text "OK" in several StatusDialogs, where the error message would be if the dialogs had errors. Looks like the fix for bug 560667 is to blame, that removed the check for IStatus.isOK().

Since StatusDialog.updateStatus() does not accept null, I think providing Status.OK_STATUS is how the status message should be cleared, but it has its message set to (the localized equivalent of) "ok", not null, which means it will now be printed.
Comment 1 Andrey Loskutov CLA 2020-07-23 15:07:59 EDT
Could you provide steps to reproduce, or some screen shots? Of if you have a patch in mind, please push to gerrit.
Comment 2 Mattias Bertilsson CLA 2020-07-24 05:40:29 EDT
It doesn't show in platform's own StatusDialogs as they all seem to create new StatusInfos (which do have a null message by default), rather than reusing Status.OK_STATUS.

Anyway, the attached snippet shows the issue. In previous platform versions it has produced an empty dialog with OK / Cancel buttons. In 4.16 it produces a dialog with the text OK.

Not sure about the patch. If compatibility matters, both StatusDialog and SelectionStatusDialog need to keep their original behavior, so either they should not share the same MessageLine implementation, or MessageLine needs some flag to signal which behavior for OK status should be used.
Comment 3 Mattias Bertilsson CLA 2020-07-24 05:42:00 EDT
Created attachment 283691 [details]
StatusDialog snippet
Comment 4 Mattias Bertilsson CLA 2020-08-17 06:20:14 EDT
Created attachment 283882 [details]
AddRepository dialog with "OK" (instead of empty error message)

Looks like the AddRepository dialog (org.eclipse.equinox.internal.p2.ui.dialogs) uses Status.OK_STATUS to clear the StatusDialog error message and now gets "OK" instead.
Comment 5 Mattias Bertilsson CLA 2020-09-07 05:28:14 EDT
Same thing with the DependencyPropertiesDialog of the PDE.