From 8269d519e72b51c2114ceaa098225052cf402d2b Mon Sep 17 00:00:00 2001 From: Michael Gamazaychikov Date: Fri, 15 Jan 2016 13:37:23 -0500 Subject: [PATCH] ASM #18522 - TextWS: FWM product converts commas into three dots (...). Change-Id: I70021085a560c769cb6fe126e2690681d8cd0644 (cherry picked from commit 3801978f1c0eb3c89c3010039690cb5916b752d4 [formerly da891cb519ac13885e2edf82156d04042de5895f]) Former-commit-id: f8cb277b682c565fe5a7d654790c37833a9ad8ba --- .../texteditor/dialogs/TextEditorDialog.java | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) 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 9a48ceac14..a6bf9014bc 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 @@ -353,13 +353,13 @@ import com.raytheon.viz.ui.simulatedtime.SimulatedTimeOperations; * 8Jul2015 DR 15044 dhuffman Implemented tabbing and tabs to spaces. * Sep 29 2015 4899 rferrel Do not send product while in operational mode and * simulated time. - * 07Oct2015 RM 18132 D. Friedman Exlucde certain phensigs from automatic ETN incrementing. + * 07Oct2015 RM 18132 D. Friedman Exclude 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 + * 6Jan2016    RM18452   mgamazaychikov Fix NPE for null product in enterEditor * 06Jan2016 5225 randerso Fix problem with mixed case not getting converted to upper case * when multiple text editors are open on the same product. - * 6Jan2016 RM18452 mgamazaychikov Fix NPE for null product in enterEditor * * * @@ -4243,14 +4243,12 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, // section setCurrentHeaderAndBody(); - // if product a WarnGen product and is not enabled for mixed case + // if product is a WarnGen product and is not enabled for mixed case // transmission, replace all commas with ellipses - if (product != null) { - if (warngenPils.contains(product.getNnnid()) - && !MixedCaseProductSupport.isMixedCase(product.getNnnid())) { - textEditor.setText(textEditor.getText().replaceAll(", {0,1}", - "...")); - } + if ((product != null) && warngenPils.contains(product.getNnnid()) + && !MixedCaseProductSupport.isMixedCase(product.getNnnid())) { + textEditor.setText(textEditor.getText() + .replaceAll(", {0,1}", "...")); } // Mark the uneditable warning text @@ -4393,11 +4391,11 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, textEditor.setText(originalText); } - // if product is not enabled for mixed case transmission, - // replace all commas with ellipses + // if product is a WarnGen product and is not enabled for mixed case + // transmission, replace all commas with ellipses StdTextProduct product = TextDisplayModel.getInstance() .getStdTextProduct(token); - if ((product != null) + if ((product != null) && warngenPils.contains(product.getNnnid()) && !MixedCaseProductSupport.isMixedCase(product.getNnnid())) { textEditor.setText(textEditor.getText() .replaceAll(", {0,1}", "...")); @@ -7123,9 +7121,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 is 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}", "...")); }