Skip to content

Commit

Permalink
Merge pull request #46 from Halliburton-Landmark/Bug_1284410
Browse files Browse the repository at this point in the history
Return the display of the icons for MessageDialog
  • Loading branch information
omytrofanov authored Jul 23, 2024
2 parents 069b33f + 03e3be7 commit f2de834
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,16 @@ private void init(String dialogTitle, Image dialogTitleImage, String dialogMessa
this.image = getInfoImage();
break;
}
case QUESTION:
case QUESTION_WITH_CANCEL:
case QUESTION: {
this.image = getQuestionImage();
break;
}
case QUESTION_WITH_CANCEL: {
this.image = getQuestionImage();
break;
}
case CONFIRM: {
this.image = getQuestionImage();
break;
}
case WARNING: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ public Object execute(ExecutionEvent event) {
}
} else {
String message = NLS.bind(WorkbenchMessages.ResetPerspective_message, descriptor.getLabel());
PlainMessageDialog dialog = PlainMessageDialog.getBuilder(activeWorkbenchWindow.getShell(),WorkbenchMessages.ResetPerspective_title).message(message).buttonLabels(List.of(WorkbenchMessages.ResetPerspective_buttonLabel, IDialogConstants.NO_LABEL)).build();
PlainMessageDialog dialog = PlainMessageDialog
.getBuilder(activeWorkbenchWindow.getShell(), WorkbenchMessages.ResetPerspective_title)
.image(SWT.ICON_QUESTION).message(message).buttonLabels(List
.of(WorkbenchMessages.ResetPerspective_buttonLabel, IDialogConstants.NO_LABEL))
.build();

int result = dialog.open();
if (result == Window.OK) {
page.resetPerspective();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ SavePerspective_errorMessage = Invalid Perspective Descriptor

ResetPerspective_text = &Reset Perspective...
ResetPerspective_toolTip = Reset Perspective
ResetPerspective_message = Reset the {0} perspective to its defaults?
ResetPerspective_message = Do you want to reset the current {0} perspective to its defaults?
ResetPerspective_title = Reset Perspective
ResetPerspective_buttonLabel= &Reset Perspective
ResetPerspective_buttonLabel= &Reset
RevertPerspective_note='Revert' removes the customization from the selected perspective.\nThis only applies to newly opened perspectives.

RevertPerspective_title = Reset Perspective
Expand Down

0 comments on commit f2de834

Please sign in to comment.