From 3c61232e71f0a284d81b7d09179d6ded7aa0c4d5 Mon Sep 17 00:00:00 2001 From: Ted Williams Date: Thu, 23 Oct 2008 19:51:20 +0000 Subject: [PATCH] [251877] Find/Replace dialog incorrectly restores Forward/Backward button states --- .../ui/memory/search/FindReplaceDialog.java | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/plugins/org.eclipse.dd.debug.ui.memory.search/src/org/eclipse/dd/debug/ui/memory/search/FindReplaceDialog.java b/plugins/org.eclipse.dd.debug.ui.memory.search/src/org/eclipse/dd/debug/ui/memory/search/FindReplaceDialog.java index 6f043f4cbf1..eb0cb7f600c 100644 --- a/plugins/org.eclipse.dd.debug.ui.memory.search/src/org/eclipse/dd/debug/ui/memory/search/FindReplaceDialog.java +++ b/plugins/org.eclipse.dd.debug.ui.memory.search/src/org/eclipse/dd/debug/ui/memory/search/FindReplaceDialog.java @@ -568,10 +568,8 @@ public class FindReplaceDialog extends SelectionDialog final Button backwardButton = new Button(directionGroup, SWT.RADIO); backwardButton.setText(Messages.getString("FindReplaceDialog.ButtonBackward")); //$NON-NLS-1$ final boolean isForward = fProperties.getProperty(FindReplaceDialog.SEARCH_FORMAT_FORWARD, "true").equalsIgnoreCase("true"); - Display.getDefault().asyncExec(new Runnable() { public void run() { - fForwardButton.setSelection(isForward); - backwardButton.setSelection(!isForward); - }}); + fForwardButton.setSelection(isForward); + backwardButton.setSelection(!isForward); data = new FormData(); data.top = new FormAttachment(fReplaceText); @@ -652,16 +650,13 @@ public class FindReplaceDialog extends SelectionDialog final String format = fProperties.getProperty(FindReplaceDialog.SEARCH_FORMAT, FindReplaceDialog.SEARCH_FORMAT_ASCII); - Display.getDefault().asyncExec(new Runnable(){ - public void run() { - fFormatAsciiButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_ASCII)); - fFormatOctalButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_OCTAL)); - fFormatBinaryButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_BINARY)); - fFormatDecimalButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_DECIMAL)); - fFormatHexButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_HEX)); - fFormatByteSequenceButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_BYTESEQUENCE)); - } - }); + fFormatAsciiButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_ASCII)); + fFormatOctalButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_OCTAL)); + fFormatBinaryButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_BINARY)); + fFormatDecimalButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_DECIMAL)); + fFormatHexButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_HEX)); + fFormatByteSequenceButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_BYTESEQUENCE)); + data = new FormData(); data.top = new FormAttachment(rangeGroup); @@ -767,9 +762,6 @@ public class FindReplaceDialog extends SelectionDialog } }); - fForwardButton.setSelection(true); - fFormatAsciiButton.setSelection(true); - composite.setTabList(new Control[] { fFindText, fReplaceText,