From cc5a71a31a3b3bcd71c8734d56f61a2266ee5d2b Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 17 Jul 2018 14:55:31 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-9757=20=E3=80=90=E9=98=BB=E5=A1=9E?= =?UTF-8?q?=E3=80=91=E7=A3=81=E7=9B=98=E6=96=87=E4=BB=B6=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=A1=86=E7=9A=84=E8=B7=AF=E5=BE=84=E5=B0=91=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=AD=97=E6=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/webattr/WebCssPane.java | 2 +- .../src/main/java/com/fr/design/webattr/WebJsPane.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java b/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java index cb9909e2e..b4600b753 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java @@ -85,7 +85,7 @@ public class WebCssPane extends BasicPane { if (!"css".equalsIgnoreCase(fileType)) { return; } - localText.setText(file.getPath().substring(1)); + localText.setText(file.getPath().replaceFirst("^/*", "")); // 去掉开头的"/"(如果有的话) centerPane.setAddEnabled(true); } diff --git a/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java b/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java index ac2217c02..0c92927f6 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java @@ -173,7 +173,7 @@ public class WebJsPane extends BasicPane { if (!"js".equalsIgnoreCase(fileType)) { return; } - localText.setText(file.getPath().substring(1)); + localText.setText(file.getPath().replaceFirst("^/*", "")); // 去掉相对路径开头的"/"(如果有的话) editingPane.setAddEnabled(true); }