diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StyledTextComp.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StyledTextComp.java index 5786a0c9c0..ce5df4ae3d 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StyledTextComp.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StyledTextComp.java @@ -91,7 +91,6 @@ import com.raytheon.viz.gfe.textformatter.TextFmtParserUtil; * editing of framing codes. * 07/02/2015 13753 lshi Update times for products in Product Editor * 08/06/2015 13753 lshi use isSystemTextChange instead of isUpdateTime - * 11/19/2015 5141 randerso Changed upper() to also replace commas with ellipses * 12/04/2015 13753 lshi revert 13753 * * @@ -1024,13 +1023,11 @@ public class StyledTextComp extends Composite { protected void upper() { String text = textEditorST.getText(); - if (isUpperCase(text) && !text.contains(",")) { + if (isUpperCase(text)) { return; } - text = text.toUpperCase(); - text = text.replaceAll(", {0,1}", "..."); int topIdx = textEditorST.getTopIndex(); - setProductText(text); + setProductText(textEditorST.getText().toUpperCase()); textEditorST.setTopIndex(topIdx); } 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 163a5f3655..262067a8d1 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 @@ -356,6 +356,7 @@ import com.raytheon.viz.ui.simulatedtime.SimulatedTimeOperations; * 07Oct2015 RM 18132 D. Friedman Exlucde certain phensigs from automatic ETN incrementing. * 19Nov2015 5141 randerso Replace commas with ellipses if product not enabled for * mixed case transmission + * 10Dec2015 5206 randerso Replace commas with ellipses only in WarnGen products * * * @@ -387,6 +388,10 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, private static List gfePils = Arrays.asList("WSW", "NPW", "HLS", "CFW", "WCN", "FFA", "MWW", "RFW"); + private static final List warngenPils = Arrays.asList("AWW", "EWW", + "FFS", "FFW", "FLS", "FLW", "FRW", "MWS", "NOW", "SMW", "SPS", + "SVR", "SVS", "TOR"); + /** * Default list of VTEC phenomena significance codes for which the ETN * should not be changed when sending a NEW-action product. @@ -4235,9 +4240,10 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, // section setCurrentHeaderAndBody(); - // if product is not enabled for mixed case transmission, - // replace all commas with ellipses - if (!MixedCaseProductSupport.isMixedCase(product.getNnnid())) { + // if product a WarnGen product and is not enabled for mixed case + // transmission, replace all commas with ellipses + if (warngenPils.contains(product.getNnnid()) + && !MixedCaseProductSupport.isMixedCase(product.getNnnid())) { textEditor.setText(textEditor.getText() .replaceAll(", {0,1}", "...")); } @@ -7112,9 +7118,10 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, textEditor.append(textProduct); - // if product is not enabled for mixed case transmission, - // replace all commas with ellipses - if (!MixedCaseProductSupport.isMixedCase(product.getNnnid())) { + // if product a WarnGen product and is not enabled for mixed case + // transmission, replace all commas with ellipses + if (warngenPils.contains(product.getNnnid()) + && !MixedCaseProductSupport.isMixedCase(product.getNnnid())) { textEditor.setText(textEditor.getText() .replaceAll(", {0,1}", "...")); }