Merge "Issue #1298 Changes for non-blocking NewTextProductDialog." into development

Former-commit-id: ab62adea95 [formerly ab62adea95 [formerly bec0ccddba047ab9e9b6fa64bf839e9930dc675b]]
Former-commit-id: 7db247e33a
Former-commit-id: ded0bfb92f
This commit is contained in:
Lee Venable 2012-11-12 14:13:06 -06:00 committed by Gerrit Code Review
commit 92063028bc
2 changed files with 10 additions and 5 deletions

View file

@ -45,13 +45,14 @@ import com.raytheon.viz.gfe.textproduct.TextProductUtil;
import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
/**
* Dialog for the define new text products
* Dialog for the define new text products.
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sept 25, 2008 1562 askripsky Initial creation.
* Nov 12, 2012 1298 rferrel Changes for non-blocking dialog.
* </pre>
*
* @author askripsky
@ -62,9 +63,9 @@ public class NewTextProductDialog extends CaveJFACEDialog {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(NewTextProductDialog.class);
public static final int CANCEL_ID = 1;
private final int CANCEL_ID = 1;
public static final int OK_ID = 2;
private final int OK_ID = 2;
private String title;
@ -99,7 +100,7 @@ public class NewTextProductDialog extends CaveJFACEDialog {
super(parentShell);
this.title = title;
this.setShellStyle(SWT.DIALOG_TRIM);
this.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
this.validator = validator;
}
@ -289,7 +290,6 @@ public class NewTextProductDialog extends CaveJFACEDialog {
private void initNameSelectionEntry() {
nameSelectionText = new Text(comp, SWT.BORDER);
// nameSelectionText.setTextLimit(50);
nameSelectionText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER,
true, true));
}

View file

@ -34,6 +34,7 @@ import com.raytheon.viz.gfe.dialogs.NewTextProductDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 30, 2008 1562 askripsky Initial creation
* Nov 12, 2012 1298 rferrel Changes for non-blocking NewTextProductDialog.
*
* </pre>
*
@ -58,8 +59,12 @@ public class NewAction extends Action {
// Do this...
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
// The dialog being opened is modal to the parent dialog. This will
// prevent the launching of another dialog until the modal dialog is
// closed.
NewTextProductDialog dlg = new NewTextProductDialog(shell,
"New Text Product", new NewInputValidator());
dlg.setBlockOnOpen(false);
dlg.open();
}
}