comboDict = loadCombinationsFile(comboName);
this.zoneSelector.updateCombos(comboDict);
+ applyButtonState(false);
}
}
@@ -1085,4 +1014,20 @@ public class ZoneCombinerComp extends Composite implements
});
}
}
+
+ private boolean buttonState() {
+ final boolean[] state = { false };
+ if (this.applyZoneComboBtn != null
+ && !this.applyZoneComboBtn.isDisposed()) {
+ VizApp.runSync(new Runnable() {
+ @Override
+ public void run() {
+ state[0] = ZoneCombinerComp.this.applyZoneComboBtn
+ .isEnabled();
+ }
+ });
+ }
+
+ return state[0];
+ }
}
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileGenerator.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileGenerator.java
deleted file mode 100644
index d359ff50a8..0000000000
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileGenerator.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * 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.
- **/
-
-/**
- * Creating the combinations file for the TextFormatter
- *
- *
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- *6/12/2008 mnash Initial creation
- *
- *
- *
- * @author mnash
- * @version 1
- */
-package com.raytheon.viz.gfe.textformatter;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-
-import com.raytheon.uf.common.dataplugin.gfe.request.SaveCombinationsFileRequest;
-import com.raytheon.uf.common.localization.IPathManager;
-import com.raytheon.uf.common.localization.LocalizationContext;
-import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
-import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
-import com.raytheon.uf.common.localization.PathManagerFactory;
-import com.raytheon.uf.common.util.FileUtil;
-import com.raytheon.viz.gfe.core.DataManager;
-import com.raytheon.viz.gfe.core.internal.IFPClient;
-
-public class CombinationsFileGenerator {
-
- /**
- * Generates combinations files based on just running the formatter
- *
- * @param zoneGroupList
- * @param filename
- * @throws IOException
- */
- public static void generateAutoCombinationsFile(
- List> zoneGroupList, String filename) throws Exception {
- generateCombinationsFile(zoneGroupList, filename, "");
- }
-
- /**
- * Generates combinations files based on user wanting to save
- *
- * @param zoneGroupList
- * @param filename
- * @throws IOException
- */
- public static void generateSavedCombinationsFile(
- List> zoneGroupList, String filename) throws Exception {
-
- if (filename.endsWith(".py")) {
- generateCombinationsFile(zoneGroupList, filename, "saved"
- + File.separator);
- } else {
- generateCombinationsFile(zoneGroupList, filename + ".py", "saved"
- + File.separator);
- }
- }
-
- /**
- * Called by both auto and saved functions to actually write file
- *
- * @param zoneGroupList
- * @param filename
- * @param loc
- * @throws Exception
- */
- public static void generateCombinationsFile(
- List> zoneGroupList, String filename, String loc)
- throws Exception {
- IFPClient ifpc = DataManager.getCurrentInstance().getClient();
- SaveCombinationsFileRequest req = new SaveCombinationsFileRequest();
- req.setFileName(FileUtil.join(loc, filename));
- req.setCombos(zoneGroupList);
- ifpc.makeRequest(req);
-
- IPathManager pm = PathManagerFactory.getPathManager();
- LocalizationContext ctx = pm.getContext(LocalizationType.CAVE_STATIC,
- LocalizationLevel.SITE);
- pm.getFile(ctx, FileUtil.join("gfe", "combinations", filename));
- }
-}
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileUtil.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileUtil.java
index cb47b506c8..aaea4f05be 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileUtil.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileUtil.java
@@ -20,6 +20,7 @@
package com.raytheon.viz.gfe.textformatter;
import java.io.File;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -33,7 +34,9 @@ import javax.xml.bind.annotation.XmlRootElement;
import jep.JepException;
+import com.raytheon.uf.common.dataplugin.gfe.exception.GfeException;
import com.raytheon.uf.common.dataplugin.gfe.python.GfePyIncludeUtil;
+import com.raytheon.uf.common.dataplugin.gfe.request.SaveCombinationsFileRequest;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
@@ -49,8 +52,9 @@ import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
-import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.util.FileUtil;
+import com.raytheon.viz.gfe.core.DataManagerUIFactory;
+import com.raytheon.viz.gfe.core.internal.IFPClient;
import com.raytheon.viz.gfe.textformatter.CombinationsFileUtil.ComboData.Entry;
/**
@@ -60,7 +64,10 @@ import com.raytheon.viz.gfe.textformatter.CombinationsFileUtil.ComboData.Entry;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * Jul 25, 2008 mnash Initial creation
+ * Jul 25, 2008 mnash Initial creation
+ * Sep 05, 2013 #2329 randerso Moved genereateAutoCombinationsFile here
+ * Cleaned up error handling
+ *
*
*
* @author mnash
@@ -200,7 +207,7 @@ public class CombinationsFileUtil {
}
@SuppressWarnings("unchecked")
- public static List> init(String comboName) {
+ public static List> init(String comboName) throws GfeException {
IPathManager pm = PathManagerFactory.getPathManager();
@@ -211,7 +218,6 @@ public class CombinationsFileUtil {
File comboFile = new File(comboName);
comboName = comboFile.getName();
- String comboPath = GfePyIncludeUtil.getCombinationsIncludePath();
String scriptPath = FileUtil.join(
GfePyIncludeUtil.getUtilitiesLF(baseContext).getFile()
.getPath(), "CombinationsInterface.py");
@@ -221,13 +227,15 @@ public class CombinationsFileUtil {
map.put("comboName", comboName);
PythonScript python = null;
try {
- python = new PythonScript(scriptPath,
- PyUtil.buildJepIncludePath(comboPath));
+ python = new PythonScript(scriptPath, PyUtil.buildJepIncludePath(
+ GfePyIncludeUtil.getCombinationsIncludePath(),
+ GfePyIncludeUtil.getCommonPythonIncludePath()),
+ CombinationsFileUtil.class.getClassLoader());
Object com = python.execute("getCombinations", map);
combos = (List>) com;
} catch (JepException e) {
- statusHandler.handle(Priority.CRITICAL,
- "Could not get combinations", e);
+ throw new GfeException("Error loading combinations file: "
+ + comboName, e);
} finally {
if (python != null) {
python.dispose();
@@ -235,4 +243,30 @@ public class CombinationsFileUtil {
}
return combos;
}
+
+ /**
+ * Generates combinations files based on just running the formatter
+ *
+ * @param zoneGroupList
+ * @param filename
+ * @throws Exception
+ * @throws IOException
+ */
+ public static void generateAutoCombinationsFile(
+ List> zoneGroupList, String filename) throws Exception {
+ IFPClient ifpc = DataManagerUIFactory.getCurrentInstance().getClient();
+ SaveCombinationsFileRequest req = new SaveCombinationsFileRequest();
+ req.setFileName(filename);
+ req.setCombos(zoneGroupList);
+ try {
+ statusHandler.info("Saving combinations file: " + filename);
+ ifpc.makeRequest(req);
+ statusHandler.info("Successfully saved combinations file: "
+ + filename);
+ } catch (Exception e) {
+ statusHandler.error("Error saving combinations file: " + filename,
+ e);
+ throw e;
+ }
+ }
}
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/FormatterUtil.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/FormatterUtil.java
index 1e9df6ba3c..1d0915d84f 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/FormatterUtil.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/FormatterUtil.java
@@ -20,7 +20,6 @@
package com.raytheon.viz.gfe.textformatter;
import java.text.SimpleDateFormat;
-import java.util.List;
import java.util.TimeZone;
import com.raytheon.uf.common.status.IUFStatusHandler;
@@ -40,8 +39,9 @@ import com.raytheon.viz.gfe.tasks.TaskManager;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * Sep 8, 2008 njensen Initial creation
- * Jan 15, 2010 3395 ryu Fix "issued by" functionality
+ * Sep 8, 2008 njensen Initial creation
+ * Jan 15, 2010 3395 ryu Fix "issued by" functionality
+ * Sep 05, 2013 2329 randerso Removed save of combinations file
*
*
*
@@ -63,21 +63,20 @@ public class FormatterUtil {
* the formatter instance to use
* @param productName
* the name of the text product
- * @param zoneList
- * the list of zones to produce the product for
+ * @param dbId
+ * source database
+ * @param vtecMode
+ * VTEC mode
* @param finish
* listener to fire when formatter finishes generating product
*/
public static void runFormatterScript(TextProductManager productMgr,
- String productName, List> zoneList, String dbId,
- String vtecMode, TextProductFinishListener finish) {
+ String productName, String dbId, String vtecMode,
+ TextProductFinishListener finish) {
try {
String filename = productMgr.getCombinationsFileName(productName);
boolean mapRequired = productMgr.mapRequired(productName);
if (filename != null && mapRequired) {
- String filenameExt = filename + ".py";
- CombinationsFileGenerator.generateAutoCombinationsFile(
- zoneList, filenameExt);
productMgr.reloadModule(filename);
}
} catch (Exception e) {
diff --git a/cave/com.raytheon.viz.hydro/localization/bundles/hydro/FFGLmosaic.xml b/cave/com.raytheon.viz.hydro/localization/bundles/hydro/FFGLmosaic.xml
index d57a5a8bd5..bf3fa18b8a 100644
--- a/cave/com.raytheon.viz.hydro/localization/bundles/hydro/FFGLmosaic.xml
+++ b/cave/com.raytheon.viz.hydro/localization/bundles/hydro/FFGLmosaic.xml
@@ -47,7 +47,7 @@
-
@@ -321,7 +321,7 @@
-
+
diff --git a/cave/com.raytheon.viz.hydro/localization/menus/hydro/baseRFCffg.xml b/cave/com.raytheon.viz.hydro/localization/menus/hydro/baseRFCffg.xml
index 32645f7fbf..af67408d8a 100644
--- a/cave/com.raytheon.viz.hydro/localization/menus/hydro/baseRFCffg.xml
+++ b/cave/com.raytheon.viz.hydro/localization/menus/hydro/baseRFCffg.xml
@@ -246,19 +246,19 @@
menuText="1hr FFG" id="OH1hrFFG">
/grib/%/FFG-TIR/FFG0124hr/%
-
+
- /grib/%/FFG-TIR-HiRes/FFG0324hr/%
+ /grib/%/FFG-TIR/FFG0324hr/%
-
+
- /grib/%/FFG-TIR-HiRes/FFG0624hr/%
+ /grib/%/FFG-TIR/FFG0624hr/%
-
+