diff --git a/RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/request/RpsList.java b/RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/request/RpsList.java
index 7fb203bbf1..156b509fbb 100755
--- a/RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/request/RpsList.java
+++ b/RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/request/RpsList.java
@@ -30,9 +30,29 @@ import com.raytheon.rcm.products.ProductInfo.Selector;
import com.raytheon.rcm.products.RadarProduct;
import com.raytheon.rcm.products.RadarProduct.Param;
+/**
+ * Representation of an RPS list
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * 2009-04-22 #1693 D. Friedman Initial checkin
+ * ...
+ * 2013-01-31 DR 15458 D. Friedman Define UNSPECIFIED_VCP
+ *
+ *
+ */
@XmlRootElement
@XmlAccessorType(XmlAccessType.PROPERTY)
public class RpsList implements Cloneable {
+ /**
+ * Indicates an a list that is appropriate for any VCP or an unspecified
+ * VCP.
+ */
+ public static final int UNSPECIFIED_VCP = -1;
+
/* just a guess of what will be useful... */
protected int opMode;
protected int vcp;
diff --git a/RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/rpsmgr/RPSListManager.java b/RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/rpsmgr/RPSListManager.java
index 159d767e42..d02a3cbcb7 100755
--- a/RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/rpsmgr/RPSListManager.java
+++ b/RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/rpsmgr/RPSListManager.java
@@ -58,6 +58,20 @@ import com.raytheon.rcm.server.StatusManager.RadarStatus;
/* TODO: Log PRR messages for requests the mgr sent? (RPSHandler::handlePRR)
*/
+/**
+ * Manages current RPS lists and requests for changes to RPS lists.
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * 2009-04-22 #1693 D. Friedman Initial checkin
+ * ...
+ * 2013-01-31 DR 15458 D. Friedman Explicitly handle UNSPECIFIED_VCP.
+ *
+ *
+ */
public class RPSListManager extends RadarEventAdapter {
// All RPS list requests will use this for the sequence number.
@@ -149,7 +163,7 @@ public class RPSListManager extends RadarEventAdapter {
RadarStatus status = radarServer.getStatusManager().getRadarStatus(
radarID);
int opMode;
- int vcp;
+ int currentVCP;
int[] gsmCuts;
try {
byte[] msg = status.getCurrentGSM();
@@ -157,7 +171,7 @@ public class RPSListManager extends RadarEventAdapter {
return "Not connected or no status information received yet";
GSM gsm = GSM.decode(msg);
opMode = gsm.opMode;
- vcp = gsm.vcp;
+ currentVCP = gsm.vcp;
gsmCuts = gsm.cuts;
} catch (RuntimeException e) {
Log.errorf("Error reading GSM: %s", e);
@@ -165,23 +179,22 @@ public class RPSListManager extends RadarEventAdapter {
return "Error getting radar status";
}
- int[] cuts = ElevationInfo.getInstance().getScanElevations(radarID, vcp);
+ int[] cuts = ElevationInfo.getInstance().getScanElevations(radarID, currentVCP);
if (cuts == null && Util.getRadarType(rc) == RadarType.WSR)
cuts = gsmCuts;
- // TODO: INVALID_VCP
- if (list.getVcp() > 0 && list.getVcp() != vcp) {
+ if (list.getVcp() != RpsList.UNSPECIFIED_VCP && list.getVcp() != currentVCP) {
if (store)
return null; // TODO: Should warn instead.
else
return String.format("RPS list for VCP %d. Current VCP is %d",
- list.getVcp(), vcp);
+ list.getVcp(), currentVCP);
}
list = (RpsList) list.clone();
- list.setVcp(vcp);
+ list.setVcp(currentVCP);
- list = getMergedRpsListForRadar(rc, opMode, vcp, cuts, list);
+ list = getMergedRpsListForRadar(rc, opMode, currentVCP, cuts, list);
if (list != null) {
// TODO: Should persist this
currentRpsLists.put(rc.getRadarID(), (RpsList) list.clone());
diff --git a/cave/build/static/common/cave/etc/gfe/userPython/smartTools/Show_Evolution.py b/cave/build/static/common/cave/etc/gfe/userPython/smartTools/Show_Evolution.py
index a33bd47a7d..4f6d0b2b21 100644
--- a/cave/build/static/common/cave/etc/gfe/userPython/smartTools/Show_Evolution.py
+++ b/cave/build/static/common/cave/etc/gfe/userPython/smartTools/Show_Evolution.py
@@ -32,6 +32,13 @@
# 2005/07/29 - Version 0.1 - updated grid database structure
# 2006/11/06 - Version 1.0 - no changes - just part of BOIVerify upgrade
# 2007/10/25 - Version 2.0 - no changes - just part of BOIVerify upgrade
+#
+# SOFTWARE HISTORY
+#
+# Date Ticket# Engineer Description
+# ------------ ---------- ----------- --------------------------
+# 1/30/13 15536 ryu Made necessary changes to get tool to run
+#
# ----------------------------------------------------------------------------
ToolType = "numeric"
WeatherElementEdited = "None"
@@ -75,10 +82,11 @@ class Tool (SmartScript.SmartScript):
processVarList=ProcessVariableList.ProcessVariableList(
"Pick Model",VList,varReturn)
status=processVarList.status()
- if status != "Ok":
+ if status.lower() != "ok":
self.docancel=1
return
self.modelName=varReturn["Model:"]
+
#
# Remove any current VER grids from gridManager
#
@@ -86,7 +94,7 @@ class Tool (SmartScript.SmartScript):
parmList = self._dbss.getParmManager().getDisplayedParms()
for parm in parmList:
pid=parm.getParmID()
- pmodel = pid.getDbID().getModelId()
+ pmodel = pid.getDbId().getModelId()
name=pid.getParmName()
level=pid.getParmLevel()
if pmodel == "Ver":
@@ -102,7 +110,7 @@ class Tool (SmartScript.SmartScript):
def execute(self,WEname,GridTimeRange):
"Show history of grids over time"
self.VU.logMsg(" executing for time:%s"%GridTimeRange)
- mutableModel=self.mutableID().model()
+ mutableModel=self.mutableID().modelName()
tomorrow=time.time()+86400
parm=WEname
self.VU.logMsg(" running for parm:%s"%parm)
@@ -111,7 +119,7 @@ class Tool (SmartScript.SmartScript):
# Get the color table and range for the parm
#
(self.parmUnits,self.parmPrecision,self.parmMinval,self.parmMaxval,
- self.parmColorTable,self.parmDisplayMinval,
+ self.parmRateFlag,self.parmColorTable,self.parmDisplayMinval,
self.parmDisplayMaxval)=self.getParmInfo(mutableModel,WEname)
#
# Get start/end of current timerange and get verification
@@ -124,6 +132,7 @@ class Tool (SmartScript.SmartScript):
# Loop over verification model records
#
for rec in recs:
+ rec = int(rec)
self.VU.logMsg("rec=%d"%rec)
#
# read grid - clip to min/max for this parm
@@ -159,16 +168,19 @@ class Tool (SmartScript.SmartScript):
self.parmMaxval,self.parmUnits)
self.setActiveElement("Ver",parmname,"SFC",GridTimeRange,
- self.parmColorTable,(self.parmDisplayMinval,
- self.parmDisplayMaxval),0)
+ self.parmColorTable,(float(self.parmDisplayMinval),
+ float(self.parmDisplayMaxval)),0)
return
- #==================================================================
- #
- # getParmInfo - get information on a parm (units, precision, minval,
- # maxval, colortablename, displayminval, displaymaxval)
- # from the database specified
- #
+
def getParmInfo(self,mutableModel,parm):
+ units="units"
+ precision=0
+ minval=0
+ maxval=100
+ rateflag=0
+ colorTable="Gridded Data"
+ displayMinval=0
+ displayMaxval=100
parm=self.getParm(mutableModel,parm,"SFC")
if parm is not None:
parmInfo = parm.getGridInfo()
@@ -176,15 +188,11 @@ class Tool (SmartScript.SmartScript):
precision=parmInfo.getPrecision()
minval=parmInfo.getMinValue()
maxval=parmInfo.getMaxValue()
-
- colorTable="Gridded Data"
- displayMinval=0
- displayMaxval=100
+ rateflag=parmInfo.isRateParm()
from com.raytheon.viz.gfe.rsc import DiscreteDisplayUtil
ctInfo = DiscreteDisplayUtil.buildColorMapParameters(parm)
if ctInfo is not None:
- colorTable = ctInfo.getColorMapName()
- displayMinval = ctInfo.getColorMapMin()
- displayMaxVal = ctInfo.getColorMapMax()
-
- return(units,precision,minval,maxval,colorTable,displayMinval,displayMaxval)
+ colorTable = ctInfo.getColorMapName()
+ displayMinval = ctInfo.getColorMapMin()
+ displayMaxval = ctInfo.getColorMapMax()
+ return(units,precision,minval,maxval,rateflag,colorTable,displayMinval,displayMaxval)
diff --git a/cave/build/static/common/cave/etc/gfe/userPython/textUtilities/regular/TextUtils.py b/cave/build/static/common/cave/etc/gfe/userPython/textUtilities/regular/TextUtils.py
index 98643ced62..91a92f5166 100644
--- a/cave/build/static/common/cave/etc/gfe/userPython/textUtilities/regular/TextUtils.py
+++ b/cave/build/static/common/cave/etc/gfe/userPython/textUtilities/regular/TextUtils.py
@@ -1,19 +1,19 @@
##
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
-#
+#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to non-U.S. persons whether in the United States or abroad requires
# an export license or other authorization.
-#
+#
# Contractor Name: Raytheon Company
# Contractor Address: 6825 Pine Street, Suite 340
# Mail Stop B8
# Omaha, NE 68106
# 402.291.0100
-#
+#
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
# further licensing information.
##
@@ -175,7 +175,7 @@ class TextUtils:
# Return 1 if any of the searchKeys are found in subkeys
wxSize = len(subkeys)
wxStr = ""
- for x in range(wxSize):
+ for x in range(wxSize):
wxStr += str(subkeys[x])
if x < wxSize - 1:
wxStr += '^'
@@ -253,7 +253,7 @@ class TextUtils:
return 0.0
countAbove = 0
- for histSample in parmHisto.histoSamples():
+ for histSample in parmHisto.histoSamples():
for histPair in histSample.histogram():
if histPair.value().scalar() > value:
countAbove = countAbove + histPair.count()
@@ -418,7 +418,7 @@ class TextUtils:
if index == -1:
name = parmNameAndLevel
level = "SFC"
- parm = ParmID(name,databaseID,level)
+ parm = ParmID(name,databaseID,level)
else:
name = parmNameAndLevel[0:index]
level = parmNameAndLevel[index+1:]
@@ -674,11 +674,11 @@ class TextUtils:
def getPreviousProduct(self, productID, searchString="", version=0):
# gets a previous product from the AWIPS database
-
- from com.raytheon.viz.gfe.core import DataManager
+
from com.raytheon.viz.gfe.product import TextDBUtil
-
- opMode = DataManager.getCurrentInstance().getOpMode().name() == "OPERATIONAL"
+
+ # DR 15703 - always retrieve operational products
+ opMode = True
previousProduct = TextDBUtil.retrieveProduct(productID, version, opMode)
previousProduct = string.strip(previousProduct)
diff --git a/cave/com.raytheon.uf.viz.core.maps/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.core.maps/META-INF/MANIFEST.MF
index 103c057c33..8b31bd3b75 100644
--- a/cave/com.raytheon.uf.viz.core.maps/META-INF/MANIFEST.MF
+++ b/cave/com.raytheon.uf.viz.core.maps/META-INF/MANIFEST.MF
@@ -17,7 +17,8 @@ Require-Bundle: org.eclipse.ui,
com.raytheon.uf.common.pointdata;bundle-version="1.12.1174",
com.raytheon.uf.viz.productbrowser;bundle-version="1.12.1152",
com.raytheon.uf.viz.core.rsc;bundle-version="1.0.0",
- com.raytheon.uf.viz.ui.menus;bundle-version="1.12.1174"
+ com.raytheon.uf.viz.ui.menus;bundle-version="1.12.1174",
+ com.raytheon.uf.viz.localization;bundle-version="1.12.1174"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Eclipse-RegisterBuddy: com.raytheon.uf.viz.core
diff --git a/cave/com.raytheon.uf.viz.core.maps/plugin.xml b/cave/com.raytheon.uf.viz.core.maps/plugin.xml
index 1f3cc8d8c1..912029cc41 100644
--- a/cave/com.raytheon.uf.viz.core.maps/plugin.xml
+++ b/cave/com.raytheon.uf.viz.core.maps/plugin.xml
@@ -100,4 +100,14 @@
+
+
+
+
diff --git a/cave/com.raytheon.uf.viz.core.maps/src/com/raytheon/uf/viz/core/maps/MapStylePreferenceStore.java b/cave/com.raytheon.uf.viz.core.maps/src/com/raytheon/uf/viz/core/maps/MapStylePreferenceStore.java
index aaddf58f87..7f157c9208 100644
--- a/cave/com.raytheon.uf.viz.core.maps/src/com/raytheon/uf/viz/core/maps/MapStylePreferenceStore.java
+++ b/cave/com.raytheon.uf.viz.core.maps/src/com/raytheon/uf/viz/core/maps/MapStylePreferenceStore.java
@@ -29,11 +29,14 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
+import com.raytheon.uf.common.localization.FileUpdatedMessage;
+import com.raytheon.uf.common.localization.ILocalizationFileObserver;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory;
+import com.raytheon.uf.common.localization.exception.LocalizationException;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SerializationUtil;
@@ -51,6 +54,9 @@ import com.raytheon.uf.viz.core.rsc.capabilities.Capabilities;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 7, 2010 randerso Initial creation
+ * Jan 25, 2013 DR 15649 D. Friedman Clone capabilities in get/put.
+ * Stored preferences in a sub-directory
+ * and observe changes.
*
*
*
@@ -64,7 +70,9 @@ public class MapStylePreferenceStore implements ISerializableObject {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(MapStylePreferenceStore.class);
- private static final String MAPSTYLE_FILENAME = "mapstylepreferences.xml";
+ private static final String MAPSTYLE_FILENAME = "mapStyles/mapstylepreferences.xml";
+
+ private static final String OLD_MAPSTYLE_FILENAME = "mapstylepreferences.xml";
private static class MapStylePreferenceKey {
private String perspective;
@@ -166,21 +174,72 @@ public class MapStylePreferenceStore implements ISerializableObject {
private Map preferences;
+ @XmlTransient
+ LocalizationFile siteLf, userLf;
+
+ @XmlTransient
+ boolean needToLoad = true;
+
public static MapStylePreferenceStore load() {
+ MapStylePreferenceStore store = new MapStylePreferenceStore();
+ store.loadFiles();
+ return store;
+ }
+
+ private synchronized void loadFiles() {
+ if (needToLoad)
+ needToLoad = false;
+ else
+ return;
+
IPathManager pathMgr = PathManagerFactory.getPathManager();
- LocalizationFile siteLf = pathMgr.getLocalizationFile(pathMgr
- .getContext(LocalizationType.CAVE_STATIC,
- LocalizationLevel.SITE), MAPSTYLE_FILENAME);
+ if (siteLf == null) {
+ siteLf = pathMgr.getLocalizationFile(pathMgr
+ .getContext(LocalizationType.CAVE_STATIC,
+ LocalizationLevel.SITE), MAPSTYLE_FILENAME);
- LocalizationFile userLf = pathMgr.getLocalizationFile(pathMgr
- .getContext(LocalizationType.CAVE_STATIC,
- LocalizationLevel.USER), MAPSTYLE_FILENAME);
+ userLf = pathMgr.getLocalizationFile(pathMgr
+ .getContext(LocalizationType.CAVE_STATIC,
+ LocalizationLevel.USER), MAPSTYLE_FILENAME);
+
+ ILocalizationFileObserver obs = new ILocalizationFileObserver() {
+ @Override
+ public void fileUpdated(FileUpdatedMessage message) {
+ synchronized (MapStylePreferenceStore.this) {
+ needToLoad = true;
+ }
+ }
+ };
+
+ siteLf.addFileUpdatedObserver(obs);
+ userLf.addFileUpdatedObserver(obs);
+
+ /* DR 15649 for OB 13.3.1: If the map style preferences are in the
+ * old location, move it to the correct place. This code can be
+ * removed in the future.
+ */
+ if (! userLf.exists()) {
+ LocalizationFile oldUserLf = pathMgr.getLocalizationFile(pathMgr
+ .getContext(LocalizationType.CAVE_STATIC,
+ LocalizationLevel.USER), OLD_MAPSTYLE_FILENAME);
+
+ if (oldUserLf.exists()) {
+ try {
+ userLf.write(oldUserLf.read());
+ oldUserLf.delete();
+ statusHandler.handle(Priority.INFO, "Moved user map style preferences to new location");
+ } catch (LocalizationException e) {
+ statusHandler.handle(Priority.PROBLEM, "Unable to move map style preferences", e);
+ e.printStackTrace();
+ }
+ }
+ }
+ }
- MapStylePreferenceStore store = new MapStylePreferenceStore();
if (siteLf.exists()) {
try {
- store.combinedPreferences = ((MapStylePreferenceStore) SerializationUtil
+ combinedPreferences = ((MapStylePreferenceStore) SerializationUtil
.jaxbUnmarshalFromXmlFile(siteLf.getFile())).preferences;
} catch (SerializationException e) {
statusHandler
@@ -189,18 +248,18 @@ public class MapStylePreferenceStore implements ISerializableObject {
e);
}
} else {
- store.combinedPreferences = new HashMap();
+ combinedPreferences = new HashMap();
}
if (userLf.exists()) {
try {
- store.preferences = ((MapStylePreferenceStore) SerializationUtil
+ preferences = ((MapStylePreferenceStore) SerializationUtil
.jaxbUnmarshalFromXmlFile(userLf.getFile())).preferences;
// merge user into site
- for (Entry entry : store.preferences
+ for (Entry entry : preferences
.entrySet()) {
- store.combinedPreferences.put(entry.getKey(),
+ combinedPreferences.put(entry.getKey(),
entry.getValue());
}
@@ -211,31 +270,34 @@ public class MapStylePreferenceStore implements ISerializableObject {
e);
}
} else {
- store.preferences = new HashMap();
+ preferences = new HashMap();
}
-
- return store;
}
private MapStylePreferenceStore() {
}
- public Capabilities get(String perspective, String mapName) {
+ public synchronized Capabilities get(String perspective, String mapName) {
MapStylePreferenceKey key = new MapStylePreferenceKey(perspective,
mapName);
+ loadFiles();
+
Capabilities value = combinedPreferences.get(key);
if (value == null) {
value = new Capabilities();
- }
+ } else
+ value = value.clone();
return value;
}
- public Capabilities put(String perspective, String mapName,
+ public synchronized Capabilities put(String perspective, String mapName,
Capabilities value) {
MapStylePreferenceKey key = new MapStylePreferenceKey(perspective,
mapName);
+ value = value.clone();
+
Capabilities oldValue = combinedPreferences.put(key, value);
preferences.put(key, value);
diff --git a/cave/com.raytheon.uf.viz.core.rsc/src/com/raytheon/uf/viz/core/rsc/sampling/actions/LatLonReadoutAction.java b/cave/com.raytheon.uf.viz.core.rsc/src/com/raytheon/uf/viz/core/rsc/sampling/actions/LatLonReadoutAction.java
index 736ff6cf68..fcedd4e1a8 100644
--- a/cave/com.raytheon.uf.viz.core.rsc/src/com/raytheon/uf/viz/core/rsc/sampling/actions/LatLonReadoutAction.java
+++ b/cave/com.raytheon.uf.viz.core.rsc/src/com/raytheon/uf/viz/core/rsc/sampling/actions/LatLonReadoutAction.java
@@ -29,6 +29,22 @@ import com.raytheon.uf.viz.core.rsc.sampling.LatLonReadoutResource;
import com.raytheon.uf.viz.core.sampling.ISamplingResource;
import com.raytheon.viz.ui.cmenu.AbstractRightClickAction;
+/**
+ *
+ * Enable or Disable Lat/Lon display on an editor
+ *
+ *
+ * SOFTWARE HISTORY
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Jun 1, 2007 chammack Initial Creation.
+ * Jan 28, 2013 14465 snaples Updated run() method to set sampling false when disabling readout.
+ *
+ *
+ *
+ * @author chammack
+ * @version 1.0
+ */
public class LatLonReadoutAction extends AbstractRightClickAction {
/*
@@ -36,7 +52,9 @@ public class LatLonReadoutAction extends AbstractRightClickAction {
*
* @see org.eclipse.jface.action.Action#run()
*/
- private String actionText;
+ private final String actionText;
+
+ private boolean sampled = false;
private boolean hasLatLonReadout = false;
@@ -64,9 +82,20 @@ public class LatLonReadoutAction extends AbstractRightClickAction {
for (LatLonReadoutResource rsc : rscs) {
pane.getDescriptor().getResourceList().removeRsc(rsc);
}
+ List samplers = pane.getDescriptor()
+ .getResourceList()
+ .getResourcesByTypeAsType(ISamplingResource.class);
+ for (ISamplingResource sampler : samplers) {
+ if (sampled) {
+ break;
+ } else {
+ sampler.setSampling(false);
+ }
+ }
}
} else {
// add resource
+ sampled = false;
for (IDisplayPane pane : container.getDisplayPanes()) {
pane.getDescriptor()
.getResourceList()
@@ -79,7 +108,12 @@ public class LatLonReadoutAction extends AbstractRightClickAction {
.getResourceList()
.getResourcesByTypeAsType(ISamplingResource.class);
for (ISamplingResource sampler : samplers) {
- sampler.setSampling(true);
+ if (sampler.isSampling()) {
+ sampled = true;
+ break;
+ } else {
+ sampler.setSampling(true);
+ }
}
}
}
diff --git a/cave/com.raytheon.uf.viz.d2d.ui/localization/styleRules/d2dContourStyleRules.xml b/cave/com.raytheon.uf.viz.d2d.ui/localization/styleRules/d2dContourStyleRules.xml
index bab5801554..c4ebb607a6 100644
--- a/cave/com.raytheon.uf.viz.d2d.ui/localization/styleRules/d2dContourStyleRules.xml
+++ b/cave/com.raytheon.uf.viz.d2d.ui/localization/styleRules/d2dContourStyleRules.xml
@@ -984,7 +984,7 @@ PVU |1e5| 0.0 | 4 | | |..|8000F0FF| |16| \
MpV
- K/hPa/s
+ K/hPa/s*1.0E-5-1 -.5 -.1 0 1 1.5 2 3 4 5 6 8 10 12 15 20
diff --git a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/dialogs/procedures/ProcedureDlg.java b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/dialogs/procedures/ProcedureDlg.java
index dee0cec572..b6fdcb0617 100644
--- a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/dialogs/procedures/ProcedureDlg.java
+++ b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/dialogs/procedures/ProcedureDlg.java
@@ -36,8 +36,6 @@ import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.ShellAdapter;
-import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
@@ -46,10 +44,11 @@ import org.eclipse.swt.layout.RowData;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import com.raytheon.uf.common.localization.IPathManager;
@@ -99,6 +98,8 @@ import com.raytheon.viz.ui.editor.AbstractEditor;
* Oct 16, 2012 1229 rferrel Changes for non-blocking AlterBundleDlg.
* Oct 16, 2012 1229 rferrel Changes to have displayDialog method.
* Oct 16, 2012 1229 rferrel Changes for non-blocking ProcedureListDlg.
+ * Jan 15, 2013 DR 15699 D. Friedman Prompt for save when close button clicked.
+ * Jan 16, 2013 DR 15367 D. Friedman Enable save button for Up/Down changes.
*
*
*
@@ -217,6 +218,15 @@ public class ProcedureDlg extends CaveSWTDialog {
this.bundles.add(bp);
}
}
+
+ addListener(SWT.Close, new Listener() {
+
+ @Override
+ public void handleEvent(Event event) {
+ handleCloseRequest();
+ event.doit = false;
+ }
+ });
}
@Override
@@ -335,16 +345,13 @@ public class ProcedureDlg extends CaveSWTDialog {
ProcedureComm.getInstance().addCopyOutListener(copyOutListener);
- shell.addShellListener(new ShellAdapter() {
-
+ addListener(SWT.Dispose, new Listener() {
@Override
- public void shellClosed(ShellEvent arg0) {
+ public void handleEvent(Event event) {
ProcedureComm.getInstance().removeCopyOutListener(
copyOutListener);
ProcedureComm.getInstance().removeCopyOutStateListener(
changeListener);
-
- font.dispose();
}
});
}
@@ -393,7 +400,7 @@ public class ProcedureDlg extends CaveSWTDialog {
}
- private void saveProcedure() {
+ private void saveProcedure(boolean closeAfterSave) {
try {
IPathManager pm = PathManagerFactory.getPathManager();
@@ -437,6 +444,9 @@ public class ProcedureDlg extends CaveSWTDialog {
shell.setText("Procedure - " + fileName);
saved = true;
saveBtn.setEnabled(false);
+
+ if (closeAfterSave)
+ close();
} catch (Exception e) {
final String errMsg = "Error occurred during procedure save.";
statusHandler.handle(Priority.PROBLEM, errMsg, e);
@@ -497,6 +507,8 @@ public class ProcedureDlg extends CaveSWTDialog {
bundles.add(idx - 1, b);
dataList.setSelection(idx - 1);
resyncProcedureAndList();
+ saved = false;
+ saveBtn.setEnabled(true);
}
});
@@ -520,6 +532,8 @@ public class ProcedureDlg extends CaveSWTDialog {
bundles.add(idx + 1, b);
dataList.setSelection(idx + 1);
resyncProcedureAndList();
+ saved = false;
+ saveBtn.setEnabled(true);
}
});
@@ -779,11 +793,7 @@ public class ProcedureDlg extends CaveSWTDialog {
saveBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
- if (fileName == null) {
- showSaveAsDlg();
- } else {
- saveProcedure();
- }
+ handleSaveRequest(false);
}
});
@@ -795,7 +805,7 @@ public class ProcedureDlg extends CaveSWTDialog {
saveAsBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
- showSaveAsDlg();
+ showSaveAsDlg(false);
}
});
gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);
@@ -806,11 +816,7 @@ public class ProcedureDlg extends CaveSWTDialog {
closeBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
- if (saved) {
- shell.close();
- } else {
- showConfirmSaveDlg();
- }
+ handleCloseRequest();
}
});
}
@@ -902,7 +908,7 @@ public class ProcedureDlg extends CaveSWTDialog {
try {
// Load was issued in alterBundleDlg
bp.xml = b.toXML();
- saveProcedure();
+ saveProcedure(false);
load(b);
} catch (VizException e) {
final String err = "Error altering bundle";
@@ -921,7 +927,15 @@ public class ProcedureDlg extends CaveSWTDialog {
}
}
- private void showSaveAsDlg() {
+ private void handleSaveRequest(boolean closeAfterSave) {
+ if (fileName == null) {
+ showSaveAsDlg(closeAfterSave);
+ } else {
+ saveProcedure(closeAfterSave);
+ }
+ }
+
+ private void showSaveAsDlg(final boolean closeAfterSave) {
if (mustCreate(saveAsDlg)) {
saveAsDlg = new ProcedureListDlg("Save Procedure As...", shell,
ProcedureListDlg.Mode.SAVE);
@@ -946,7 +960,7 @@ public class ProcedureDlg extends CaveSWTDialog {
frozen = saveAsDlg.isFrozen();
fileName = fn;
- saveProcedure();
+ saveProcedure(closeAfterSave);
}
}
});
@@ -956,15 +970,25 @@ public class ProcedureDlg extends CaveSWTDialog {
}
}
+ private void handleCloseRequest()
+ {
+ if (saved) {
+ close();
+ } else {
+ showConfirmSaveDlg();
+ }
+ }
+
/**
* Confirm save dialog, for if the user hasn't saved the procedure but tries
* to close it
*/
private void showConfirmSaveDlg() {
- CaveSWTDialog dlg = new CaveSWTDialog(shell, SWT.DIALOG_TRIM, CAVE.NONE) {
+ CaveSWTDialog dlg = new CaveSWTDialog(shell, SWT.DIALOG_TRIM | SWT.PRIMARY_MODAL, CAVE.DO_NOT_BLOCK) {
@Override
protected void initializeComponents(Shell shell) {
+ final CaveSWTDialog self = this;
shell.setText("Confirm Save");
/*
@@ -983,10 +1007,8 @@ public class ProcedureDlg extends CaveSWTDialog {
Label label = new Label(imageLblComp, SWT.NONE);
- if (fileName == null) {
- fileName = "untitled";
- }
- label.setText("The procedure \"(" + fileName
+ label.setText("The procedure \"("
+ + (fileName != null ? fileName : "untitled")
+ ")\"\ncontains unsaved data.\nSave before closing?");
label.setData(gridData);
@@ -1011,8 +1033,8 @@ public class ProcedureDlg extends CaveSWTDialog {
yes.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
- Display.getCurrent().getActiveShell().dispose();
- showSaveAsDlg();
+ self.close();
+ handleSaveRequest(true);
}
});
@@ -1026,15 +1048,7 @@ public class ProcedureDlg extends CaveSWTDialog {
no.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
- Composite composite = Display.getCurrent()
- .getActiveShell().getParent();
- if (composite instanceof Shell) {
- Shell shell = (Shell) composite;
- shell.close();
- } else {
- Display.getCurrent().getActiveShell().getParent()
- .dispose();
- }
+ ProcedureDlg.this.close();
}
});
@@ -1048,7 +1062,7 @@ public class ProcedureDlg extends CaveSWTDialog {
cancel.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
- Display.getCurrent().getActiveShell().dispose();
+ self.close();
}
});
}
diff --git a/cave/com.raytheon.uf.viz.datadelivery.feature/com.raytheon.uf.viz.datadelivery.feature.ecl b/cave/com.raytheon.uf.viz.datadelivery.feature/com.raytheon.uf.viz.datadelivery.feature.ecl
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/cave/com.raytheon.uf.viz.datadelivery/com.raytheon.uf.viz.datadelivery.ecl b/cave/com.raytheon.uf.viz.datadelivery/com.raytheon.uf.viz.datadelivery.ecl
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/PotVortMB.py b/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/PotVortMB.py
index 898dde7e22..f8ba42eaf6 100644
--- a/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/PotVortMB.py
+++ b/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/PotVortMB.py
@@ -16,6 +16,15 @@
#
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
# further licensing information.
+#
+# Software History
+#
+# 2013/1/17 DR 15655 Melissa Porricelli Modified final 'result'
+# calculation to remove multiplication
+# by 0.5. Displayed values were
+# off by a factor of this amount
+# in comparison to A1.
+# A1 calc in pvpres.f.
###
from numpy import zeros
@@ -72,7 +81,7 @@ def execute(t_up, t_lo, p_up, p_lo, vector_up, vector_lo, dx, dy, coriolis):
dtdy = dtdy1 + dtdy2
av = avort1 + avort2
- result = (-0.5 * (av*dt + (du*dtdy - dv*dtdx)) / dp)*.5
+ result = (-0.5 * (av*dt + (du*dtdy - dv*dtdx)) / dp)
return result
diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/PTyp.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/PTyp.xml
index 1c39f595b4..f6eac568b2 100644
--- a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/PTyp.xml
+++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/PTyp.xml
@@ -19,9 +19,29 @@
further_licensing_information.
-->
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/pVeq.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/pVeq.xml
index 17a70989e8..b3dface61e 100644
--- a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/pVeq.xml
+++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/pVeq.xml
@@ -18,7 +18,7 @@
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
-
+
@@ -41,4 +41,4 @@
-
+
\ No newline at end of file
diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/pec.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/pec.xml
index 5b5da4bdf4..2ca655066b 100644
--- a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/pec.xml
+++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/pec.xml
@@ -32,5 +32,6 @@
+
diff --git a/cave/com.raytheon.uf.viz.gisdatastore.directory/com.raytheon.uf.viz.gisdatastore.directory.ecl b/cave/com.raytheon.uf.viz.gisdatastore.directory/com.raytheon.uf.viz.gisdatastore.directory.ecl
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/cave/com.raytheon.uf.viz.gisdatastore.feature/com.raytheon.uf.viz.gisdatastore.feature.ecl b/cave/com.raytheon.uf.viz.gisdatastore.feature/com.raytheon.uf.viz.gisdatastore.feature.ecl
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/cave/com.raytheon.uf.viz.gisdatastore/com.raytheon.uf.viz.gisdatastore.ecl b/cave/com.raytheon.uf.viz.gisdatastore/com.raytheon.uf.viz.gisdatastore.ecl
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java
index 9318b9f822..2f39fbe43a 100644
--- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java
+++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java
@@ -105,7 +105,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* Changes for non-blocking AttributesDlg.
* Changes for non-blocking AttributeThresholdDlg.
* Changes for non-blocking LoadSaveConfigDlg.
- *
+ * Jan 23, 2013 14907 gzhang GUID not in Thresholds menu even ColorCell true
*
*
* @author lvenable
@@ -1038,7 +1038,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
// Loop over enum from config singleton to create menu items
for (ThreshColNames colName : ThreshColNames.values()) {
- if (ffmpConfig.isColorCell(colName)) {
+ if (ffmpConfig.isColorCell(colName) && (colName != ThreshColNames.GUID)) {// DR 14907
// only add a menu item if colorCell is true
MenuItem mi = new MenuItem(popupMenu, SWT.NONE);
mi.setText(colName.name());
diff --git a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObMultiHrsReports.java b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObMultiHrsReports.java
index ab888bb68e..798abe5fff 100644
--- a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObMultiHrsReports.java
+++ b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObMultiHrsReports.java
@@ -51,6 +51,7 @@ import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
* Dec 24, 2009 3424 zhao added getTrendDataSet() that returns ObTrendDataSet object
* Jan 25, 2010 4281, 3888, 3877 wkwock/zhao added getHistTableData method
* Oct.31, 2012 1297 skorolev Clean code.
+ * Jan. 29, 2013 15654 zhao add Wind Chill calculation for SNOW
*
*
*
@@ -146,6 +147,16 @@ public class ObMultiHrsReports {
report.setDewpointDepr(report.getTemperature()
- report.getDewpoint());
}
+ /**
+ * DR15654: set Wind Chill for SNOW
+ */
+ if ( appName == AppName.SNOW ) {
+ if ( report.getTemperature() != ObConst.MISSING && report.getWindSpeed() != ObConst.MISSING ) {
+ report.setWindChill(calcWindChill( report.getTemperature(), report.getWindSpeed() ));
+ }
+
+ }
+
if (multiHrsReports.containsKey(nominalTime)) {
multiHrsReports.get(nominalTime).addReport(report);
} else {
@@ -161,7 +172,28 @@ public class ObMultiHrsReports {
}
}
- /**
+ /**
+ * DR 15654:
+ * Wind Chill calculation formula based on
+ * http://www.nws.noaa.gov/om/windchill/
+ * as of Jan. 29, 2013
+ *
+ * @param temperature in degree F
+ * @param windSpeed in knots
+ * @return wind chill in degree F
+ */
+ private float calcWindChill(float temp, float windSpd) {
+ if ( temp > 50.0 || windSpd < 3.0 ) {
+ return ObConst.MISSING;
+ }
+ /**
+ * 1 knots = 1.15078 mph
+ */
+ float spd = (float) Math.pow(1.15078*windSpd, 0.16);
+ return 35.74f + 0.6215f*temp - 35.75f*spd + 0.4275f*temp*spd;
+ }
+
+ /**
* Returns a zone TableData object of the latest nominal time. If no data
* available (the map is empty), returns an empty zone TableData object
* (table cells filled with "N/A").
diff --git a/cave/com.raytheon.uf.viz.radarapps.rps/src/com/raytheon/uf/viz/radarapps/rps/ListEditorWindow.java b/cave/com.raytheon.uf.viz.radarapps.rps/src/com/raytheon/uf/viz/radarapps/rps/ListEditorWindow.java
index 77b9c83eac..c8180c5778 100644
--- a/cave/com.raytheon.uf.viz.radarapps.rps/src/com/raytheon/uf/viz/radarapps/rps/ListEditorWindow.java
+++ b/cave/com.raytheon.uf.viz.radarapps.rps/src/com/raytheon/uf/viz/radarapps/rps/ListEditorWindow.java
@@ -98,6 +98,21 @@ import com.raytheon.uf.viz.radarapps.client.RcmWaiter;
import com.raytheon.uf.viz.radarapps.core.RadarApps;
import com.raytheon.uf.viz.radarapps.products.ui.RadarProductUI;
+/**
+ * RPS List Editor window
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * 2009-04-22 #2286 D. Friedman Initial checkin
+ * ...
+ * 2013-01-31 DR 15458 D. Friedman Send RPS list so that it will be
+ * accepted for any VCP.
+ *
+ *
+ */
public class ListEditorWindow {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(ListEditorWindow.class);
@@ -463,7 +478,10 @@ public class ListEditorWindow {
SendRpsList msg = new SendRpsList();
msg.radarIDs = Arrays.asList(rpg);
msg.requests = Arrays.asList(listEditor.getRpsList().getRequests());
- msg.vcp = listEditor.getVcp();
+ /* Specify that the RadarServer should accept this list no matter
+ * what VCP the RPG is currently using.
+ */
+ msg.vcp = RpsList.UNSPECIFIED_VCP;
String error = null;
try {
error = client.sendRequest(msg, 2000).error;
@@ -831,7 +849,7 @@ public class ListEditorWindow {
RpsList newList = null;
Exception exc = null;
int opMode = -1;
- int vcp = -1;
+ int vcp = RpsList.UNSPECIFIED_VCP;
Selector sel = null;
try {
sel = Awips1RpsListUtil.parseName(f.getName());
@@ -864,7 +882,7 @@ public class ListEditorWindow {
return;
}
- if (newList.getVcp() < 0) {
+ if (newList.getVcp() == RpsList.UNSPECIFIED_VCP) {
VCPInfo vcpInfo = chooseVcp("Could not determine VCP from the file. Please select a VCP.");
if (vcpInfo == null)
return;
diff --git a/cave/com.raytheon.uf.viz.stats/com.raytheon.uf.viz.stats.ecl b/cave/com.raytheon.uf.viz.stats/com.raytheon.uf.viz.stats.ecl
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/cave/com.raytheon.uf.viz.useradmin.feature/com.raytheon.uf.viz.useradmin.feature.ecl b/cave/com.raytheon.uf.viz.useradmin.feature/com.raytheon.uf.viz.useradmin.feature.ecl
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/cave/com.raytheon.uf.viz.useradmin/com.raytheon.uf.viz.useradmin.ecl b/cave/com.raytheon.uf.viz.useradmin/com.raytheon.uf.viz.useradmin.ecl
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/ProductScriptsDialog.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/ProductScriptsDialog.java
index e61b73d7b7..7ed4999be5 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/ProductScriptsDialog.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/ProductScriptsDialog.java
@@ -63,12 +63,14 @@ import com.raytheon.viz.ui.widgets.ToggleSelectList;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * Mar 7, 2008 Eric Babin Initial Creation
+ * Mar 7, 2008 Eric Babin Initial Creation
* Oct 27, 2012 1287 rferrel Code cleanup for non-blocking dialog.
* Oct 25, 2012 1287 rferrel Code changes for non-blocking PublishDialog.
* Nov 30, 2012 15575 ryu Added variable replacement for SelectedStart,
* SelectedEnd, and home
* Nov 13, 2012 1298 rferrel Code changes for non-blocking UserEntryDialog.
+ * Jan 9, 2013 15635 jdynina Allowed to mix and match entry dialogs. Changed order
+ * of dialogs to match A1 displaying entry fields first.
*
*
*
@@ -153,7 +155,9 @@ public class ProductScriptsDialog extends CaveJFACEDialog {
for (int idx : idxs) {
try {
- Boolean run = true;
+ Boolean run = false;
+ List fieldDefs = new ArrayList();
+ int start = 0;
String name = scriptsList.getItem(idx);
String cmd = scriptDict.get(name);
@@ -215,14 +219,51 @@ public class ProductScriptsDialog extends CaveJFACEDialog {
// {startTime}
// {endTime}
+
+ // The user is prompted for a named variable, same as the
+ // user-supplied variables above, but for non-standard
+ // variables.
+ int entryIdx = cmd.indexOf("{entry:");
+ if (entryIdx >= 0) {
+ run = true;
+ int endEntryIdx = cmd.indexOf("}", entryIdx);
+ String[] entry = cmd.substring(entryIdx + 1, endEntryIdx)
+ .split(":");
+ String [] configFile = new String [] { entry[2] };
+
+ // The dialog being opened is modal to the parent dialog.
+ // This will prevent the launching of another dialog until
+ // the modal dialog is closed.
+
+ // Keep this a blocking dialog so the loop will only display
+ // one dialog at a time.
+ fieldDefs
+ .add(new FieldDefinition(
+ (Object) entry[1],
+ entry[1],
+ FieldType.ALPHANUMERIC,
+ (Object) entry[2],
+ Arrays.asList(Arrays
+ .asList(configFile)
+ .toArray(
+ new Object[configFile.length])),
+ (float) 1.0, (int) 3));
+
+ if (start == 0) {
+ start = entryIdx;
+ } else if ((start > 0) && (start > entryIdx)) {
+ start = entryIdx;
+ }
+ }
+
// The user is prompted for a list of radio button values.
// {entryButtons: : }
+ // by commas>}
int count = cmd.split("entryButtons").length - 1;
if (count > 0) {
- int entryIdx = 0, i = 0, start = 0;
- List fieldDefs = new ArrayList();
+ entryIdx = 0;
+ int i = 0;
+ run = true;
while (entryIdx != -1) {
entryIdx = cmd.indexOf("{entryButtons:", entryIdx);
@@ -243,33 +284,14 @@ public class ProductScriptsDialog extends CaveJFACEDialog {
.toArray(
new Object[fields.length])),
(float) 1.0, (int) 3));
- if (i == 0) {
+ if (start == 0) {
start = entryIdx;
+ } else if ((start > 0) && (start > entryIdx) && (i == 0)) {
+ start = entryIdx;
}
entryIdx = endEntryIdx + 1;
i++;
}
-
- if (entryIdx == -1) {
- ValuesDialog buttonDlg = new ValuesDialog(name,
- fieldDefs, dataManager);
- if (buttonDlg.open() > 0) {
- run = false;
- continue;
- }
-
- Map