Issue #2857 - Fix the ncoBase.xml file, add better error logging for missing menu text

Change-Id: I444477eadf8b2d9a2afd5cc4089b4f3137b50b0b

Former-commit-id: e0fc16c612 [formerly 1eefb7be44] [formerly 0bfdcdcbe0] [formerly e0fc16c612 [formerly 1eefb7be44] [formerly 0bfdcdcbe0] [formerly befb72d65e [formerly 0bfdcdcbe0 [formerly b69a8729347de1f0a8ab855f778559085c6de741]]]]
Former-commit-id: befb72d65e
Former-commit-id: 78523a861c [formerly f0f10d8061] [formerly 81e6f193a12ca5c960bf6c6512fb2a5e76dbdeec [formerly c13b5959e9]]
Former-commit-id: 8ee7955908dabc55180cbe5783a7c2c0b5910e15 [formerly 8f0a23c91b]
Former-commit-id: a86684f034
This commit is contained in:
Mike Duff 2014-03-25 12:13:29 -05:00
parent 84e0ab5efb
commit e83edec2f9
2 changed files with 13 additions and 5 deletions

View file

@ -14,7 +14,7 @@
<substitute value="Snow Cover" key="customLegend"/>
<substitute value="0.00" key="sampleFormat"/>
</contribute>
<contribute xsi:type="bundleItem" useReferenceTime="true" file="bundles/ncepHydro/NOHRSC-SNOW.xml" timeQuery="true" id="ncepHydro.nco.snowCoverElev">
<contribute xsi:type="bundleItem" useReferenceTime="true" file="bundles/ncepHydro/NOHRSC-SNOW.xml" menuText="Snow Cover Elev" timeQuery="true" id="ncepHydro.nco.snowCoverElev">
<substitute value="sce" key="param"/>
<substitute value="Snow Cover by elevation (kft)" key="customLegend"/>
<substitute value="0.00" key="sampleFormat"/>
@ -24,18 +24,18 @@
<substitute value="Snow Water Equivalent (in)" key="customLegend"/>
<substitute value="0.00" key="sampleFormat"/>
</contribute>
<contribute xsi:type="bundleItem" useReferenceTime="true" file="bundles/ncepHydro/NOHRSC-SNOW.xml" timeQuery="true" id="ncepHydro.nco.snowWaterPercent">
<contribute xsi:type="bundleItem" useReferenceTime="true" file="bundles/ncepHydro/NOHRSC-SNOW.xml" menuText="Snow Water % nrml" timeQuery="true" id="ncepHydro.nco.snowWaterPercent">
<substitute value="SWEPN" key="param"/>
<substitute value="Snow Water Equivalent % of normal (%)" key="customLegend"/>
<substitute value="0.00" key="sampleFormat"/>
</contribute>
</contribute>
<contribute xsi:type="bundleItem" useReferenceTime="true" file="bundles/Redbook.xml" timeQuery="true" id="ncepHydro.nco.radarSummary">
<contribute xsi:type="bundleItem" useReferenceTime="true" file="bundles/Redbook.xml" menuText="Radar Summary" timeQuery="true" id="ncepHydro.nco.radarSummary">
<substitute value="PAWO82" key="wmo"/>
<substitute value="3600" key="posOff"/>
<substitute value="-2100" key="virtOff"/>
</contribute>
<contribute xsi:type="bundleItem" useReferenceTime="true" file="bundles/Redbook.xml" timeQuery="true" id="ncepHydro.nco.radarLegends">
<contribute xsi:type="bundleItem" useReferenceTime="true" file="bundles/Redbook.xml" menuText="Radar Legends" timeQuery="true" id="ncepHydro.nco.radarLegends">
<substitute value="PAWO83" key="wmo"/>
<substitute value="3600" key="posOff"/>
<substitute value="-2100" key="virtOff"/>

View file

@ -86,6 +86,8 @@ import com.raytheon.viz.ui.actions.LoadBundleHandler;
* Jan 14, 2013 1442 rferrel Add Simulated Time Change Listener.
* Aug 30, 2013 2310 bsteffen Move loading of bundle to
* LoadBundleHandler.
* Mar 25, 2014 2857 mpduff In the case of missing menu text throw exception
* stating the id of the missing text.
*
*
* </pre>
@ -164,7 +166,13 @@ public class BundleContributionItem extends ContributionItem {
.get(contribution.suppressErrors.substring(2,
contribution.suppressErrors.length() - 1)));
}
// Substitute the menu text
if (menuContribution.xml.text == null) {
throw new IllegalStateException("Missing menu text for menu id: "
+ menuContribution.xml.id);
}
this.menuText = VariableSubstitutionUtil.processVariables(
menuContribution.xml.text, this.substitutions);
if (contribution.dataURIs != null) {
@ -455,7 +463,7 @@ public class BundleContributionItem extends ContributionItem {
private class BundleRefreshCallback implements IURIRefreshCallback {
private BinOffset offset;
private final BinOffset offset;
/**
* @param optional2