Issue #1790 Bug fix for dialogs in ticket 1578

Change-Id: I472e20ca729d0c4f3510bdd98e5456be47bd2c90

Former-commit-id: 9bc7fe4c771e534148b446d33de969ef53be3b0d
This commit is contained in:
Roger Ferrel 2013-03-27 15:53:15 -05:00 committed by Gerrit Code Review
parent 2a14245dce
commit 1129728e03
7 changed files with 45 additions and 21 deletions

View file

@ -40,6 +40,7 @@ import org.eclipse.ui.PlatformUI;
* ------------ ---------- ----------- --------------------------
* 6/27/06 lvenable Initial Creation.
* 2/06/2013 1578 rferrel Change for non-blocking DataTrashCanDlg.
* 2/27/2013 1790 rferrel Bug fix for non-blocking dialogs.
*
* </pre>
*
@ -60,12 +61,14 @@ public class DataTrashCanAction extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
if (dataTrashCanDlg == null) {
if (dataTrashCanDlg == null || dataTrashCanDlg.isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
dataTrashCanDlg = new DataTrashCanDlg(shell);
dataTrashCanDlg.open();
} else {
dataTrashCanDlg.bringToTop();
}
dataTrashCanDlg.open();
return null;
}

View file

@ -40,6 +40,7 @@ import org.eclipse.ui.PlatformUI;
* ------------ ---------- ----------- --------------------------
* 6/27/06 lvenable Initial Creation.
* 02/07/2013 1758 rferrel Changes for non-blocking FlashFloodGuidanceDlg.
* 03/27/2013 1790 rferrel Bug fix for non-blocking dialogs.
*
* </pre>
*
@ -58,12 +59,14 @@ public class FlashFloodGuidanceAction extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
if (flashFloodDlg == null) {
if (flashFloodDlg == null || flashFloodDlg.isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
flashFloodDlg = new FlashFloodGuidanceDlg(shell);
flashFloodDlg.open();
} else {
flashFloodDlg.bringToTop();
}
flashFloodDlg.open();
return null;
}

View file

@ -33,7 +33,8 @@ import com.raytheon.viz.ui.cmenu.AbstractRightClickAction;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 2, 2008 1194 mpduff Initial creation
* Feb 07, 2013 1578 Changes for non-blocking GageLegend.
* Feb 07, 2013 1578 rferre Changes for non-blocking GageLegend.
* Feb 27, 2013 1790 rferrel Bug fix for non-blocking dialogs.
*
* </pre>
*
@ -66,10 +67,11 @@ public class GageColorLegendAction extends AbstractRightClickAction {
*/
@Override
public void run() {
if (dialog == null) {
if (dialog == null || dialog.isDisposed()) {
dialog = new GageLegend(new Shell());
dialog.open();
} else {
dialog.bringToTop();
}
dialog.open();
}
}

View file

@ -109,7 +109,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* Changes for non-blocking PDC_SaveDlg.
* 13 Mar 2013 1790 rferrel Changes for non-blocking dialog.
* Changes for non-blocking TabularDisplayDlg.
*
* Bug fix for non-blocking dialogs.
* </pre>
*
* @author lvenable
@ -1255,10 +1255,13 @@ public class PointDataControlDlg extends CaveSWTDialog {
@Override
public void dialogClosed(Object returnValue) {
redrawCheck(returnValue);
serviceDlg = null;
}
});
serviceDlg.open();
} else {
serviceDlg.bringToTop();
}
serviceDlg.open();
}
});
@ -1296,10 +1299,13 @@ public class PointDataControlDlg extends CaveSWTDialog {
@Override
public void dialogClosed(Object returnValue) {
redrawCheck(returnValue);
dataSourceDlg = null;
}
});
dataSourceDlg.open();
} else {
dataSourceDlg.bringToTop();
}
dataSourceDlg.open();
}
});
@ -2013,11 +2019,13 @@ public class PointDataControlDlg extends CaveSWTDialog {
* Opens the save dialog.
*/
private void openSaveDialog() {
if (saveDlg == null) {
if (saveDlg == null || saveDlg.isDisposed()) {
saveDlg = new PDC_SaveDlg(shell, selPresetCbo.getSelectionIndex(),
this);
saveDlg.open();
} else {
saveDlg.bringToTop();
}
saveDlg.open();
}
/**
@ -3248,4 +3256,4 @@ public class PointDataControlDlg extends CaveSWTDialog {
shell.setBounds(bounds);
}
}
}
}

View file

@ -39,6 +39,7 @@ import com.raytheon.viz.hydrocommon.HydroDisplayManager;
* ------------ ---------- ----------- --------------------------
* 6/27/06 lvenable Initial creation.
* 02/07/2013 1578 rferrel Changes for non-blocking ProductViewerDlg.
* 03/27/2013 1790 rferrel Bug fix for non-blocking dialogs.
*
* </pre>
*
@ -60,13 +61,15 @@ public class ProductViewerAction extends AbstractHandler {
public Object execute(ExecutionEvent arg0) throws ExecutionException {
String currentLid = HydroDisplayManager.getInstance().getCurrentLid();
if (dialog == null) {
if (dialog == null || dialog.isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
dialog = new ProductViewerDlg(shell);
dialog.open();
} else {
dialog.bringToTop();
}
dialog.open();
if (currentLid != null) {
dialog.setLid(currentLid);
}

View file

@ -40,7 +40,7 @@ import org.eclipse.ui.PlatformUI;
* ------------ ---------- ----------- --------------------------
* 6/27/06 lvenable Initial Creation.
* 02/07/2013 1578 rferrel Changes for non-blocking questionableDlg.
*
* 03/27/2013 1790 rferrel Bug fix for non-blocking dialogs.
* </pre>
*
* @author lvenable
@ -58,12 +58,14 @@ public class QuestionableDataAction extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
if (questionableDlg == null) {
if (questionableDlg == null || questionableDlg.isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
questionableDlg = new QuestionableBadDataDlg(shell);
questionableDlg.open();
} else {
questionableDlg.bringToTop();
}
questionableDlg.open();
return null;
}

View file

@ -125,6 +125,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* and highlight the row that was updated.
* Feb 05,2013 1578 rferrel Changes for non-blocking singleton TimeSeriesDlg.
* Code clean up for non-blocking dialog.
* Feb 27,2013 1790 rferrel Bug fix for non-blocking dialogs.
*
* </pre>
*
@ -1028,10 +1029,12 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
reviewSendScriptBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
if (sendConfigDlg == null) {
if (sendConfigDlg == null || sendConfigDlg.isDisposed()) {
sendConfigDlg = new SendConfigDlg(shell);
sendConfigDlg.open();
} else {
sendConfigDlg.bringToTop();
}
sendConfigDlg.open();
}
});