From 9b25fb0625ff48a20f042c7881331cdc217f47ff Mon Sep 17 00:00:00 2001 From: Yyming Date: Wed, 16 Sep 2020 11:16:26 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-39757=20=E5=A4=84=E7=90=86=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E8=AF=8D=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cell/render/ContentCellRender.java | 24 +++-- .../alphafine/component/AlphaFineDialog.java | 88 ++++++++----------- .../alphafine/preview/PluginPreviewPane.java | 2 +- .../alphafine/preview/RobotPreviewPane.java | 4 +- .../manager/impl/FileSearchManager.java | 6 +- .../manager/impl/SegmentationManager.java | 5 +- .../cell/render/ContentCellRenderTest.java | 23 +++++ 7 files changed, 82 insertions(+), 70 deletions(-) create mode 100644 designer-realize/src/test/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRenderTest.java diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java index 07f5b4d4e..da44fa510 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java @@ -106,11 +106,10 @@ public class ContentCellRender implements ListCellRenderer { if (strings == null) { return modelName; } - for (int i = 0; i < strings.length; i++) { - String primaryStr = getReplacedString(modelName, strings[i]); - modelName = modelName.replaceAll("(?i)" + strings[i], "|" + strings[i] + "|"); + for (String string : strings) { + String primaryStr = getReplacedString(modelName, string); if (StringUtils.isNotEmpty(primaryStr)) { - modelName = modelName.replaceAll(strings[i], primaryStr); + modelName = modelName.replaceAll("(?i)" + primaryStr, "|" + primaryStr + "|"); } } modelName = "