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 map = buttonDlg.getValues(); - String returnMsg = ""; - - for (Map.Entry entry : map - .entrySet()) { - returnMsg = returnMsg - + entry.getValue().toString() + " "; - } - - start = start - 3; - cmd = cmd.substring(0, start) + returnMsg; - } } } @@ -279,8 +301,9 @@ public class ProductScriptsDialog extends CaveJFACEDialog { // commas>} count = cmd.split("entryChecks").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("{entryChecks:", entryIdx); @@ -301,68 +324,38 @@ 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 map = buttonDlg.getValues(); - String returnMsg = ""; - - for (Map.Entry entry : map - .entrySet()) { - returnMsg = returnMsg - + entry.getValue().toString() + " "; - } - - start = start - 3; - cmd = cmd.substring(0, start) + returnMsg; - } } } - // 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) { - int endEntryIdx = cmd.indexOf("}", entryIdx); - String[] entry = cmd.substring(entryIdx + 1, endEntryIdx) - .split(":"); - String configFile = 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. - UserEntryDialog entryDlg = new UserEntryDialog( - this.getShell(), entry[1] + " Entry", entry[1] - + ":", entry[2]); - Object returnMsg = entryDlg.open(); - if (returnMsg == null) { - // cancel pressed - run = false; - continue; - } - configFile = returnMsg.toString(); - - cmd = cmd.substring(0, entryIdx) + configFile - + cmd.substring(endEntryIdx + 1); - } - + // Open the script dialog to allow the user to make selections; + // then run the script using dialog selections as script arguments if (run) { - TaskManager.getInstance().createScriptTask(name, cmd); + ValuesDialog scriptDlg = new ValuesDialog(name, + fieldDefs, dataManager); + + int dlgOpen = scriptDlg.open(); + + if (dlgOpen <= 0) { + Map map = scriptDlg.getValues(); + String returnMsg = ""; + + for (Map.Entry entry : map.entrySet()) { + returnMsg = returnMsg + entry.getValue().toString() + " "; + } + + start = start - 3; + cmd = cmd.substring(0, start) + returnMsg; + + TaskManager.getInstance().createScriptTask(name, cmd); + } } } catch (Exception e) { diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java index 53665be285..a574bf1d0e 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java @@ -59,6 +59,8 @@ import org.eclipse.swt.custom.StyleRange; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; +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.graphics.Color; @@ -143,6 +145,9 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * Changes for non-blocking FindReplaceDlg. * Changes for non-blocking StoreTransmitDlg. * Changes for non-blocking WrapLengthDialog. + * 08 Feb 2013 12851 jzeng Add menuToAddTo in create*Menu + * Create createEditorPopupMenu() + * Add mouselistener in createTextControl() for StyledText * * * @@ -166,6 +171,11 @@ public class ProductEditorComp extends Composite implements * Toolbar used to mimic a menu bar. */ private ToolBar toolbar; + + /** + * Pop-up Menu + */ + private Menu popupMenu; /** * File menu. @@ -504,7 +514,8 @@ public class ProductEditorComp extends Composite implements transDisabledImg = getImageRegistry().get("transmitDisabled"); transLiveImg = getImageRegistry().get("transmitLive"); checkImg = getImageRegistry().get("checkmark"); - + menuItems = new ArrayList(); + GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); GridLayout gl = new GridLayout(1, false); gl.marginHeight = 1; @@ -565,11 +576,15 @@ public class ProductEditorComp extends Composite implements */ private void createToolbar() { toolbar = new ToolBar(this, SWT.NONE); - - createFileMenu(); - createEditMenu(); - createOptionsMenu(); - createCallToActionsMenu(); + + fileMenu = new Menu(parent.getShell(), SWT.POP_UP); + createFileMenu(fileMenu); + editMenu = new Menu(parent.getShell(), SWT.POP_UP); + createEditMenu(editMenu); + optionsMenu = new Menu(parent.getShell(), SWT.POP_UP); + createOptionsMenu(optionsMenu); + callToActionsMenu = new Menu(parent.getShell(), SWT.POP_UP); + createCallToActionsMenu(callToActionsMenu); fileTI = new ToolItem(toolbar, SWT.DROP_DOWN); fileTI.setText("File"); @@ -627,12 +642,9 @@ public class ProductEditorComp extends Composite implements /** * Create the file menu. */ - private void createFileMenu() { - fileMenu = new Menu(parent.getShell(), SWT.POP_UP); - - menuItems = new ArrayList(); - - MenuItem saveFileMI = new MenuItem(fileMenu, SWT.PUSH); + private void createFileMenu(Menu menuToAddTo) { + + MenuItem saveFileMI = new MenuItem(menuToAddTo, SWT.PUSH); saveFileMI.setText("Save File..."); saveFileMI.addSelectionListener(new SelectionAdapter() { @Override @@ -641,7 +653,7 @@ public class ProductEditorComp extends Composite implements } }); - MenuItem storeMI = new MenuItem(fileMenu, SWT.PUSH); + MenuItem storeMI = new MenuItem(menuToAddTo, SWT.PUSH); storeMI.setText("Store..."); storeMI.addSelectionListener(new SelectionAdapter() { @Override @@ -650,10 +662,10 @@ public class ProductEditorComp extends Composite implements } }); menuItems.add(storeMI); - + // we can't color the background of the menu item so // we use an image like the tab folder. - transmitMI = new MenuItem(fileMenu, SWT.PUSH); + transmitMI = new MenuItem(menuToAddTo, SWT.PUSH); transmitMI.setText("Transmit..."); transmitMI.setImage(transLiveImg); transmitMI.addSelectionListener(new SelectionAdapter() { @@ -663,11 +675,11 @@ public class ProductEditorComp extends Composite implements } }); menuItems.add(transmitMI); - + // Menu Separator - new MenuItem(fileMenu, SWT.SEPARATOR); + new MenuItem(menuToAddTo, SWT.SEPARATOR); - MenuItem printMI = new MenuItem(fileMenu, SWT.PUSH); + MenuItem printMI = new MenuItem(menuToAddTo, SWT.PUSH); printMI.setText("Print"); printMI.addSelectionListener(new SelectionAdapter() { @Override @@ -698,10 +710,10 @@ public class ProductEditorComp extends Composite implements }); // Menu Separator - new MenuItem(fileMenu, SWT.SEPARATOR); + new MenuItem(menuToAddTo, SWT.SEPARATOR); if (editorCorrectionMode) { - MenuItem loadDraftMI = new MenuItem(fileMenu, SWT.PUSH); + MenuItem loadDraftMI = new MenuItem(menuToAddTo, SWT.PUSH); loadDraftMI.setText("Open File..."); loadDraftMI.addSelectionListener(new SelectionAdapter() { @Override @@ -710,7 +722,7 @@ public class ProductEditorComp extends Composite implements } }); - MenuItem saveDraftMI = new MenuItem(fileMenu, SWT.PUSH); + MenuItem saveDraftMI = new MenuItem(menuToAddTo, SWT.PUSH); saveDraftMI.setText("Load Product / Make Correction..."); saveDraftMI.addSelectionListener(new SelectionAdapter() { @Override @@ -719,7 +731,7 @@ public class ProductEditorComp extends Composite implements } }); } else { - MenuItem loadDraftMI = new MenuItem(fileMenu, SWT.PUSH); + MenuItem loadDraftMI = new MenuItem(menuToAddTo, SWT.PUSH); loadDraftMI.setText("Load Draft"); loadDraftMI.addSelectionListener(new SelectionAdapter() { @Override @@ -729,7 +741,7 @@ public class ProductEditorComp extends Composite implements }); menuItems.add(loadDraftMI); - MenuItem saveDraftMI = new MenuItem(fileMenu, SWT.PUSH); + MenuItem saveDraftMI = new MenuItem(menuToAddTo, SWT.PUSH); saveDraftMI.setText("Save Draft"); saveDraftMI.addSelectionListener(new SelectionAdapter() { @Override @@ -744,21 +756,20 @@ public class ProductEditorComp extends Composite implements /** * Create the edit menu. */ - private void createEditMenu() { - editMenu = new Menu(parent.getShell(), SWT.POP_UP); - - MenuItem undoMI = new MenuItem(editMenu, SWT.PUSH); + private void createEditMenu(Menu menuToAddTo) { + + MenuItem undoMI = new MenuItem(menuToAddTo, SWT.PUSH); undoMI.setText("Undo"); undoMI.setEnabled(false); - MenuItem redoMI = new MenuItem(editMenu, SWT.PUSH); + MenuItem redoMI = new MenuItem(menuToAddTo, SWT.PUSH); redoMI.setText("Redo"); redoMI.setEnabled(false); // Menu Separator - new MenuItem(editMenu, SWT.SEPARATOR); + new MenuItem(menuToAddTo, SWT.SEPARATOR); - MenuItem cutMI = new MenuItem(editMenu, SWT.PUSH); + MenuItem cutMI = new MenuItem(menuToAddTo, SWT.PUSH); cutMI.setText("Cut"); cutMI.addSelectionListener(new SelectionAdapter() { @Override @@ -767,7 +778,7 @@ public class ProductEditorComp extends Composite implements } }); - MenuItem copyMI = new MenuItem(editMenu, SWT.PUSH); + MenuItem copyMI = new MenuItem(menuToAddTo, SWT.PUSH); copyMI.setText("Copy"); copyMI.addSelectionListener(new SelectionAdapter() { @Override @@ -776,7 +787,7 @@ public class ProductEditorComp extends Composite implements } }); - MenuItem pasteMI = new MenuItem(editMenu, SWT.PUSH); + MenuItem pasteMI = new MenuItem(menuToAddTo, SWT.PUSH); pasteMI.setText("Paste"); pasteMI.addSelectionListener(new SelectionAdapter() { @Override @@ -786,9 +797,9 @@ public class ProductEditorComp extends Composite implements }); // Menu Separator - new MenuItem(editMenu, SWT.SEPARATOR); + new MenuItem(menuToAddTo, SWT.SEPARATOR); - MenuItem findMI = new MenuItem(editMenu, SWT.PUSH); + MenuItem findMI = new MenuItem(menuToAddTo, SWT.PUSH); findMI.setText("Find..."); findMI.addSelectionListener(new SelectionAdapter() { @Override @@ -797,7 +808,7 @@ public class ProductEditorComp extends Composite implements } }); - MenuItem replaceMI = new MenuItem(editMenu, SWT.PUSH); + MenuItem replaceMI = new MenuItem(menuToAddTo, SWT.PUSH); replaceMI.setText("Replace..."); replaceMI.addSelectionListener(new SelectionAdapter() { @Override @@ -806,7 +817,7 @@ public class ProductEditorComp extends Composite implements } }); - MenuItem spellCheckMI = new MenuItem(editMenu, SWT.PUSH); + MenuItem spellCheckMI = new MenuItem(menuToAddTo, SWT.PUSH); spellCheckMI.setText("Spell Check..."); spellCheckMI.addSelectionListener(new SelectionAdapter() { @Override @@ -820,9 +831,9 @@ public class ProductEditorComp extends Composite implements }); // Menu Separator - new MenuItem(editMenu, SWT.SEPARATOR); + new MenuItem(menuToAddTo, SWT.SEPARATOR); - MenuItem wrapSelectedMI = new MenuItem(editMenu, SWT.PUSH); + MenuItem wrapSelectedMI = new MenuItem(menuToAddTo, SWT.PUSH); wrapSelectedMI.setText("Wrap Selected"); wrapSelectedMI.addSelectionListener(new SelectionAdapter() { @Override @@ -835,10 +846,8 @@ public class ProductEditorComp extends Composite implements /** * Create the options menu. */ - private void createOptionsMenu() { - optionsMenu = new Menu(parent.getShell(), SWT.POP_UP); - - autoWrapMI = new MenuItem(optionsMenu, SWT.CHECK); + private void createOptionsMenu(Menu menuToAddTo) { + autoWrapMI = new MenuItem(menuToAddTo, SWT.CHECK); autoWrapMI.setText("Auto Wrap"); autoWrapMI.setSelection(wrapMode); autoWrapMI.addSelectionListener(new SelectionAdapter() { @@ -848,7 +857,7 @@ public class ProductEditorComp extends Composite implements } }); - framingCodeMI = new MenuItem(optionsMenu, SWT.CHECK); + framingCodeMI = new MenuItem(menuToAddTo, SWT.CHECK); framingCodeMI.setText("Highlight Framing Codes"); framingCodeMI.setSelection(Activator.getDefault().getPreferenceStore() .getBoolean("HighlightFramingCodes")); @@ -862,7 +871,7 @@ public class ProductEditorComp extends Composite implements }); - MenuItem wrapLengthMI = new MenuItem(optionsMenu, SWT.PUSH); + MenuItem wrapLengthMI = new MenuItem(menuToAddTo, SWT.PUSH); wrapLengthMI.setText("Wrap Length..."); wrapLengthMI.addSelectionListener(new SelectionAdapter() { @Override @@ -895,10 +904,8 @@ public class ProductEditorComp extends Composite implements /** * Create the call to actions menu. */ - private void createCallToActionsMenu() { - callToActionsMenu = new Menu(parent.getShell(), SWT.POP_UP); - - MenuItem hazardMI = new MenuItem(callToActionsMenu, SWT.PUSH); + private void createCallToActionsMenu(Menu menuToAddTo) { + MenuItem hazardMI = new MenuItem(menuToAddTo, SWT.PUSH); hazardMI.setText("Hazard..."); hazardMI.addSelectionListener(new SelectionAdapter() { @Override @@ -907,7 +914,7 @@ public class ProductEditorComp extends Composite implements } }); - MenuItem productMI = new MenuItem(callToActionsMenu, SWT.PUSH); + MenuItem productMI = new MenuItem(menuToAddTo, SWT.PUSH); productMI.setText("Product..."); productMI.addSelectionListener(new SelectionAdapter() { @Override @@ -916,7 +923,7 @@ public class ProductEditorComp extends Composite implements } }); - MenuItem genericMI = new MenuItem(callToActionsMenu, SWT.PUSH); + MenuItem genericMI = new MenuItem(menuToAddTo, SWT.PUSH); genericMI.setText("Generic..."); genericMI.addSelectionListener(new SelectionAdapter() { @Override @@ -935,6 +942,17 @@ public class ProductEditorComp extends Composite implements textComp.setWrapColumn(wrapColumn); textComp.setAutoWrapMode(wrapMode); + + createEditorPopupMenu(); + + textComp.getTextEditorST().addMouseListener(new MouseAdapter(){ + @Override + public void mouseDown(MouseEvent e) { + if (e.button == 3){ + popupMenu.setVisible(true); + } + } + }); } /** @@ -2997,4 +3015,36 @@ public class ProductEditorComp extends Composite implements return str; } + + /* + * Add Pop-up GUI for File, Edit, Options, and CallToActions + * at the location of mouse, when right click the mouse + */ + private void createEditorPopupMenu(){ + popupMenu = new Menu(textComp); + + MenuItem fileMI = new MenuItem(popupMenu, SWT.CASCADE); + fileMI.setText("File"); + Menu fileSubMenu = new Menu(popupMenu); + fileMI.setMenu(fileSubMenu); + createFileMenu(fileSubMenu); + + MenuItem editMI = new MenuItem(popupMenu, SWT.CASCADE); + editMI.setText("Edit"); + Menu editSubMenu = new Menu(popupMenu); + editMI.setMenu(editSubMenu); + createEditMenu(editSubMenu); + + MenuItem optionsMI = new MenuItem(popupMenu, SWT.CASCADE); + optionsMI.setText("Options"); + Menu optionsSubMenu = new Menu(popupMenu); + optionsMI.setMenu(optionsSubMenu); + createOptionsMenu(optionsSubMenu); + + MenuItem callToActionsMI = new MenuItem(popupMenu, SWT.CASCADE); + callToActionsMI.setText("CallToActions"); + Menu callToActionsSubMenu = new Menu(popupMenu); + callToActionsMI.setMenu(callToActionsSubMenu); + createCallToActionsMenu(callToActionsSubMenu); + } } diff --git a/cave/com.raytheon.viz.grid/localization/styleRules/gridImageryStyleRules.xml b/cave/com.raytheon.viz.grid/localization/styleRules/gridImageryStyleRules.xml index 1a43b114d0..75ac14dcfb 100644 --- a/cave/com.raytheon.viz.grid/localization/styleRules/gridImageryStyleRules.xml +++ b/cave/com.raytheon.viz.grid/localization/styleRules/gridImageryStyleRules.xml @@ -1719,7 +1719,7 @@ MpV - K/hPa/s + K/hPa/s*1.0E-5 Grid/gridded data diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/resource/DamLocationResource.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/resource/DamLocationResource.java index 81b92c6b4a..8e8a077dcf 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/resource/DamLocationResource.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/resource/DamLocationResource.java @@ -21,7 +21,6 @@ package com.raytheon.viz.hydro.resource; import java.awt.image.RenderedImage; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import org.eclipse.core.commands.ExecutionException; @@ -61,7 +60,7 @@ import com.vividsolutions.jts.geom.Envelope; import com.vividsolutions.jts.index.strtree.STRtree; /** - * Resource to dislpay the DamCrest icons. + * Resource to display the DamCrest icons. * *
  * 
@@ -70,6 +69,7 @@ import com.vividsolutions.jts.index.strtree.STRtree;
  * ------------ ---------- ----------- --------------------------
  * Apr 20, 2009            mpduff     Initial creation
  * Sep 23, 2009 3069       mpduff      Changed the parent class to HydroPointResource.
+ * Jan 22, 2013 15553      wkwock      Correct DamCrest selection algorithm
  * 
* * @author mpduff @@ -310,16 +310,24 @@ public class DamLocationResource extends Coordinate coord = container.translateClick(x, y); Envelope env = new Envelope(coord); List elements = damStrTree.query(env); + double curDist=Double.MAX_VALUE; + DamMaster foundDam = null; if (elements.size() > 0) { - Iterator iter = elements.iterator(); - if (iter.hasNext()) { - DamMaster dam = (DamMaster) iter.next(); - try { - AppLauncherHandler alh = new AppLauncherHandler(); - alh.execute(DC_BUNDLE_LOC, dam.getNidid()); - } catch (ExecutionException e) { - e.printStackTrace(); + //find the closest one + for (Object obj : elements) { + DamMaster dam = (DamMaster) obj; + double distance=Math.pow((dam.getLatitudeDam()-coord.y),2) + Math.pow((dam.getLongitudeDam()-coord.x), 2); + if (distance * @@ -1583,9 +1584,6 @@ public class MultiPointResource extends */ @Override public boolean handleMouseDown(int x, int y, int mouseButton) { - if (mouseButton == 2) { - return true; - } return false; } diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayCanvas.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayCanvas.java index d1f9825d8f..f6c324adfc 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayCanvas.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayCanvas.java @@ -50,13 +50,12 @@ import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.graphics.Region; import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Canvas; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.swt.widgets.MenuItem; import org.eclipse.swt.widgets.Shell; import com.raytheon.uf.common.dataplugin.shef.tables.Fcstheight; @@ -133,7 +132,8 @@ import com.raytheon.viz.hydrocommon.util.DbUtils; * stage and discharge. * 13 Nov 2012 15416 lbousaidi added a check when the colorname is null and a call to * getGroupModeColor - * 09 Jan 2012 15493 lbousaidi added code to delete data while zooming when you draw a box + * 09 Jan 2012 15493 lbousaidi added code to delete data while zooming when you draw a box + * 16 Jan 2013 15695 wkwock Fix popup menu * @author lvenable * @version 1.0 * @@ -360,6 +360,8 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements private TimeSeriesDataJobManager tsDataJobManager = null; private boolean zoomed = false; + + ToggleTimeSeriesDlg ttsd =null; /** * Constructor. @@ -1506,7 +1508,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements .size()])); } - private String getFcstPEDTSE(TraceData td) { + protected String getFcstPEDTSE(TraceData td) { String fcst = getPEDTSE(td); if (td.getBasistime() != null) { fcst = fcst.concat(" " + dateFormat.format(td.getBasistime())); @@ -1521,7 +1523,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements * The Trace Data * @return The PEDTSE String */ - private String getPEDTSE(TraceData td) { + protected String getPEDTSE(TraceData td) { StringBuilder sb = new StringBuilder(); if (td.getPe() != null) { sb.append(td.getPe() + " "); @@ -1545,41 +1547,12 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements * Display the right click popup menu. */ private void popupMenu() { - List traceList = getTraceList(); - Menu m = new Menu(parentComp.getShell(), SWT.POP_UP); - - for (int i = 0; i < traceList.size(); i++) { - TraceData td = traceList.get(i); - String s = null; - if (td.isForecast()) { - s = getFcstPEDTSE(td); - } else { - s = getPEDTSE(td); - } - MenuItem mi = new MenuItem(m, SWT.CHECK); - if (td.getLineData()!=null && td.getLineData().length>0) { - if (td.isTraceOn()) - mi.setSelection(true); - else - mi.setSelection(false); - } else { - mi.setSelection(false); - s = s.concat("" + "NO DATA"); - } - mi.setText(s); - mi.setData(td); - mi.addListener(SWT.Selection, new Listener() { - public void handleEvent(Event event) { - handleSelection(event); - } - }); - } - // We need to make the menu visible - m.setVisible(true); + ttsd = ToggleTimeSeriesDlg.getInstance(getShell(),getTraceList(),this); + ttsd.open(); } - private void handleSelection(Event event) { - MenuItem item = (MenuItem) event.widget; + protected void handleSelection(Event event) { + Button item = (Button) event.widget; TraceData trace = (TraceData) item.getData(); trace.setTraceOn(!trace.isTraceOn()); if (trace.isTraceOn()) { diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayDlg.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayDlg.java index 941bc4704a..7dced34a23 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayDlg.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayDlg.java @@ -88,7 +88,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * 04 Mar 2011 7644 lbousaid fixed Zoom in feature * 30 May 2012 14967 wkwock fix insert deleted data to rejecteddata table * 23 Jul 2012 15195 mpduff Fix dates for displaying groups - * 06 Dec 2012 15066 wkwock Fix "ctrl+r" not work in group mode + * 06 Dec 2012 15066 wkwock Fix "ctrl+r" not work in group mode + * 22 Jan 2013 14903 lbousaidi Fix display error after save to DB. * * * @@ -875,18 +876,7 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog { insertList.clear(); editList.clear(); deleteList.clear(); - - for (TimeSeriesDisplayCanvas canvas : canvasList) { - if (canvas.getTraceArray() != null) { - for (TraceData td : canvas.getTraceArray()) { - /* Reset the selection */ - td.setSelected(false); - } - } - canvas.setGetAgain(true); - canvas.redraw(); - canvas.update(); - } + displayCanvas.redraw(); } } }); diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java index 5295306dc0..25a9749fc8 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java @@ -117,7 +117,8 @@ import com.raytheon.viz.hydrocommon.util.StnClassSyncUtil; * 08 Aug 2012 657 mpduff Fix error when selecting a TS while no selection has been made * in the Station List. * 27 Sep 2012 15302 wkwock TimeSeries start mode should depends on token timeseries_mode - * despite start up in CAVE or standalone. + * despite start up in CAVE or standalone. + * 30 Jan 2013 15264 wkwock Fix the missing group_definition.cfg file crash * * * @author lvenable @@ -604,15 +605,15 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog { this.standaloneMode = true; // Ensure That The Group Configuration File Exists. - if (!groupConfigFile.exists()) { + if (groupConfigFile==null || !groupConfigFile.exists()) { // if it does not, check localization for the file IPathManager pm = PathManagerFactory.getPathManager(); groupConfigFile = pm.getStaticFile(HydroConstants.GROUP_DEFINITION); - if (!groupConfigFile.exists()) { + if (groupConfigFile==null || !groupConfigFile.exists()) { statusHandler.handle(Priority.PROBLEM, "Unable to locate group configuration file - " - + groupConfigFile.getAbsolutePath()); + + HydroConstants.GROUP_DEFINITION); this.groupConfigFilePath = null; } else { this.groupConfigFilePath = groupConfigFile.getAbsolutePath(); diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesconfigAction.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesconfigAction.java index 41555fb514..966907d543 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesconfigAction.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesconfigAction.java @@ -11,6 +11,10 @@ import org.eclipse.core.commands.ExecutionException; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.PlatformUI; +import com.raytheon.uf.common.localization.IPathManager; +import com.raytheon.uf.common.localization.PathManagerFactory; +import com.raytheon.viz.hydrocommon.HydroConstants; + /** * Action for Time Series Configuration Plug-in * @@ -19,6 +23,7 @@ import org.eclipse.ui.PlatformUI; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jan 24, 2011 7797 bkowal Initial creation. + * Jan 30, 2013 15264 wkwock Get the correct group_definition.cfg file. * * * @@ -28,10 +33,6 @@ import org.eclipse.ui.PlatformUI; public class TimeSeriesconfigAction extends AbstractHandler { private TimeSeriesDlg timeSeriesDialog; - private static final String ENV_WHFS_CONFIG_DIR = "whfs_config_dir"; - - private static final String GROUP_DEFINITION_FILE_NAME = "group_definition.cfg"; - @Override public Object execute(ExecutionEvent event) throws ExecutionException { Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() @@ -52,13 +53,8 @@ public class TimeSeriesconfigAction extends AbstractHandler { } protected static File locateGroupDefinitionFile() { - String configDir = System - .getenv(TimeSeriesconfigAction.ENV_WHFS_CONFIG_DIR); - if (!configDir.endsWith("/")) { - configDir = configDir + "/"; - } - File file = new File(configDir - + TimeSeriesconfigAction.GROUP_DEFINITION_FILE_NAME); + IPathManager pm = PathManagerFactory.getPathManager(); + File file = pm.getStaticFile(HydroConstants.GROUP_DEFINITION); return file; } diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/ToggleTimeSeriesDlg.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/ToggleTimeSeriesDlg.java new file mode 100644 index 0000000000..d602cffeba --- /dev/null +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/ToggleTimeSeriesDlg.java @@ -0,0 +1,117 @@ +/** + * 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. + **/ +package com.raytheon.viz.hydro.timeseries; + +import java.util.List; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.RowLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Shell; + +import com.raytheon.viz.hydro.CaveHydroSWTDialog; +import com.raytheon.viz.hydro.timeseries.util.TraceData; + +/** + * This class is the popup menu when right/middle click on the Time Series Display. + * There should be only one toggle time series dialog at a time. + * + *
+ * SOFTWARE HISTORY
+ * Date       Ticket# Engineer    Description
+ * ---------- ------- ----------- --------------------------
+ * 1/16/2013  15695   wkwock      Initial                         
+ * @author wkwock
+ * @version 1.0
+ * 
+ */
+public class ToggleTimeSeriesDlg extends CaveHydroSWTDialog {
+	private static final String DLG_TITLE="Toggle Time Series";
+	private List traceList=null;
+	private TimeSeriesDisplayCanvas tsDisCanvas=null;
+	private static ToggleTimeSeriesDlg oneTTSD=null; //singleton
+	
+	public static ToggleTimeSeriesDlg getInstance(Shell parentShell,List traceLst, TimeSeriesDisplayCanvas tsdc) {
+		if (oneTTSD!=null){
+			oneTTSD.close();
+			oneTTSD.disposed();
+		}
+		oneTTSD = new ToggleTimeSeriesDlg(parentShell, traceLst, tsdc) ;
+		return oneTTSD;
+	}
+	
+	private ToggleTimeSeriesDlg(Shell parentShell,List traceLst, TimeSeriesDisplayCanvas tsdc) {
+		super(parentShell);
+		this.setText(DLG_TITLE);
+		
+		this.traceList=traceLst;
+		this.tsDisCanvas=tsdc;
+	}
+
+	@Override
+	protected void initializeComponents(Shell shell) {
+	       Composite beginningTimeComp = new Composite(shell, SWT.NONE);
+	        RowLayout topLabelCompRl = new RowLayout();
+	        beginningTimeComp.setLayout(topLabelCompRl);
+
+	        Button[] checkBtns = new Button[traceList.size()];
+	    	
+	        for (int i = 0; i < traceList.size(); i++) {
+	            TraceData td = traceList.get(i);
+		    	checkBtns[i] = new Button(shell, SWT.CHECK);
+	            String s = null;
+	            if (td.isForecast()) {
+	                s = this.tsDisCanvas.getFcstPEDTSE(td);
+	            } else {
+	                s = this.tsDisCanvas.getPEDTSE(td);
+	            }
+	            if (td.getLineData()!=null && td.getLineData().length>0) {
+	                if (td.isTraceOn())
+	                    checkBtns[i].setSelection(true);
+	                else
+	                	checkBtns[i].setSelection(false);
+	            } else {
+	            	checkBtns[i].setSelection(false);
+	                s = s.concat("" + "NO DATA");
+	            }
+
+		    	checkBtns[i].setText(s);
+		    	checkBtns[i].setLocation(50*i,250);
+		    	checkBtns[i].pack();
+		    	checkBtns[i].setData(td);
+	            
+	            
+		    	checkBtns[i].addListener(SWT.Selection, new Listener() {
+	                public void handleEvent(Event event) {
+	                    handleSelection(event);
+	                }
+	            });
+	        }
+	        // We need to make the menu visible
+	        beginningTimeComp.setVisible(true);
+	    }
+
+	    private void handleSelection(Event event) {
+	    	this.tsDisCanvas.handleSelection(event);
+	    }
+}
diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/contacts/ContactsDlg.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/contacts/ContactsDlg.java
index 7173339a03..b2a7c5d5c0 100644
--- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/contacts/ContactsDlg.java
+++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/contacts/ContactsDlg.java
@@ -54,6 +54,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
  * Date			Ticket#		Engineer	Description
  * ------------	----------	-----------	--------------------------
  * Sep 10, 2008				lvenable	Initial creation
+ * Feb 13, 2013 15794       wkwock      Make Sequence number goes up to 99
  * 
  * 
* @@ -260,7 +261,7 @@ public class ContactsDlg extends CaveSWTDialog { seqNumSpnr.setPageIncrement(1); seqNumSpnr.setSelection(1); seqNumSpnr.setMinimum(1); - seqNumSpnr.setMaximum(9); + seqNumSpnr.setMaximum(99); seqNumSpnr.setLayoutData(gd); gd = new GridData(275, SWT.DEFAULT); diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/ratingcurve/RatingCurveDlg.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/ratingcurve/RatingCurveDlg.java index ced3ca0f58..91956af3f9 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/ratingcurve/RatingCurveDlg.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/ratingcurve/RatingCurveDlg.java @@ -52,6 +52,7 @@ import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; +import com.raytheon.uf.common.ohd.AppsDefaults; import com.raytheon.uf.viz.core.VizApp; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.viz.hydrocommon.data.RiverDataPoint; @@ -73,6 +74,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * 21 Feb 2010 4167 mpduff Added TimeZone to SimpleDateFormat. * 29 Apr 2010 4993 mpduff Fixed date format in error message. * 26 Jul 2012 14711/963 mpduff Fix problems adding/removing shift points + * 22 Jan 2013 15682 lbousaidi fix openfile problem and changed the path to + * whfs_import_dir for "Import Curve" button. * * * @author lvenable @@ -517,16 +520,19 @@ public class RatingCurveDlg extends CaveSWTDialog { curveImportBtn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { + final String tokenizedDir = "whfs_import_dir"; + String importRating= AppsDefaults.getInstance().getToken(tokenizedDir); FileDialog fd = new FileDialog(shell, SWT.OPEN); - fd.setText("Open"); - fd.setFilterPath("$HOME"); + fd.setFilterPath(importRating); String[] filterExt = { "*." + extension }; fd.setFilterExtensions(filterExt); - - String file = fd.open(); - if (file != null) { - importCurveData(importRatingCurve(fd.open())); - } + String filename = fd.open(); + if (filename == null) { + return; + } else { + importCurveData(importRatingCurve(filename)); + } + } }); diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19Report.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19Report.java index 6114c0a8c2..dca800a32b 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19Report.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19Report.java @@ -47,6 +47,7 @@ import com.raytheon.viz.hydrocommon.whfslib.GeoUtil; * Sep 18, 2009 2260 mpduff Initial creation * Apr 25, 2012 14499 wkwock Refine format, query, etc * Oct 14, 2012 15454 wkwock Fix can not generate e19 if damage filed is empty + * Jan 23, 2013 15443 lbousaidi added NP form feed foe all the pages. * * * @@ -268,7 +269,7 @@ public class E19Report extends TextReport { StringBuilder buffer = new StringBuilder(); TextReportData data = TextReportDataManager.getInstance().getDataForReports(lid, 0); - + buffer.append("\f"); buffer.append(TextReportConstants.E19_HDR_MAPPAGE); buffer.append("\n\n"); @@ -296,6 +297,7 @@ public class E19Report extends TextReport { int numCols = 74; int leftMargin = 24; + buffer.append("\f"); buffer.append(TextReportConstants.E19_HDR_BENCHMARKS); buffer.append("\n\n"); @@ -428,7 +430,7 @@ public class E19Report extends TextReport { String[] crit2 = null; TextReportData data = TextReportDataManager.getInstance().getDataForReports(lid, 2); - + buffer.append("\f"); buffer.append(TextReportConstants.E19_HDR_GAGES + "\n\n"); buffer.append(" DCP TELEM\n\n"); @@ -589,6 +591,7 @@ public class E19Report extends TextReport { */ private String E19History() { StringBuilder buffer = new StringBuilder(); + buffer.append("\f"); buffer.append(TextReportConstants.E19_HDR_HISTORY + "\n\n"); int count1 = countNewlines(buffer.toString()); @@ -767,7 +770,7 @@ public class E19Report extends TextReport { for (int i = 0; i < leftMargin; i++) { indent = indent.concat(" "); } - + buffer.append("\f"); buffer.append(TextReportConstants.E19_HDR_CRESTS + "\n\n"); if (data.getRiverstat() != null) { @@ -917,7 +920,7 @@ public class E19Report extends TextReport { String tmp2 = " "; String tmp3 = " "; String tmp4 = " "; - + buffer.append("\f"); buffer.append(TextReportConstants.E19_HDR_LOWWATER + "\n\n"); int count1 = countNewlines(buffer.toString()); @@ -1034,7 +1037,7 @@ public class E19Report extends TextReport { for (int i = 0; i < leftMargin; i++) { indent = indent.concat(" "); } - + buffer.append("\f"); buffer.append(TextReportConstants.E19_HDR_CONDITIONS + "\n\n"); TextReportData data = TextReportDataManager.getInstance().getDataForReports(lid, 0); @@ -1178,7 +1181,7 @@ public class E19Report extends TextReport { for (int i = 0; i < leftMargin; i++) { indent = indent.concat(" "); } - + buffer.append("\f"); buffer.append(TextReportConstants.E19_HDR_DAMAGE + "\n\n"); TextReportData data = TextReportDataManager.getInstance().getCrestData(lid); @@ -1291,7 +1294,7 @@ public class E19Report extends TextReport { for (int i = 0; i < leftMargin; i++) { indent = indent.concat(" "); } - + buffer.append("\f"); buffer.append(TextReportConstants.E19_HDR_STAFFGAGE + "\n\n"); TextReportData data = TextReportDataManager.getInstance().getStaffGageData(lid); @@ -1518,7 +1521,7 @@ public class E19Report extends TextReport { String tmp1 = " "; String tmp2 = " "; String tmp3 = " "; - + buffer.append("\f"); buffer.append(TextReportConstants.E19_HDR_CONTACTS + "\n\n"); TextReportData data = TextReportDataManager.getInstance().getDataForReports(lid, 6); diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java index 06b41f6e97..e3db0225d9 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java @@ -307,7 +307,10 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox; * 28Nov2012 14842 M.Gamazaychikov Re-wrote processPopup method * 13Dec2012 1353 rferrel Change to make edit cancel message not * dispaly the red had kill job message. - * 10JAN2012 15704 M.Gamazaychikov Added setting userKeyPressed to false in verifyText method + * 31Dec2012 15651 M.Gamazaychikov Added an argument to re-factored PrintDisplay.print + * 10JAN2012 15704 M.Gamazaychikov Added setting userKeyPressed to false in verifyText method. + * 31JAN2013 14247 D. Friedman Make spell check dialog child of editor window. + * 31JAN2013 15580 D. Friedman Prevent errors when window is disposed. * * * @author lvenable @@ -4191,7 +4194,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, */ private void printAllText() { FontData fontData = textEditor.getFont().getFontData()[0]; - PrintDisplay.print(textEditor.getText(), fontData, statusHandler); + PrintDisplay.print(textEditor.getText(), fontData, charWrapCol, statusHandler); } /** @@ -4214,7 +4217,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, String tmpText = textEditor.getText(); Point point = textEditor.getSelection(); FontData fontData = textEditor.getFont().getFontData()[0]; - PrintDisplay.print(textEditor.getSelectionText(), fontData, + PrintDisplay.print(textEditor.getSelectionText(), fontData, charWrapCol, statusHandler); textEditor.setText(tmpText); textEditor.setSelection(point); @@ -5831,7 +5834,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, * Displays the spell checker dialog to initiate spell checking. */ private void checkSpelling() { - SpellCheckDlg spellCheckDlg = new SpellCheckDlg(getParent(), + SpellCheckDlg spellCheckDlg = new SpellCheckDlg(shell, textEditor, StatusConstants.CATEGORY_WORKSTATION, StatusConstants.SUBCATEGORY_CONNECTIVITY); spellCheckDlg.open(); @@ -6837,6 +6840,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, @Override protected void disposed() { + textEditor.setFont(shell.getFont()); + headerTF.setFont(shell.getFont()); + if (smlFont != null) { smlFont.dispose(); } diff --git a/cave/com.raytheon.viz.textworkstation/src/com/raytheon/viz/textworkstation/TextWorkstationDlg.java b/cave/com.raytheon.viz.textworkstation/src/com/raytheon/viz/textworkstation/TextWorkstationDlg.java index 66136ccdcc..f6c37b5452 100644 --- a/cave/com.raytheon.viz.textworkstation/src/com/raytheon/viz/textworkstation/TextWorkstationDlg.java +++ b/cave/com.raytheon.viz.textworkstation/src/com/raytheon/viz/textworkstation/TextWorkstationDlg.java @@ -90,6 +90,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * 26Sep2012 1196 lvenable Dialog refactor to not block. * 02Oct2012 1229 rferrel Option to allow blocking when top dialog. * 13Dec2012 1353 rferrel Fix bug introduced in the Show all dialogs. + * 30Jan2013 DR 14736 D. Friedman Display local time. * * * @@ -217,7 +218,9 @@ public class TextWorkstationDlg extends CaveSWTDialog implements private void initializeComponents() { sdfUTC.setTimeZone(TimeZone.getTimeZone("UTC")); - sdfLocal.setTimeZone(Calendar.getInstance().getTimeZone()); + String localTZName = System.getenv("FXA_LOCAL_TZ"); + sdfLocal.setTimeZone(localTZName != null ? + TimeZone.getTimeZone(localTZName) : TimeZone.getDefault()); createMenus(); new Label(shell, SWT.NONE).setText("host: " diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/ProductTableComp.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/ProductTableComp.java index 11ff433ab4..df2bd9f5f9 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/ProductTableComp.java +++ b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/ProductTableComp.java @@ -88,7 +88,7 @@ import com.raytheon.viz.core.slice.request.VerticalPointRequest.TimeDirection; import com.raytheon.viz.skewt.SkewtDisplay; import com.raytheon.viz.skewt.rscdata.SkewTResourceData; import com.raytheon.viz.ui.EditorUtil; -import com.raytheon.viz.ui.BundleProductLoader; +import com.raytheon.viz.ui.MenuLoader; import com.raytheon.viz.ui.UiUtil; import com.raytheon.viz.ui.editor.AbstractEditor; import com.raytheon.viz.ui.editor.IMultiPaneEditor; @@ -114,7 +114,8 @@ import com.vividsolutions.jts.geom.LineString; * Jun 8, 2009 #2161 lvenable Initial creation * Mar 27, 2012 #14506 Qinglu Lin For cross section plot along a line of * latitude, swap xStart and xEnd. - * + * Jan 25, 2013 #15529 kshresth Fixed cross section "Unhandled event loop exception" + * when loading contours and Image combo * * * @author lvenable @@ -900,6 +901,8 @@ public class ProductTableComp extends Composite { CrossSectionDescriptor csDesc = csDisplay.getDescriptor(); csDesc.setRenderableDisplay(csDisplay); + selectNewTableItem(); + IDataCatalogEntry catalogEntry = getSelectedData().get(0) .getCatalogEntry(); VBMenuBarItemsMgr.SpaceTimeMenu currentSpaceTime = dialogSettings @@ -1078,7 +1081,7 @@ public class ProductTableComp extends Composite { Bundle b = new Bundle(); b.setDisplays(new AbstractRenderableDisplay[] { display }); - Job j = new BundleProductLoader(editor, b); + Job j = new MenuLoader(b, editor); j.schedule(); } } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIManager.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIManager.java index 0b45ae91a4..f4d00bf1e2 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIManager.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIManager.java @@ -61,6 +61,8 @@ import com.vividsolutions.jts.geom.Polygon; * May 7, 2010 mschenke Initial creation * Jan 29, 2013 15723 Qinglu Lin Called warngenLayer.initRemovedGids() in move() and in run() of * AddVertexAction, DeleteVertextAction and MoveElementAction inner classes. + * Jan 30, 2013 15439 Qinglu Lin Code were added to prevent nullPointException from occurring + * when c2 is null for "case SINGLE_POINT" in move(). * * * @@ -374,17 +376,19 @@ public class WarngenUIManager extends InputAdapter { break; } case SINGLE_POINT: { - PolygonUtil.truncate(c2, 2); - if (warngenLayer.isModifiedVertexNeedsToBeUpdated()) { - int i = StormTrackUIManager.getCoordinateIndex(warngenLayer, - state.getWarningPolygon().getCoordinates(), c2); - if (i != -1) { - this.movePointIndex = i; + if (c2 != null) { + PolygonUtil.truncate(c2, 2); + if (warngenLayer.isModifiedVertexNeedsToBeUpdated()) { + int i = StormTrackUIManager.getCoordinateIndex(warngenLayer, + state.getWarningPolygon().getCoordinates(), c2); + if (i != -1) { + this.movePointIndex = i; + } + warngenLayer.setModifiedVertexNeedsToBeUpdated(false); } - warngenLayer.setModifiedVertexNeedsToBeUpdated(false); + movePointIndex = warngenLayer.translatePolygonVertex( + this.movePointIndex, c2, false); } - movePointIndex = warngenLayer.translatePolygonVertex( - this.movePointIndex, c2, false); break; } } diff --git a/cots/com.sun.xml.bind/com.sun.xml.bind.ecl b/cots/com.sun.xml.bind/com.sun.xml.bind.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cots/edu.uci.ics.crawler4j/edu.uci.ics.crawler4j.ecl b/cots/edu.uci.ics.crawler4j/edu.uci.ics.crawler4j.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cots/it.geosolutions/it.geosolutions.ecl b/cots/it.geosolutions/it.geosolutions.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cots/net.dods/net.dods.ecl b/cots/net.dods/net.dods.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cots/net.opengis/net.opengis.ecl b/cots/net.opengis/net.opengis.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cots/ogc.tools.gml/ogc.tools.gml.ecl b/cots/ogc.tools.gml/ogc.tools.gml.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cots/org.apache.commons.cxf/org.apache.commons.cxf.ecl b/cots/org.apache.commons.cxf/org.apache.commons.cxf.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cots/org.apache.ws.security/org.apache.ws.security.ecl b/cots/org.apache.ws.security/org.apache.ws.security.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cots/org.codehaus.jackson/org.codehaus.jackson.ecl b/cots/org.codehaus.jackson/org.codehaus.jackson.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/build.edex/esb/conf/spring/cron.properties b/edexOsgi/build.edex/esb/conf/spring/cron.properties index 8bed28809e..3cc6b840d8 100644 --- a/edexOsgi/build.edex/esb/conf/spring/cron.properties +++ b/edexOsgi/build.edex/esb/conf/spring/cron.properties @@ -22,6 +22,8 @@ purge.cron=0+0/1+*+*+*+? purge.outgoing.cron=0+30+*+*+*+? # Interval at which the logs are purged purge.logs.cron=0+30+0+*+*+? +# Interval at which the service backup logs are purged +purge.svcbu.logs.cron=0+30+0+*+*+? # Master switch to enable and disable purging purge.enabled=true diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialMarineWarning.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialMarineWarning.vm index 7642b1dcc5..e6854cefeb 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialMarineWarning.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialMarineWarning.vm @@ -11,6 +11,7 @@ ## VERSION AWIPS II 1.5 -- MAR 2 2012 OB12.2.1-4 ## ## BY QINGLU LIN 7-31-2012 DR 15217 use roundAndPad ## ## BY QINGLU LIN 8-14-2012 DR 14493 use TMLtime ## +## BY QINGLU LIN 2-04-2013 DR 15198 Added to ${area.name} for NEW. ## ################################################################ ## Added Volcano Information in version 1.3 for sites where ## Volcanoes affect their marine zones. If sites wish to hide @@ -69,7 +70,7 @@ SPECIAL MARINE WARNING FOR... #end #foreach (${area} in ${areas}) ## -${area.name}... +${area.name}... #end ## ## diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialMarineWarningFollowup.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialMarineWarningFollowup.vm index 0779831aa9..fbf60a1877 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialMarineWarningFollowup.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialMarineWarningFollowup.vm @@ -11,6 +11,7 @@ ## VERSION AWIPS II 1.5 -- MAR 2 2012 OB12.2.1-4 ## ## BY MGAMAZAYCHIKOV -- JUL 20 2012 DR15006 ## ## BY QINGLU LIN 7-31-2012 DR 15217 use roundAndPad ## +## BY QINGLU LIN 2-04-2013 DR 15198 Added to ${area.name} for CON/CAN/(CON/CAN)/COR/EXP ## ##################################################### ## Added Volcano Information in version 1.3 for sites where ## Volcanoes affect their marine zones. If sites wish to hide @@ -87,7 +88,7 @@ THIS IS A TEST MESSAGE.## THE AFFECTED AREAS WERE... #foreach (${area} in ${areas}) -${area.name}... +${area.name}... #end ###################################################################### @@ -361,7 +362,7 @@ THIS IS A TEST MESSAGE.## FOR THE FOLLOWING AREAS... #foreach (${area} in ${areas}) -${area.name}... +${area.name}... #end ## Storm current location description @@ -515,7 +516,7 @@ THIS IS A TEST MESSAGE.## THE AFFECTED AREAS WERE... #foreach (${area} in ${cancelareas}) -${area.name}... +${area.name}... #end ###################################################################### @@ -777,7 +778,7 @@ THIS IS A TEST MESSAGE.## FOR THE FOLLOWING AREAS... #foreach (${area} in ${areas}) -${area.name}... +${area.name}... #end #if(${productClass}=="T") @@ -1190,7 +1191,7 @@ THIS IS A TEST MESSAGE.## FOR THE FOLLOWING AREAS... #foreach (${area} in ${areas}) -${area.name}... +${area.name}... #end #if(${productClass}=="T") @@ -1330,7 +1331,7 @@ WILL EXPIRE AT ${dateUtil.format(${expire}, ${timeFormat.clock}, 15, ${localtime THE AFFECTED AREAS WERE... #foreach (${area} in ${areas}) -${area.name}... +${area.name}... #end ###################################################################### diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml index 1520e2c58d..8c43e770c5 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml @@ -350,6 +350,14 @@ + + + + + + @@ -489,6 +497,8 @@ uri="clusteredquartz://gfe/exportDigitalData/?cron=${gfe.cron}" /> + @@ -528,6 +538,22 @@ + + + + + + + + + + java.lang.Throwable + + + + + diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/CleanupSvcBuLogRequestHandler.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/CleanupSvcBuLogRequestHandler.java new file mode 100644 index 0000000000..83eb591cae --- /dev/null +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/CleanupSvcBuLogRequestHandler.java @@ -0,0 +1,78 @@ +/** + * 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. + **/ +package com.raytheon.edex.plugin.gfe.server.handler.svcbu; + +import java.util.Date; +import java.util.Random; +import java.util.Timer; + +import com.raytheon.edex.plugin.gfe.svcbackup.ServiceBackupNotificationManager; +import com.raytheon.edex.plugin.gfe.svcbackup.SvcbuCleanupLogsTask; +import com.raytheon.edex.plugin.gfe.svcbackup.SvcBackupUtil; +import com.raytheon.uf.common.dataplugin.gfe.request.CleanupSvcBuLogRequest; +import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse; +import com.raytheon.uf.common.serialization.comm.IRequestHandler; + +/** + * TODO Add Description + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jan 3, 2013             jdynina     Initial creation
+ * 
+ * 
+ * + * @author jdynina + * @version 1.0 + */ + +public class CleanupSvcBuLogRequestHandler implements + IRequestHandler { + + private static Timer svcbuLogCleanTimer = new Timer(true); + + @Override + public Object handleRequest(CleanupSvcBuLogRequest request) { + + ServerResponse sr = new ServerResponse(); + + try { + ServiceBackupNotificationManager + .sendMessageNotification("Running service backup log cleanup script"); + SvcBackupUtil.execute("cleanup_svcbu_logs"); + } catch (Exception e) { + sr.addMessage("Error executing service backup log cleanup script! " + + e.getLocalizedMessage()); + } + return sr; + } + + public void svcbuLogCleanupCron() throws Exception { + Random rand = new Random(System.currentTimeMillis()); + Date executionDate = new Date(System.currentTimeMillis() + + Math.abs(rand.nextInt() % 45) * 60 * 1000); + svcbuLogCleanTimer.schedule(new SvcbuCleanupLogsTask(executionDate), + executionDate); + } +} diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/svcbackup/SvcbuCleanupLogsTask.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/svcbackup/SvcbuCleanupLogsTask.java new file mode 100644 index 0000000000..3a5175e57c --- /dev/null +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/svcbackup/SvcbuCleanupLogsTask.java @@ -0,0 +1,72 @@ +/** + * 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. + **/ +package com.raytheon.edex.plugin.gfe.svcbackup; + +import java.util.Date; +import java.util.TimerTask; + +import com.raytheon.edex.plugin.gfe.server.handler.svcbu.CleanupSvcBuLogRequestHandler; +import com.raytheon.uf.common.dataplugin.gfe.request.CleanupSvcBuLogRequest; + +/** + * TODO Add Description + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jan 3, 2013             jdynina     Initial creation
+ * 
+ * 
+ * + * @author jdynina + * @version 1.0 + */ + +public class SvcbuCleanupLogsTask extends TimerTask { + + public SvcbuCleanupLogsTask(Date executionTime) { + ServiceBackupNotificationManager + .sendMessageNotification("Service backup log cleanup cron scheduled for execution at: " + + executionTime); + } + + /* + * (non-Javadoc) + * + * @see java.util.TimerTask#run() + */ + @Override + public void run() { + ServiceBackupNotificationManager + .sendMessageNotification("Cleanup service configuration logs cron started."); + try { + new CleanupSvcBuLogRequestHandler() + .handleRequest(new CleanupSvcBuLogRequest()); + } catch (Exception e) { + ServiceBackupNotificationManager + .sendErrorMessageNotification( + "Cleanup service backup logs cron failed to execute.", + e); + } + } +} diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py index 46ce767df6..3a2aafc21e 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py @@ -72,7 +72,7 @@ from com.raytheon.uf.edex.database.cluster import ClusterTask # Date Ticket# Engineer Description # ------------ ---------- ----------- -------------------------- # 07/06/09 1995 bphillip Initial Creation. -# +# 01/17/13 15588 jdynina Fixed Publish history removal # # @@ -82,9 +82,8 @@ BATCH_DELAY = 0.0 ISC_USER="isc" - class WECache(object): - def __init__(self, we, tr=None): + def __init__(self, we, tr=None): self._grids = [] self._hist = [] self._we = we @@ -156,12 +155,17 @@ class WECache(object): index = bisect.bisect_left(map(lambda x : x[0], self._inv), tr[0]) self._inv.insert(index, tr) history = ArrayList() + for h in hist: - #strip out grid history to allow for publishing correctly - #when merging Fcst/Official out of A1 - hh = GridDataHistory(h) - hh.setPublishTime(None) - history.add(hh) + dbName = self._we.getParmid().getDbId().toString() + if dbName.find('Fcst') != -1: + #strip out publish time to allow for publishing correctly + #when merging Fcst out of A1 + hh = GridDataHistory(h) + hh.setPublishTime(None) + history.add(hh) + else: + history.add(GridDataHistory(h)) if gridType == 'SCALAR': self._we.setItemScalar(timeRange, grid.astype(numpy.float32), history) elif gridType == 'VECTOR': @@ -321,7 +325,6 @@ class IscMosaic: "-n and -a altMask switches not compatible") raise Exception, "Bad command line" - self.__inFiles = JUtil.pyValToJavaObj(self.__inFiles) self.__processTimePeriod = (startTime, endTime) diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/HPCqpfNDFD.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/HPCqpfNDFD.xml index de3d7e5b3e..721a8610ed 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/HPCqpfNDFD.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/HPCqpfNDFD.xml @@ -33,7 +33,7 @@ - tp + tpHPCndfd 6 hr Total Precip mm millimeter diff --git a/edexOsgi/com.raytheon.uf.common.dataaccess/com.raytheon.uf.common.dataaccess.ecl b/edexOsgi/com.raytheon.uf.common.dataaccess/com.raytheon.uf.common.dataaccess.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.datadelivery.bandwidth/com.raytheon.uf.common.datadelivery.bandwidth.ecl b/edexOsgi/com.raytheon.uf.common.datadelivery.bandwidth/com.raytheon.uf.common.datadelivery.bandwidth.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.datadelivery.event/com.raytheon.uf.common.datadelivery.event.ecl b/edexOsgi/com.raytheon.uf.common.datadelivery.event/com.raytheon.uf.common.datadelivery.event.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.datadelivery.registry/com.raytheon.uf.common.datadelivery.registry.ecl b/edexOsgi/com.raytheon.uf.common.datadelivery.registry/com.raytheon.uf.common.datadelivery.registry.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.datadelivery.request/com.raytheon.uf.common.datadelivery.request.ecl b/edexOsgi/com.raytheon.uf.common.datadelivery.request/com.raytheon.uf.common.datadelivery.request.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.datadelivery.retrieval/com.raytheon.uf.common.datadelivery.retrieval.ecl b/edexOsgi/com.raytheon.uf.common.datadelivery.retrieval/com.raytheon.uf.common.datadelivery.retrieval.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/request/CleanupSvcBuLogRequest.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/request/CleanupSvcBuLogRequest.java new file mode 100644 index 0000000000..bed02559a4 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/request/CleanupSvcBuLogRequest.java @@ -0,0 +1,48 @@ +/** + * 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. + **/ +package com.raytheon.uf.common.dataplugin.gfe.request; + +import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; + +/** + * TODO Add Description + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jan 3, 2013             jdynina     Initial creation
+ * 
+ * 
+ * + * @author jdynina + * @version 1.0 + */ + +@DynamicSerialize +public class CleanupSvcBuLogRequest extends AbstractGfeRequest { + + public CleanupSvcBuLogRequest() { + + } + +} diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/com.raytheon.uf.common.dataplugin.grid.ecl b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/com.raytheon.uf.common.dataplugin.grid.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.event/com.raytheon.uf.common.event.ecl b/edexOsgi/com.raytheon.uf.common.event/com.raytheon.uf.common.event.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.gridcoverage/com.raytheon.uf.common.gridcoverage.ecl b/edexOsgi/com.raytheon.uf.common.gridcoverage/com.raytheon.uf.common.gridcoverage.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.image/com.raytheon.uf.common.image.ecl b/edexOsgi/com.raytheon.uf.common.image/com.raytheon.uf.common.image.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.json/com.raytheon.uf.common.json.ecl b/edexOsgi/com.raytheon.uf.common.json/com.raytheon.uf.common.json.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.parameter/com.raytheon.uf.common.parameter.ecl b/edexOsgi/com.raytheon.uf.common.parameter/com.raytheon.uf.common.parameter.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.registry.ebxml/com.raytheon.uf.common.registry.ebxml.ecl b/edexOsgi/com.raytheon.uf.common.registry.ebxml/com.raytheon.uf.common.registry.ebxml.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.registry.event/com.raytheon.uf.common.registry.event.ecl b/edexOsgi/com.raytheon.uf.common.registry.event/com.raytheon.uf.common.registry.event.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/com.raytheon.uf.common.registry.schemas.ebxml.ecl b/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/com.raytheon.uf.common.registry.schemas.ebxml.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.registry.schemas.iso19115/com.raytheon.uf.common.registry.schemas.iso19115.ecl b/edexOsgi/com.raytheon.uf.common.registry.schemas.iso19115/com.raytheon.uf.common.registry.schemas.iso19115.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.spatial/com.raytheon.uf.common.spatial.ecl b/edexOsgi/com.raytheon.uf.common.spatial/com.raytheon.uf.common.spatial.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.stats/com.raytheon.uf.common.stats.ecl b/edexOsgi/com.raytheon.uf.common.stats/com.raytheon.uf.common.stats.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.units/com.raytheon.uf.common.units.ecl b/edexOsgi/com.raytheon.uf.common.units/com.raytheon.uf.common.units.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.useradmin/com.raytheon.uf.common.useradmin.ecl b/edexOsgi/com.raytheon.uf.common.useradmin/com.raytheon.uf.common.useradmin.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/com.raytheon.uf.edex.datadelivery.bandwidth.ecl b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/com.raytheon.uf.edex.datadelivery.bandwidth.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.event/com.raytheon.uf.edex.datadelivery.event.ecl b/edexOsgi/com.raytheon.uf.edex.datadelivery.event/com.raytheon.uf.edex.datadelivery.event.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.feature/com.raytheon.uf.edex.datadelivery.feature.ecl b/edexOsgi/com.raytheon.uf.edex.datadelivery.feature/com.raytheon.uf.edex.datadelivery.feature.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.harvester/com.raytheon.uf.edex.datadelivery.harvester.ecl b/edexOsgi/com.raytheon.uf.edex.datadelivery.harvester/com.raytheon.uf.edex.datadelivery.harvester.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.registry/com.raytheon.uf.edex.datadelivery.registry.ecl b/edexOsgi/com.raytheon.uf.edex.datadelivery.registry/com.raytheon.uf.edex.datadelivery.registry.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval/com.raytheon.uf.edex.datadelivery.retrieval.ecl b/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval/com.raytheon.uf.edex.datadelivery.retrieval.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.service/com.raytheon.uf.edex.datadelivery.service.ecl b/edexOsgi/com.raytheon.uf.edex.datadelivery.service/com.raytheon.uf.edex.datadelivery.service.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.ebxml/com.raytheon.uf.edex.ebxml.ecl b/edexOsgi/com.raytheon.uf.edex.ebxml/com.raytheon.uf.edex.ebxml.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.event.feature/com.raytheon.uf.edex.event.feature.ecl b/edexOsgi/com.raytheon.uf.edex.event.feature/com.raytheon.uf.edex.event.feature.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.event/com.raytheon.uf.edex.event.ecl b/edexOsgi/com.raytheon.uf.edex.event/com.raytheon.uf.edex.event.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.grid.staticdata/com.raytheon.uf.edex.grid.staticdata.ecl b/edexOsgi/com.raytheon.uf.edex.grid.staticdata/com.raytheon.uf.edex.grid.staticdata.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.gridcoverage/com.raytheon.uf.edex.gridcoverage.ecl b/edexOsgi/com.raytheon.uf.edex.gridcoverage/com.raytheon.uf.edex.gridcoverage.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.menus/com.raytheon.uf.edex.menus.ecl b/edexOsgi/com.raytheon.uf.edex.menus/com.raytheon.uf.edex.menus.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/com.raytheon.uf.edex.ogc.common.ecl b/edexOsgi/com.raytheon.uf.edex.ogc.common/com.raytheon.uf.edex.ogc.common.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.parameter/com.raytheon.uf.edex.parameter.ecl b/edexOsgi/com.raytheon.uf.edex.parameter/com.raytheon.uf.edex.parameter.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/com.raytheon.uf.edex.plugin.grib.ogc.ecl b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/com.raytheon.uf.edex.plugin.grib.ogc.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grid/com.raytheon.uf.edex.plugin.grid.ecl b/edexOsgi/com.raytheon.uf.edex.plugin.grid/com.raytheon.uf.edex.plugin.grid.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/com.raytheon.uf.edex.plugin.obs.ogc.ecl b/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/com.raytheon.uf.edex.plugin.obs.ogc.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/com.raytheon.uf.edex.registry.ebxml.ecl b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/com.raytheon.uf.edex.registry.ebxml.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.registry.feature/com.raytheon.uf.edex.registry.feature.ecl b/edexOsgi/com.raytheon.uf.edex.registry.feature/com.raytheon.uf.edex.registry.feature.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.stats/com.raytheon.uf.edex.stats.ecl b/edexOsgi/com.raytheon.uf.edex.stats/com.raytheon.uf.edex.stats.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.useradmin/com.raytheon.uf.edex.useradmin.ecl b/edexOsgi/com.raytheon.uf.edex.useradmin/com.raytheon.uf.edex.useradmin.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/com.raytheon.uf.edex.wcs.ecl b/edexOsgi/com.raytheon.uf.edex.wcs/com.raytheon.uf.edex.wcs.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/com.raytheon.uf.edex.wfs.ecl b/edexOsgi/com.raytheon.uf.edex.wfs/com.raytheon.uf.edex.wfs.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.wms/com.raytheon.uf.edex.wms.ecl b/edexOsgi/com.raytheon.uf.edex.wms/com.raytheon.uf.edex.wms.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.tools.gfesuite.servicebackup/svcBackup/ServiceBackup/scripts/cleanup_svcbu_logs b/edexOsgi/com.raytheon.uf.tools.gfesuite.servicebackup/svcBackup/ServiceBackup/scripts/cleanup_svcbu_logs new file mode 100644 index 0000000000..4f7e5d7d43 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.tools.gfesuite.servicebackup/svcBackup/ServiceBackup/scripts/cleanup_svcbu_logs @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ ${#AWIPS_HOME} = 0 ] +then + path_to_script=`readlink -f $0` + export AWIPS_HOME=$(dirname $(dirname $(dirname $(dirname $path_to_script)))) +fi + +. ${AWIPS_HOME}/GFESuite/ServiceBackup/configuration/svcbu.env + +find ${IFPS_LOG}/* -mtime +7 -exec rm -fr {} \; 2>/dev/null + + diff --git a/nativeLib/nativeLib.ecl b/nativeLib/nativeLib.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpResourceHandler.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpResourceHandler.java index 223aa19e53..6846736319 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpResourceHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpResourceHandler.java @@ -97,6 +97,7 @@ public class NsharpResourceHandler { private int dtYOrig = NsharpConstants.DATA_TIMELINE_Y_ORIG; private int dtWidth = NsharpConstants.DATA_TIMELINE_WIDTH; private String paneConfigurationName; + private int numTimeLinePerPage=1; /* Hodograph Modes - definition is based on definitions in globals_xw.h of BigNsharp */ private static final int HODO_NORMAL = 0; //private static int HODO_EFFECTIVE= 1; not used in BigNsharp source code @@ -324,8 +325,6 @@ public class NsharpResourceHandler { break; } } - int numTimeLinePerPage = (cnYOrig-dtNextPageEnd)/charHeight; - curStnIdPage = totalStnIdPage/numTimeLinePerPage + 1; setCurSndProfileProp(); setCurrentSoundingLayerInfo(); resetData(); @@ -353,8 +352,6 @@ public class NsharpResourceHandler { break; } } - int numTimeLinePerPage = (cnYOrig-dtNextPageEnd)/charHeight; - curTimeLinePage = currentTimeLineStateListIndex/numTimeLinePerPage + 1; setCurSndProfileProp(); setCurrentSoundingLayerInfo(); resetData(); @@ -1579,21 +1576,7 @@ public class NsharpResourceHandler { } //set total time line group and stn id list page number - int numTimeLinePerPage = (cnYOrig-dtNextPageEnd)/charHeight; - //fix bug, when numTimeLinePerPage ==0 case - if(numTimeLinePerPage <= 0) { - numTimeLinePerPage = 1; - totalTimeLinePage = timeLineStateList.size(); - curTimeLinePage = currentTimeLineStateListIndex; - totalStnIdPage = stnStateList.size(); - curStnIdPage= currentStnStateListIndex; - } - else{ - totalTimeLinePage = timeLineStateList.size()/numTimeLinePerPage + 1; - curTimeLinePage = currentTimeLineStateListIndex/numTimeLinePerPage + 1; - totalStnIdPage = stnStateList.size()/numTimeLinePerPage + 1; - curStnIdPage= currentStnStateListIndex/numTimeLinePerPage + 1; - } + calculateTimeStnBoxData(); /* Chin: TBD: do we need these code? @@ -1607,7 +1590,9 @@ public class NsharpResourceHandler { }*/ //set data time to descriptor //this is necessary for looping - if (( skewtPaneRsc.getDescriptor().getFramesInfo().getFrameCount() == 0)&& !getTimeMatcher) { + // starting 13.2.1, this line is changed by Raytheon + if (( skewtPaneRsc.getDescriptor().getFramesInfo().getFrameCount() == 0)&& !getTimeMatcher) { + //was this line before 13.2.1 if (( skewtPaneRsc.getDescriptor().getTimeMatcher() == null || skewtPaneRsc.getDescriptor().getTimeMatcher().getTimeMatchBasis() == null)&& !getTimeMatcher) { //DataTime[] dataTimes = new DataTime[dataTimelineList.size()]; //Chin Note: we just have to do this once and set dataTimes size bigger than 1. //Nsharp handles changing frame itself. It just need system to send change frame notice. @@ -1650,7 +1635,6 @@ public class NsharpResourceHandler { public void handleUserClickOnStationId(Coordinate c) { - int numStnIdPerPage = (cnYOrig-dtNextPageEnd)/charHeight; //first to find if it is for change to next page, or change sorting //System.out.println("numTimeLinePerPage="+numTimeLinePerPage+"gap="+(cnYOrig-dtNextPageEnd)); int index =((int)(c.y - dtYOrig))/ charHeight; @@ -1672,7 +1656,7 @@ public class NsharpResourceHandler { } // recalculate index for time line index =((int)(c.y - dtNextPageEnd))/ charHeight + - (curStnIdPage-1)* numStnIdPerPage ; + (curStnIdPage-1)* numTimeLinePerPage ; if( index < this.stnStateList.size() ){ switch(stnStateList.get(index).getStnState()){ @@ -1696,7 +1680,6 @@ public class NsharpResourceHandler { } public void handleUserClickOnTimeLine(Coordinate c) { - int numTimeLinePerPage = (cnYOrig-dtNextPageEnd)/charHeight; //first to find if it is for change to next/prev page //System.out.println("numTimeLinePerPage="+numTimeLinePerPage+"gap="+(cnYOrig-dtNextPageEnd)); int index =((int)(c.y - dtYOrig))/ charHeight; @@ -1833,7 +1816,6 @@ public class NsharpResourceHandler { break; } - int numTimeLinePerPage = (cnYOrig-dtNextPageEnd)/charHeight; curTimeLinePage = currentTimeLineStateListIndex/numTimeLinePerPage + 1; setCurSndProfileProp(); setCurrentSoundingLayerInfo(); @@ -1935,8 +1917,7 @@ public class NsharpResourceHandler { } previousTimeLineStateListIndex = currentTimeLineStateListIndex; currentTimeLineStateListIndex = targetIndex; - int numTimeLinePerPage = (cnYOrig-dtNextPageEnd)/charHeight; - curTimeLinePage = currentTimeLineStateListIndex/numTimeLinePerPage + 1; + curTimeLinePage = currentTimeLineStateListIndex/numTimeLinePerPage + 1; setCurSndProfileProp(); setCurrentSoundingLayerInfo(); resetData(); @@ -2000,7 +1981,6 @@ public class NsharpResourceHandler { break; } } - int numTimeLinePerPage = (cnYOrig-dtNextPageEnd)/charHeight; curStnIdPage = currentStnStateListIndex/numTimeLinePerPage + 1; setCurSndProfileProp(); setCurrentSoundingLayerInfo(); @@ -2744,7 +2724,8 @@ public class NsharpResourceHandler { if(insetPaneRsc!=null) insetPaneRsc.createInsetWireFrameShapes(); if(skewtPaneRsc!=null) - skewtPaneRsc.handleResize(); + //CHIN:::fix edit zoom issue skewtPaneRsc.handleResize(); + skewtPaneRsc.createRscWireFrameShapes(); } } catch(Exception e) { @@ -2813,7 +2794,8 @@ public class NsharpResourceHandler { nsharpNative.populateSndgData(soundingLys); //get storm motion wind data after populate sounding from NsharpLib skewtPaneRsc.setSoundingLys(soundingLys); - skewtPaneRsc.handleResize(); + //CHIN:::fix edit zoom issue skewtPaneRsc.handleResize(); + skewtPaneRsc.createRscWireFrameShapes(); if(hodoPaneRsc!=null){ hodoPaneRsc.setSoundingLys(soundingLys); hodoPaneRsc.createRscHodoWindShapeAll(); @@ -2851,11 +2833,9 @@ public class NsharpResourceHandler { nsharpNative.populateSndgData(soundingLys); //get storm motion wind data after populate sounding from NsharpLib skewtPaneRsc.setSoundingLys(soundingLys); - skewtPaneRsc.handleResize(); - //skewtPaneRsc.createRscPressTempCurveShapeAll(); - //skewtPaneRsc.createRscwetBulbTraceShape(); - //skewtPaneRsc.createRscVTempTraceShape(); - //skewtPaneRsc.createParcelShapes(parcelList); + //CHIN:::fix edit zoom issue skewtPaneRsc.handleResize(); + skewtPaneRsc.createRscWireFrameShapes(); + if(hodoPaneRsc!=null){ hodoPaneRsc.setSoundingLys(soundingLys); hodoPaneRsc.createRscHodoWindShapeAll(); @@ -2911,7 +2891,8 @@ public class NsharpResourceHandler { } if(skewtPaneRsc!=null){ skewtPaneRsc.setSoundingLys(soundingLys); - skewtPaneRsc.handleResize(); + //CHIN:::fix edit zoom issue skewtPaneRsc.handleResize(); + skewtPaneRsc.createRscWireFrameShapes(); } if(hodoPaneRsc!=null){ hodoPaneRsc.setSoundingLys(soundingLys); @@ -2951,7 +2932,8 @@ public class NsharpResourceHandler { } if(skewtPaneRsc!=null){ skewtPaneRsc.setSoundingLys(soundingLys); - skewtPaneRsc.handleResize(); + //CHIN:::fix edit zoom issue skewtPaneRsc.handleResize(); + skewtPaneRsc.createRscWireFrameShapes(); } if(hodoPaneRsc!=null){ hodoPaneRsc.setSoundingLys(soundingLys); @@ -3205,18 +3187,7 @@ public class NsharpResourceHandler { this.dtWidth = dtWidth; this.cnYOrig = cnYOrig; this.dtNextPageEnd = dtNextPage_end; - int numTimeLinePerPage = (cnYOrig-dtNextPageEnd)/charHeight; - if(numTimeLinePerPage<=0) - numTimeLinePerPage=1; - //System.out.println("numTimeLinePerPage="+numTimeLinePerPage); - totalTimeLinePage = timeLineStateList.size()/numTimeLinePerPage ; - if(timeLineStateList.size()%numTimeLinePerPage != 0) - totalTimeLinePage= totalTimeLinePage+1; - curTimeLinePage = currentTimeLineStateListIndex/numTimeLinePerPage+1; - totalStnIdPage = stnStateList.size()/numTimeLinePerPage; - if(stnStateList.size()%numTimeLinePerPage != 0) - totalStnIdPage++; - curStnIdPage= currentStnStateListIndex/numTimeLinePerPage + 1; //NEW CODE + calculateTimeStnBoxData(); } /*public void setCharHeight(int charHeight) { @@ -3233,5 +3204,20 @@ public class NsharpResourceHandler { return paneConfigurationName; } + private void calculateTimeStnBoxData(){ + //set total time line group and stn id list page number + numTimeLinePerPage = (cnYOrig-dtNextPageEnd)/charHeight; + if(numTimeLinePerPage<=0) + numTimeLinePerPage=1; + //System.out.println("numTimeLinePerPage="+numTimeLinePerPage); + totalTimeLinePage = timeLineStateList.size()/numTimeLinePerPage ; + if(timeLineStateList.size()%numTimeLinePerPage != 0) + totalTimeLinePage= totalTimeLinePage+1; + curTimeLinePage = currentTimeLineStateListIndex/numTimeLinePerPage+1; + totalStnIdPage = stnStateList.size()/numTimeLinePerPage; + if(stnStateList.size()%numTimeLinePerPage != 0) + totalStnIdPage++; + curStnIdPage= currentStnStateListIndex/numTimeLinePerPage + 1; + } } diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpTimeStnPaneResource.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpTimeStnPaneResource.java index 9fd5ca4795..9ffb087f50 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpTimeStnPaneResource.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpTimeStnPaneResource.java @@ -83,12 +83,15 @@ public class NsharpTimeStnPaneResource extends NsharpAbstractPaneResource{ } private void drawNsharpColorNotation(IGraphicsTarget target, Rectangle rect) throws VizException { + PixelExtent extent = new PixelExtent(rect); RGB color; target.setupClippingPlane(extent); target.drawRect(extent,NsharpConstants.backgroundColor, 1.0f, 1.0f); //plot notations: - + if(dtHeight >= paneHeight) + return; + //draw time line page title etc. only when pane box height is larger than timeline box height double x = cnXOrig+5*xRatio; double y = cnYOrig+1.5*charHeight; //double xGap = paneWidth/3*xRatio; @@ -135,50 +138,60 @@ public class NsharpTimeStnPaneResource extends NsharpAbstractPaneResource{ PixelExtent extent = new PixelExtent(rect); target.setupClippingPlane(extent); target.drawRect(extent,NsharpConstants.backgroundColor, 1.0f, 1.0f); - double x = dtXOrig; - double y = dtYOrig-1.5*charHeight*yRatio; - String s = timeLineStateList.size() + " time lines, page " + curTimeLinePage+"/"+totalTimeLinePage; - target.drawString(font10, s, x, - y, 0.0, - IGraphicsTarget.TextStyle.NORMAL, - NsharpConstants.color_green, - HorizontalAlignment.LEFT, - VerticalAlignment.TOP, null); - y = dtYOrig; - target.drawLine(dtXOrig, y, 0.0,dtXEnd , y, 0.0,NsharpConstants.color_white,1, LineStyle.SOLID); - //System.out.println("drawNsharpDataTimelines picked stn info: "+ pickedStnInfoStr); + double x; + double y; + String s; + if(dtHeight < paneHeight){ + //draw time line page title etc. only when pane box height is larger than timeline box height + x = dtXOrig; + y = dtYOrig-1.5*charHeight*yRatio; + s = timeLineStateList.size() + " time lines, page " + curTimeLinePage+"/"+totalTimeLinePage; + target.drawString(font10, s, x, + y, 0.0, + IGraphicsTarget.TextStyle.NORMAL, + NsharpConstants.color_green, + HorizontalAlignment.LEFT, + VerticalAlignment.TOP, null); + y = dtYOrig; + target.drawLine(dtXOrig, y, 0.0,dtXEnd , y, 0.0,NsharpConstants.color_white,1, LineStyle.SOLID); + //System.out.println("drawNsharpDataTimelines picked stn info: "+ pickedStnInfoStr); - x = dtXOrig +dtWidth/2; - // line divide nextPage and prevPage strings - target.drawLine(x, y, 0.0, - x , y+1.2*charHeight*yRatio, 0.0, - NsharpConstants.color_white,1, LineStyle.SOLID); + x = dtXOrig +dtWidth/2; + // line divide nextPage and prevPage strings + target.drawLine(x, y, 0.0, + x , y+1.2*charHeight*yRatio, 0.0, + NsharpConstants.color_white,1, LineStyle.SOLID); - x = dtXOrig + 5; - y = y+1.2*charHeight*yRatio; - s = "nextPage"; - target.drawString(font10, s, x, - y, 0.0, - IGraphicsTarget.TextStyle.NORMAL, - NsharpConstants.color_yellow, - HorizontalAlignment.LEFT, - VerticalAlignment.BOTTOM, null); - x= dtXOrig + dtWidth/2 + 5; - s = "prevPage"; - target.drawString(font10, s, x, - y, 0.0, - IGraphicsTarget.TextStyle.NORMAL, - NsharpConstants.color_yellow, - HorizontalAlignment.LEFT, - VerticalAlignment.BOTTOM, null); - - //line below nextPage string - target.drawLine(dtXOrig, y, 0.0, - dtXEnd , y, 0.0, - NsharpConstants.color_white,1, LineStyle.SOLID); + x = dtXOrig + 5; + y = y+1.2*charHeight*yRatio; + s = "nextPage"; + target.drawString(font10, s, x, + y, 0.0, + IGraphicsTarget.TextStyle.NORMAL, + NsharpConstants.color_yellow, + HorizontalAlignment.LEFT, + VerticalAlignment.BOTTOM, null); + x= dtXOrig + dtWidth/2 + 5; + s = "prevPage"; + target.drawString(font10, s, x, + y, 0.0, + IGraphicsTarget.TextStyle.NORMAL, + NsharpConstants.color_yellow, + HorizontalAlignment.LEFT, + VerticalAlignment.BOTTOM, null); + //line below nextPage string + target.drawLine(dtXOrig, y, 0.0, + dtXEnd , y, 0.0, + NsharpConstants.color_white,1, LineStyle.SOLID); + } int numTimeLineToShowPerPage = (cnYOrig-dtNextPageEnd)/charHeight; + if(numTimeLineToShowPerPage <1){ + numTimeLineToShowPerPage = dtHeight/charHeight; + if(numTimeLineToShowPerPage <1) + numTimeLineToShowPerPage=1; + } int startIndex = (curTimeLinePage-1) * numTimeLineToShowPerPage; if(timeLineStateList!= null){ @@ -257,50 +270,60 @@ public class NsharpTimeStnPaneResource extends NsharpAbstractPaneResource{ PixelExtent extent = new PixelExtent(rect); target.setupClippingPlane(extent); target.drawRect(extent,NsharpConstants.backgroundColor, 1.0f, 1.0f); - double x = stnXOrig; - double y = stnYOrig -1.5*charHeight*yRatio; - String s = stnStateList.size() + " stations, page " + curStnIdPage+"/"+totalStnIdPage; - target.drawString(font10, s, x, - y, 0.0, - IGraphicsTarget.TextStyle.NORMAL, - NsharpConstants.color_green, - HorizontalAlignment.LEFT, - VerticalAlignment.TOP, null); - y = dtYOrig; - target.drawLine(stnXOrig, y, 0.0,stnXEnd , y, 0.0,NsharpConstants.color_white,1, LineStyle.SOLID); - //System.out.println("drawNsharpDataTimelines picked stn info: "+ pickedStnInfoStr); - x = stnXOrig +dtWidth/2; - // line divide nextPage and prevPage strings - target.drawLine(x, y, 0.0, - x , y+1.2*charHeight*yRatio, 0.0, - NsharpConstants.color_white,1, LineStyle.SOLID); + double x; + double y; + String s; + if(dtHeight < paneHeight){ + //draw time line page title etc. only when pane box height is larger than timeline box height + x = stnXOrig; + y = stnYOrig -1.5*charHeight*yRatio; + s = stnStateList.size() + " stations, page " + curStnIdPage+"/"+totalStnIdPage; + target.drawString(font10, s, x, + y, 0.0, + IGraphicsTarget.TextStyle.NORMAL, + NsharpConstants.color_green, + HorizontalAlignment.LEFT, + VerticalAlignment.TOP, null); + y = dtYOrig; + target.drawLine(stnXOrig, y, 0.0,stnXEnd , y, 0.0,NsharpConstants.color_white,1, LineStyle.SOLID); + //System.out.println("drawNsharpDataTimelines picked stn info: "+ pickedStnInfoStr); + x = stnXOrig +dtWidth/2; + // line divide nextPage and prevPage strings + target.drawLine(x, y, 0.0, + x , y+1.2*charHeight*yRatio, 0.0, + NsharpConstants.color_white,1, LineStyle.SOLID); + + x = stnXOrig + 5; + y = y+1.2*charHeight*yRatio; + s = "nextPage"; + target.drawString(font10, s, x, + y, 0.0, + IGraphicsTarget.TextStyle.NORMAL, + NsharpConstants.color_yellow, + HorizontalAlignment.LEFT, + VerticalAlignment.BOTTOM, null); + + x= stnXOrig + dtWidth/2 + 5; + s = "prevPage"; + target.drawString(font10, s, x, + y, 0.0, + IGraphicsTarget.TextStyle.NORMAL, + NsharpConstants.color_yellow, + HorizontalAlignment.LEFT, + VerticalAlignment.BOTTOM, null); + + //line below neextPage string + target.drawLine(stnXOrig, y, 0.0, + stnXEnd , y, 0.0, + NsharpConstants.color_white,1, LineStyle.SOLID); + } - x = stnXOrig + 5; - y = y+1.2*charHeight*yRatio; - s = "nextPage"; - target.drawString(font10, s, x, - y, 0.0, - IGraphicsTarget.TextStyle.NORMAL, - NsharpConstants.color_yellow, - HorizontalAlignment.LEFT, - VerticalAlignment.BOTTOM, null); - - x= stnXOrig + dtWidth/2 + 5; - s = "prevPage"; - target.drawString(font10, s, x, - y, 0.0, - IGraphicsTarget.TextStyle.NORMAL, - NsharpConstants.color_yellow, - HorizontalAlignment.LEFT, - VerticalAlignment.BOTTOM, null); - - //line below neextPage string - target.drawLine(stnXOrig, y, 0.0, - stnXEnd , y, 0.0, - NsharpConstants.color_white,1, LineStyle.SOLID); - - int numStnToShow = (cnYOrig-dtNextPageEnd)/charHeight; + if(numStnToShow <1){ + numStnToShow = dtHeight/charHeight; + if(numStnToShow <1) + numStnToShow=1; + } int startIndex = (rscHandler.getCurStnIdPage()-1) * numStnToShow; int compIndex= 1; int colorIndex; @@ -453,16 +476,26 @@ public class NsharpTimeStnPaneResource extends NsharpAbstractPaneResource{ float prevWidth = paneWidth; paneHeight = (int) ext.getHeight(); paneWidth = (int) (ext.getWidth()); - xRatio = xRatio* paneWidth/prevWidth; - yRatio = yRatio* paneHeight/prevHeight; - //charHeight = (int)(NsharpConstants.CHAR_HEIGHT_*yRatio); + //xRatio = xRatio* paneWidth/prevWidth; + //DEBUGGING yRatio = yRatio* paneHeight/prevHeight; + xRatio = 1; + yRatio = 1; + //if pane height is less than 10 char height, then just plot time line. not plot "messages/title/notations" etc.. + if(paneHeight > (int)(10* charHeight*yRatio)){ + dtYOrig = (int) ext.getMinY()+(int)(2* charHeight*yRatio); + cnHeight = (int)(3* charHeight*yRatio); + dtHeight = paneHeight-(int)(5* charHeight*yRatio); + dtNextPageEnd = dtYOrig+ (int) (2*charHeight*yRatio); + } + else { + dtYOrig = (int) (ext.getMinY()); + cnHeight = 0; + dtHeight = paneHeight; + dtNextPageEnd = dtYOrig; + } dtXOrig = (int) (ext.getMinX()); - dtYOrig = (int) ext.getMinY()+(int)(2* charHeight*yRatio); dtWidth = paneWidth/2; dtXEnd = dtXOrig + dtWidth; - cnHeight = (int)(3* charHeight*yRatio); - dtHeight = paneHeight-dtYOrig-cnHeight; - dtNextPageEnd = dtYOrig+ (int) (2*charHeight*yRatio); stnXOrig = dtXEnd; stnYOrig = dtYOrig; stnWidth = dtWidth; diff --git a/pythonPackages/qpid/bin/monitor_qpid_host.sh b/pythonPackages/qpid/bin/monitor_qpid_host.sh index 6c8d3c2c59..c0a79d3a78 100644 --- a/pythonPackages/qpid/bin/monitor_qpid_host.sh +++ b/pythonPackages/qpid/bin/monitor_qpid_host.sh @@ -108,6 +108,22 @@ function captureQpidStat() { numQpidConnections=$( qpid-stat -c | wc -l ) (( numQpidConnections-=3 )) echo -e "Total Number of QPID Connections: ${numQpidConnections}" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out + if [[ ${numQpidConnections} -ge 450 && ${numQpidConnections} -le 485 ]] ; then + echo -e "\tNOTE: Sending Major ITO to NCF because number of connections is between 450 and 485" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out + if [[ -f /opt/OV/bin/OpC/opcmsg ]] ; then + opt/OV/bin/OpC/opcmsg application=QPIDD object=QPIDD msg_text="Number Of Connections To QPID is between 450-485: Please check system health" severity=Major msg_grp=AWIPS + else + echo -e "\tERROR - can not find /opt/OV/bin/OpC/opcmsg on $( hostname )" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out + fi + elif [[ ${numQpidConnections} -gt 485 ]] ; then + echo -e "\tNOTE: Sending CRITIAL ITO to NCF because number of connections is > 485" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out + if [[ -f /opt/OV/bin/OpC/opcmsg ]] ; then + /opt/OV/bin/OpC/opcmsg application=QPIDD object=QPIDD msg_text="Number Of Connections To QPID is > 485 -- Take IMMEDIATE action to prevent system failure" severity=Critical msg_grp=AWIPS + else + echo -e "\tERROR - can not find /opt/OV/bin/OpC/opcmsg on $( hostname )" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out + fi + fi + echo >> ${logDirectory}/${nowTimeDate}-qpid-stat.out for cmdArg in "-b" "-c" "-s" "-e" "-q -Smsg" diff --git a/rpms/build/i386/build.sh b/rpms/build/i386/build.sh index 50eeaba41d..7d336b1264 100644 --- a/rpms/build/i386/build.sh +++ b/rpms/build/i386/build.sh @@ -150,6 +150,7 @@ if [ "${1}" = "-delta" ]; then buildRPM "awips2-gfesuite-server" buildRPM "awips2-python-dynamicserialize" buildRPM "awips2-python-ufpy" + buildRPM "awips2-python-qpid" buildRPM "awips2-adapt-native" buildRPM "awips2-aviation-shared" diff --git a/tests/tests.ecl b/tests/tests.ecl new file mode 100644 index 0000000000..e69de29bb2