Issue #1229 Changes for non-blocking FindReplaceDlg.

Change-Id: I9bb97051cb15f84fde8540056a78f29420d2c665

Former-commit-id: 91a283a721f55dfe00f9bd0d2f57def122eb6be4
This commit is contained in:
Roger Ferrel 2012-10-12 07:17:09 -05:00
parent acc4307eb0
commit 03b8991ec0
3 changed files with 22 additions and 6 deletions

View file

@ -219,6 +219,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* 09OCT2012 1229 rferrel Changes for non-blocking QcDialog.
* 09OCT2012 1229 rferrel Changes for non-blocking SendDialog.
* 11OCT2012 1229 rferrel Converted to a subclass of CaveSWTDialog and
* 12OCT2012 1229 rferrel Changes for non-blocking FindReplaceDlg.
* made non-blocking.
*
* </pre>
@ -450,6 +451,8 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
*/
private boolean pythonModifiedTAF = false;
private FindReplaceDlg findDlg;
/**
* TAF editor enumeration
*/
@ -1261,9 +1264,13 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
findMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
FindReplaceDlg findDlg = new FindReplaceDlg(shell,
editorTafTabComp.getTextEditorControl());
findDlg.open();
if (mustCreate(findDlg)) {
findDlg = new FindReplaceDlg(shell, editorTafTabComp
.getTextEditorControl());
findDlg.open();
} else {
findDlg.bringToTop();
}
}
});

View file

@ -46,6 +46,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* ------------ ---------- ----------- --------------------------
* 28 FEB 2008 938 lvenable Initial creation.
* 6/19/2008 937 grichard Implemented 'replace all'.
* 10/11/2012 1229 rferrel Made dialog non-blocking.
*
* </pre>
*
@ -119,7 +120,8 @@ public class FindReplaceDlg extends CaveSWTDialog {
* Text editor containing the text to be searched.
*/
public FindReplaceDlg(Shell parent, StyledText textEditor) {
super(parent, CAVE.PERSPECTIVE_INDEPENDENT);
super(parent, SWT.NONE, CAVE.PERSPECTIVE_INDEPENDENT
| CAVE.DO_NOT_BLOCK);
setText("Find and Replace");
this.textEditor = textEditor;

View file

@ -75,6 +75,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* 7 DEC 2010 7621 rferrel Modified constructor to take a
* LocalizedFile and added preOpen() to
* open the LocalizedFile.
* 11 OCT 2012 1229 rferrel Changes for non-blocking FindReplaceDlg.
*
* </pre>
*
@ -141,6 +142,8 @@ public class TextEditorSetupDlg extends CaveSWTDialog {
private String template;
private FindReplaceDlg findDlg;
/**
* Constructor.
*
@ -323,8 +326,12 @@ public class TextEditorSetupDlg extends CaveSWTDialog {
@Override
public void widgetSelected(SelectionEvent event) {
// Use the AvnFPS Find/Replace dialog
FindReplaceDlg findDlg = new FindReplaceDlg(shell, editorStTxt);
findDlg.open();
if (mustCreate(findDlg)) {
findDlg = new FindReplaceDlg(shell, editorStTxt);
findDlg.open();
} else {
findDlg.bringToTop();
}
}
});