Issue #2925 - Fixed NPE found during testing.
Former-commit-id:a700d23f6d
[formerlycc7d240cfd
] [formerlyc29981fa99
] [formerlya700d23f6d
[formerlycc7d240cfd
] [formerlyc29981fa99
] [formerly5b73c516d3
[formerlyc29981fa99
[formerly 86306076f94bbfe4e063c4e6d82b7140b5911e61]]]] Former-commit-id:5b73c516d3
Former-commit-id:1fb169f1ce
[formerly05a4c4e31b
] [formerly 0052d9d30c35dc39dd69aece42fc59a0f471c58f [formerlyf08d4a827f
]] Former-commit-id: 275c2d56eebfcd30f92e3347955172f87a580714 [formerly2384cc90c0
] Former-commit-id:f160e66a85
This commit is contained in:
parent
7944e2c35a
commit
d08f39f428
2 changed files with 98 additions and 81 deletions
|
@ -231,6 +231,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* 10/24/2013 16478 zhao add syntax check for extra '=' sign
|
||||
* 02/12/2014 17076 lvenable Mark guidance tabs as not current so they get refreshed
|
||||
* 02/19/2014 16980 zhao add code to ensure the Alt flag is false after the Alt kay is released
|
||||
* 21Mar2014 #2925 lvenable Fixed NPE error found during testing.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -777,7 +778,6 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Mark the tabs as not current so they get refreshed.
|
||||
*/
|
||||
|
@ -1364,11 +1364,10 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
}
|
||||
|
||||
/**
|
||||
* When respectively using alt+'f', alt+'e', alt+'o' and alt+'h'
|
||||
* to open/display menus 'File', 'Edit', 'Options' and 'Help',
|
||||
* the alt flag of the editorTafTabComp object is set to true;
|
||||
* it needs to be re-set to false
|
||||
* (DR16980)
|
||||
* When respectively using alt+'f', alt+'e', alt+'o' and alt+'h' to
|
||||
* open/display menus 'File', 'Edit', 'Options' and 'Help', the alt flag of
|
||||
* the editorTafTabComp object is set to true; it needs to be re-set to
|
||||
* false (DR16980)
|
||||
*/
|
||||
private void setAltFlagForEditorTafTabComp() {
|
||||
if (editorTafTabComp.getAlt()) {
|
||||
|
@ -2159,10 +2158,13 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
|
||||
if (tafIndex == -1 || tafIndex > equalSignIndex) {
|
||||
|
||||
int lineIndexOfFirstEqualSign = st.getLineAtOffset(lastEqualSignIndex);
|
||||
int lineIndexOfSecondEqualSign = st.getLineAtOffset(equalSignIndex);
|
||||
int lineIndexOfFirstEqualSign = st
|
||||
.getLineAtOffset(lastEqualSignIndex);
|
||||
int lineIndexOfSecondEqualSign = st
|
||||
.getLineAtOffset(equalSignIndex);
|
||||
if (lineIndexOfFirstEqualSign == lineIndexOfSecondEqualSign) {
|
||||
StyleRange sr = new StyleRange(lastEqualSignIndex,1,null,qcColors[3]);
|
||||
StyleRange sr = new StyleRange(lastEqualSignIndex, 1, null,
|
||||
qcColors[3]);
|
||||
String msg = "Syntax error: there is an extra '=' sign in this line";
|
||||
syntaxMap.put(sr, msg);
|
||||
st.setStyleRange(null);
|
||||
|
@ -2175,14 +2177,18 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
|
||||
int startIndex = lastEqualSignIndex;
|
||||
|
||||
while ( !in.substring(startIndex,startIndex+1).matches("[A-Z]") && !in.substring(startIndex,startIndex+1).matches("[0-9]") ) {
|
||||
while (!in.substring(startIndex, startIndex + 1).matches(
|
||||
"[A-Z]")
|
||||
&& !in.substring(startIndex, startIndex + 1).matches(
|
||||
"[0-9]")) {
|
||||
startIndex++;
|
||||
}
|
||||
int length = 6;
|
||||
if ((equalSignIndex - startIndex) < 6) {
|
||||
length = equalSignIndex - startIndex;
|
||||
}
|
||||
StyleRange sr = new StyleRange(startIndex,length,null,qcColors[3]);
|
||||
StyleRange sr = new StyleRange(startIndex, length, null,
|
||||
qcColors[3]);
|
||||
String msg = "Syntax error: There is an extra '=' sign before this point, or 'TAF' is missing at beginning of TAF";
|
||||
syntaxMap.put(sr, msg);
|
||||
st.setStyleRange(null);
|
||||
|
@ -3672,6 +3678,11 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
Map<List<String>, Object> results = runPythonQC(tafs, sites,
|
||||
qcItems, bbb);
|
||||
|
||||
if (results == null) {
|
||||
setMessageStatusError("An Error occured while performing the QC check.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Display the QC results
|
||||
int beginIndex = 0;
|
||||
int endIndex = in.indexOf('\n');
|
||||
|
@ -3867,6 +3878,10 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
Map<List<String>, Object> resultMap = (HashMap<List<String>, Object>) map;
|
||||
return resultMap;
|
||||
} catch (JepException e) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"Python error occurred while executing QC - see message details.",
|
||||
e);
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
} finally {
|
||||
|
|
|
@ -103,6 +103,8 @@
|
|||
# Title: AvnFPS: TUG code does not handle transition from warm to cold seasons
|
||||
#
|
||||
#
|
||||
# 21Mar2014 #2925 lvenable Fixed global name not defined error in run() method.
|
||||
#
|
||||
import itertools, logging, math, os, sets, time
|
||||
import ConfigParser
|
||||
import numpy, pupynere
|
||||
|
@ -492,7 +494,7 @@ def run(tafs, siteinfo, items, dataDir):
|
|||
d = {}
|
||||
path = os.path.join(ConfigDir, 'gui', 'TafMonitorCfg.xml')
|
||||
if not os.path.isfile(path):
|
||||
raise Avn.AvnError('File %s does not exist' % fname)
|
||||
raise Avn.AvnError('File %s does not exist' % path)
|
||||
return None
|
||||
tafMonCfg = TafMonitorCfg.unmarshal(path)
|
||||
jMonCfgs = tafMonCfg.getMonitorCfgs()
|
||||
|
|
Loading…
Add table
Reference in a new issue