Remove unnecessary "Apply and Close" button from Properties dialog#4014
Merged
Conversation
Member
Contributor
elsazac
force-pushed
the
removeApplyandClose
branch
from
May 18, 2026 13:26
408812a to
6651650
Compare
Member
Author
This commit retains only the cancel button and eliminates the Apply and close button in the property dialog which is unnecessary in the current context there. There is only a description provided in the property dialog and there is no event that needs an apply option. Fixes: eclipse-equinox/p2#1049
elsazac
force-pushed
the
removeApplyandClose
branch
from
June 1, 2026 04:28
6651650 to
c8a2696
Compare
Member
Author
|
build looks good; merging this now; |
Member
There was a problem hiding this comment.
Pull request overview
This PR aims to simplify the Properties dialog UI by removing the redundant “Apply and Close” button when the dialog is effectively read-only (as described for Installation Details → Properties), to avoid confusing users.
Changes:
- Overrides the Properties dialog button bar to show a single Close button instead of the default Apply and Close / Cancel buttons.
- Routes Close button handling through cancel semantics (
cancelPressed()). - Overrides
updateButtons()as a no-op to avoid relying on the default OK-button enablement logic.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+96
to
+108
| @Override | ||
| protected void buttonPressed(int buttonId) { | ||
| if (buttonId == IDialogConstants.CLOSE_ID) { | ||
| cancelPressed(); | ||
| return; | ||
| } | ||
| super.buttonPressed(buttonId); | ||
| } | ||
|
|
||
| @Override | ||
| protected void createButtonsForButtonBar(Composite parent) { | ||
| createButton(parent, IDialogConstants.CLOSE_ID, IDialogConstants.CLOSE_LABEL, true); | ||
| } |
Comment on lines
+181
to
+184
| @Override | ||
| public void updateButtons() { | ||
| // This function is overridden to remove the Apply and close button | ||
| } |
Comment on lines
+96
to
+103
| @Override | ||
| protected void buttonPressed(int buttonId) { | ||
| if (buttonId == IDialogConstants.CLOSE_ID) { | ||
| cancelPressed(); | ||
| return; | ||
| } | ||
| super.buttonPressed(buttonId); | ||
| } |
Member
Author
|
I will revert this change for now; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




The Properties dialog opened from
Installation Details → Propertiesdoes not have any option to edit or make any modifications to the properties. Despite this it still displays bothCancelandApply and Closebuttons.Since no changes can be made in this dialog, the
Apply and Closebutton is basically redundant here and performs the same action asCancel. This could be confusing to the users hence this commit removes the unnecessaryApply and Closebutton and retain only thecanceloption.Fixes :eclipse-equinox/p2#1049
Before:

After:
