diff --git a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/D2DTimeMatcher.java b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/D2DTimeMatcher.java index e139669a35..4047e9f945 100644 --- a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/D2DTimeMatcher.java +++ b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/D2DTimeMatcher.java @@ -1061,7 +1061,8 @@ public class D2DTimeMatcher extends AbstractTimeMatcher { } else if (rp.getProperties().isMapLayer() || rp.getProperties().isSystemResource()) { continue; - } else if (rsc.getResourceData() instanceof IResourceGroup) { + } else if (rsc != null + && rsc.getResourceData() instanceof IResourceGroup) { if (validateTimeMatchBasis(((IResourceGroup) rsc.getResourceData()) .getResourceList())) { return true; diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/FollowupData.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/FollowupData.java index ea894bda8b..12b5db47ca 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/FollowupData.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/FollowupData.java @@ -37,7 +37,7 @@ import com.raytheon.uf.common.time.util.TimeUtil; * May 7, 2013 1973 rferrel Changes to properly display Issue Time. * Jul 22, 2013 2176 jsanchez Added EMER to the display string in the update list. * Aug 7, 2013 2243 jsanchez Set all the attributes of an AbstractWarningRecord and added an expiration string. Removed calendar object. - * + * Aug 15,2013 2243 jsanchez Improved the expiration string off by one minute. * * * @author rferrel @@ -143,9 +143,11 @@ public class FollowupData extends WarningRecord { StringBuilder rval = new StringBuilder(); long timeInMillis = SimulatedTime.getSystemTime().getMillis(); if (status != WarningAction.COR) { - // Positive means not yet expired - long diffMins = (record.getEndTime().getTimeInMillis() - timeInMillis) - / TimeUtil.MILLIS_PER_MINUTE; + // use double to keep precision until it's casted to an integer + double diffMillis = record.getEndTime().getTimeInMillis() + - timeInMillis; + int diffMins = (int) Math.round(diffMillis + / TimeUtil.MILLIS_PER_MINUTE); if (diffMins == 0) { rval.append(" Expired"); } else if (diffMins > 0) { @@ -154,8 +156,12 @@ public class FollowupData extends WarningRecord { rval.append(" Exp ").append(-diffMins).append(" min ago"); } } else { - long diffMins = (timeInMillis - record.getIssueTime() - .getTimeInMillis()) / TimeUtil.MILLIS_PER_MINUTE; + // use double to keep precision until it's casted to an integer + double diffMillis = timeInMillis + - record.getIssueTime().getTimeInMillis(); + int diffMins = (int) Math.round(diffMillis + / TimeUtil.MILLIS_PER_MINUTE); + if (diffMins == 0) { rval.append(" Just Issued"); } else { diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java index 60ccbee24d..02b319c787 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java @@ -936,6 +936,7 @@ public class WarngenDialog extends CaveSWTDialog implements // Select the previously selected item. invalidFollowUpAction = false; if (currentSelection != null) { + // isValid checks if the current selection is still in the list boolean isValid = false; for (int i = 0; i < updateListCbo.getItemCount(); i++) { if (updateListCbo.getItem(i).startsWith( @@ -954,7 +955,9 @@ public class WarngenDialog extends CaveSWTDialog implements // up option could be removed due to an action such as a CAN or an // EXP. If an action removes the follow up, then no warning message // should be displayed. - if (!timeRange.contains(SimulatedTime.getSystemTime().getTime())) { + if (!isValid + && !timeRange.contains(SimulatedTime.getSystemTime() + .getTime())) { invalidFollowUpAction = true; preventFollowUpAction(currentSelection); } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/CurrentWarnings.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/CurrentWarnings.java index 8f1a7cb716..611154a8c5 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/CurrentWarnings.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/CurrentWarnings.java @@ -74,6 +74,8 @@ import com.vividsolutions.jts.geom.Geometry; * May 31, 2013 DR 16264 D. Friedman Fix query in prepare method. * Jun 05, 2013 DR 16279 D. Friedman Fix updating of issuance time for followups. * Jul 22, 2013 2176 jsanchez Set the raw message for an EXT. + * Aug 14, 2013 DR 16483 Qinglu Lin Fixed no option issue in WarnGen dropdown menu after + * issuance of an CANCON and restart of CAVE. * * * @author mschenke @@ -344,7 +346,7 @@ public class CurrentWarnings { || (action == WarningAction.EXP)) { if ((rval != null) && (warning.getCountyheader().equals( - rval.getCountyheader()) || !warning + rval.getCountyheader()) || warning .getUgcZones().containsAll( rval.getUgcZones()))) { rval = null; diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FollowUpUtil.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FollowUpUtil.java index ff94f45f3b..04b3dca957 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FollowUpUtil.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FollowUpUtil.java @@ -32,6 +32,7 @@ import com.raytheon.viz.warngen.text.ICommonPatterns; * Mar 13, 2013 DR 15892 D. Friedman Handle SMW format in canceledAreasFromText * Aug 6, 2013 2243 jsanchez Updated the time ranges to be removed from the follow up list correctly. * Aug 13, 2013 2243 jsanchez Removed calendar object. + * Aug 15, 2013 2243 jsanchez Reset the time ranges to the correct values. * * * @@ -314,45 +315,40 @@ public class FollowUpUtil { TimeRange rval = null; - // The time ranges are offset by 1 minute so that after a refresh and on - // the final minute of the time range the follow up data will be - // removed. For example, if a CON is only a available until 5 minutes - // before a warnings expiration, when the time reaches 5 minutes the - // follow up data for a CON is correctly removed. if (action == WarningAction.NEW) { /* Calculate NEW Time Range */ start.setTime(record.getEndTime().getTime()); - start.add(Calendar.MINUTE, -21); + start.add(Calendar.MINUTE, -20); end.setTime(record.getEndTime().getTime()); - end.add(Calendar.MINUTE, 29); + end.add(Calendar.MINUTE, 30); rval = new TimeRange(start, end); } else if (action == WarningAction.COR) { /* Calculate COR Time Range */ end.setTime(record.getIssueTime().getTime()); - end.add(Calendar.MINUTE, 9); + end.add(Calendar.MINUTE, 10); rval = new TimeRange(record.getStartTime(), end); } else if (action == WarningAction.CAN) { /* Calculate CAN Time Range */ end.setTime(record.getEndTime().getTime()); - end.add(Calendar.MINUTE, -11); + end.add(Calendar.MINUTE, -10); rval = new TimeRange(record.getStartTime(), end); } else if (action == WarningAction.CON) { /* Calculate CON Time Range */ end.setTime(record.getEndTime().getTime()); - end.add(Calendar.MINUTE, -6); + end.add(Calendar.MINUTE, -5); rval = new TimeRange(record.getStartTime(), end); } else if (action == WarningAction.EXP) { /* Calculate EXP Time Range */ start.setTime(record.getEndTime().getTime()); - start.add(Calendar.MINUTE, -11); + start.add(Calendar.MINUTE, -10); end.setTime(record.getEndTime().getTime()); - end.add(Calendar.MINUTE, 9); + end.add(Calendar.MINUTE, 10); rval = new TimeRange(start, end); } else if (action == WarningAction.EXT) { /* Calculate EXT Time Range */ start.setTime(record.getStartTime().getTime()); end.setTime(record.getEndTime().getTime()); - end.add(Calendar.MINUTE, -6); + end.add(Calendar.MINUTE, -5); rval = new TimeRange(start, end); } diff --git a/nativeLib/build.native/build-notification.sh b/nativeLib/build.native/build-notification.sh index 2bb5a68c36..4517812a8e 100644 --- a/nativeLib/build.native/build-notification.sh +++ b/nativeLib/build.native/build-notification.sh @@ -197,12 +197,5 @@ if [ $? -ne 0 ]; then echo "ERROR: Failed to copy the org.apache.thrift lib to its destination." exit 1 fi -# org.apache.qpid lib -> notification/lib -cp -vPf ${BUILD_ROOT}/workspace_/org.apache.qpid/${FOSS_LIB_DIR}/* \ - ${BUILD_ROOT}/awips2/notification/${FOSS_LIB_DIR} -if [ $? -ne 0 ]; then - echo "ERROR: Failed to copy the org.apache.qpid lib to its destination." - exit 1 -fi exit 0 diff --git a/nativeLib/edex_com/.cproject b/nativeLib/edex_com/.cproject index fd620de1cd..250a367700 100644 --- a/nativeLib/edex_com/.cproject +++ b/nativeLib/edex_com/.cproject @@ -39,7 +39,7 @@