Issue #1196 Changes for ScriptOutputDlg.
Change-Id: If2b7bbd6f3a7936cc8d9536553413f3b63e65d11 Former-commit-id:3620e3a0de
[formerlyb96eb0eafd
] [formerly3620e3a0de
[formerlyb96eb0eafd
] [formerly7696aef2c9
[formerly c8cd5ba07fda1b8f8aa674e71f48967d02f8333a]]] Former-commit-id:7696aef2c9
Former-commit-id:1856aa0833
[formerlyfcbe86e8ac
] Former-commit-id:f62a105dd3
This commit is contained in:
parent
74cb9e8817
commit
78ac2dbfa2
4 changed files with 36 additions and 28 deletions
|
@ -291,6 +291,7 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox;
|
||||||
* 20SEP2012 1196 rferrel Refactor dialogs to prevent blocking.
|
* 20SEP2012 1196 rferrel Refactor dialogs to prevent blocking.
|
||||||
* 25SEP2012 1196 lvenable Refactor dialogs to prevent blocking.
|
* 25SEP2012 1196 lvenable Refactor dialogs to prevent blocking.
|
||||||
* 26SEP2012 1196 lvenable Refactor dialogs to prevent blocking.
|
* 26SEP2012 1196 lvenable Refactor dialogs to prevent blocking.
|
||||||
|
* 27SEP2012 1196 rferrel Changes for non-blocking ScriptOutputDlg.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author lvenable
|
* @author lvenable
|
||||||
|
@ -5702,38 +5703,48 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
||||||
&& !scriptsShowOutputItem.isDisposed()) {
|
&& !scriptsShowOutputItem.isDisposed()) {
|
||||||
scriptsShowOutputItem.setSelection(true);
|
scriptsShowOutputItem.setSelection(true);
|
||||||
}
|
}
|
||||||
// create the script output window
|
|
||||||
if (scriptOutput == null) {
|
|
||||||
scriptOutput = new ScriptOutputDlg(shell, token);
|
|
||||||
}
|
|
||||||
// update the script editor window
|
// update the script editor window
|
||||||
if (scriptEditor != null) {
|
if (scriptEditor != null) {
|
||||||
scriptEditor.setScriptOutputState(true);
|
scriptEditor.setScriptOutputState(true);
|
||||||
}
|
}
|
||||||
// open the script output window
|
|
||||||
scriptOutput.open();
|
// create the script output window
|
||||||
// update the menu following close
|
if (scriptOutput == null || !scriptOutput.isDisposed()) {
|
||||||
if (scriptsShowOutputItem != null
|
scriptOutput = new ScriptOutputDlg(shell, token);
|
||||||
&& !scriptsShowOutputItem.isDisposed()) {
|
// open the script output window
|
||||||
scriptsShowOutputItem.setSelection(false);
|
scriptOutput.setCloseCallback(new ICloseCallback() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dialogClosed(Object returnValue) {
|
||||||
|
// update the menu following close
|
||||||
|
if (scriptsShowOutputItem != null
|
||||||
|
&& !scriptsShowOutputItem.isDisposed()) {
|
||||||
|
scriptsShowOutputItem.setSelection(false);
|
||||||
|
}
|
||||||
|
// update script editor window
|
||||||
|
if (scriptEditor != null) {
|
||||||
|
scriptEditor.setScriptOutputState(false);
|
||||||
|
}
|
||||||
|
scriptOutput = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
scriptOutput.open();
|
||||||
|
} else {
|
||||||
|
scriptOutput.bringToTop();
|
||||||
}
|
}
|
||||||
// update script editor window
|
|
||||||
if (scriptEditor != null) {
|
|
||||||
scriptEditor.setScriptOutputState(false);
|
|
||||||
}
|
|
||||||
scriptOutput = null;
|
|
||||||
} else {
|
} else {
|
||||||
if (scriptOutput != null) {
|
if (scriptOutput != null) {
|
||||||
scriptOutput.close();
|
scriptOutput.close();
|
||||||
|
} else {
|
||||||
|
if (scriptsShowOutputItem != null
|
||||||
|
&& !scriptsShowOutputItem.isDisposed()) {
|
||||||
|
scriptsShowOutputItem.setSelection(false);
|
||||||
|
}
|
||||||
|
if (scriptEditor != null) {
|
||||||
|
scriptEditor.setScriptOutputState(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (scriptsShowOutputItem != null
|
|
||||||
&& !scriptsShowOutputItem.isDisposed()) {
|
|
||||||
scriptsShowOutputItem.setSelection(false);
|
|
||||||
}
|
|
||||||
if (scriptEditor != null) {
|
|
||||||
scriptEditor.setScriptOutputState(false);
|
|
||||||
}
|
|
||||||
scriptOutput = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,9 +87,6 @@ public class ScriptEditorDialog extends CaveSWTDialog implements IScriptEditor {
|
||||||
/** the observer to pass to results from a running script */
|
/** the observer to pass to results from a running script */
|
||||||
private final IScriptEditorObserver observer;
|
private final IScriptEditorObserver observer;
|
||||||
|
|
||||||
/** the script output window */
|
|
||||||
ScriptOutputDlg scriptOutput = null;
|
|
||||||
|
|
||||||
/** the text editor ID token */
|
/** the text editor ID token */
|
||||||
private final String token;
|
private final String token;
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jun 29, 2009 mfegan Initial creation
|
* Jun 29, 2009 mfegan Initial creation
|
||||||
|
* Sep 27, 2012 1196 rferrel No longer blocks.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -61,7 +62,7 @@ public class ScriptOutputDlg extends CaveSWTDialog implements SelectionListener
|
||||||
*/
|
*/
|
||||||
public ScriptOutputDlg(Shell parent, String token) {
|
public ScriptOutputDlg(Shell parent, String token) {
|
||||||
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE,
|
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE,
|
||||||
CAVE.PERSPECTIVE_INDEPENDENT);
|
CAVE.PERSPECTIVE_INDEPENDENT | CAVE.DO_NOT_BLOCK);
|
||||||
setText(String.format(DLG_TITLE_FMT, token));
|
setText(String.format(DLG_TITLE_FMT, token));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -378,7 +378,6 @@ public class ValidPeriodDialog extends CaveSWTDialog {
|
||||||
@Override
|
@Override
|
||||||
protected void disposed() {
|
protected void disposed() {
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
super.disposed();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void calculateDuration() {
|
private void calculateDuration() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue