Bug 518848 - "Apply and Close" doesn't make sense for info-only properties pages
Summary: "Apply and Close" doesn't make sense for info-only properties pages
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2017-06-27 12:49 EDT by Markus Keller CLA
Modified: 2017-09-07 05:17 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2017-06-27 12:49:43 EDT
"Apply and Close" doesn't make sense for info-only properties pages.

- Run or Debug a launch configuration.
- In the Debug view, select the process.
- Execute the "Properties" command.

=> A properties dialog without anything to apply is opened. "Apply and Close" doesn't make sense in this context.

In older releases there was an "OK" button (totally made sense), and redundant "Cancel" button (that wasn't wrong).
Comment 1 Eclipse Genie CLA 2017-08-09 09:07:08 EDT
New Gerrit change created: https://git.eclipse.org/r/102776
Comment 2 David Weiser CLA 2017-08-09 09:07:57 EDT
I pushed a fix. I override the createButton method in WorkbenchPreferenceDialog and PropertyDialog. For a PropertyDialog, the button label is only "Close". I think, we can maybe remove the "Cancel" button now?! What do you think? In PreferenceDialog I changed the button label back to "ok" for now. I think "close" doesn't fit here.
Comment 3 Mickael Istria CLA 2017-08-09 09:13:17 EDT
(In reply to David Weiser from comment #2)
> I think, we can maybe remove the "Cancel" button now?!

Why?
I do sometimes use the Cancel button and I'm not aware of a compaint about this button.
Comment 4 Nobody - feel free to take it CLA 2017-08-09 09:19:07 EDT
> I think, we can maybe remove the "Cancel" button now?! What do you think?

Don't remove, please. Very often need look some options without apply changes.
Comment 5 David Weiser CLA 2017-08-09 09:25:26 EDT
No, sorry, that was a misunderstanding. I don't want to remove the Cancel button from WorkbenchPreferenceDialog but from PropertyDialog.
Comment 6 Mickael Istria CLA 2017-08-09 09:29:05 EDT
(In reply to David Weiser from comment #5)
> I don't want to remove the Cancel
> button from WorkbenchPreferenceDialog but from PropertyDialog.

Same -1 from me ;)
I do use this cancel button often and don't see any value in removing it, on the contrary.
Comment 7 David Weiser CLA 2017-08-09 09:42:23 EDT
Ok. I am not sure about the usage of PropertyDialog. If it is only used to present properties without the ability to change them (like Markus example), only "Close" would be fine I think.
Comment 8 Mickael Istria CLA 2017-08-10 05:19:40 EDT
(In reply to David Weiser from comment #7)
> Ok. I am not sure about the usage of PropertyDialog. If it is only used to
> present properties without the ability to change them (like Markus example),
> only "Close" would be fine I think.

Ok, got it. However, how can you distinguish whether a PropertyDialog in general only contains readonly pages in order to evaluate whether it's ok to skip the "cancel" button or not, or to show only "close" instead of "apply and close"?
I have the impression that it's not something we can detect in general so the appropriate fix is to change this per dialog instance if we're sure it's read-only.
However, even for debug, are we sure all property dialog on a debugged process (from whichever language and so on) is read-only?
Comment 9 Lars Vogel CLA 2017-09-07 05:17:10 EDT
From the discussion in the Gerrit:
----
Mickael Istria

Patch Set 1: Code-Review-2
All those dialogs may allow edition and may have "Apply and Close" and "Cancel" useful to them. Unless we have a way to detect whether a dialog can host changes or not, it's better to keep things as it for consistency and to not break adopter use-cases (who can usually contribute editable pages to those dialogs)
---

I agree, marking as wontfix.