From b69b0bcad8c7a8bf2039fce97b4ec8f84264a5aa Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 16 Jan 2020 11:32:58 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-24174=E3=80=90=E6=96=B0=E5=BC=95?= =?UTF-8?q?=E6=93=8E=E3=80=91=E6=89=B9=E9=87=8F=E8=BD=AC=E6=8D=A2=E5=8F=8A?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/file/MutilTempalteTabPane.java | 2 +- .../main/java/com/fr/design/mainframe/DesignerFrame.java | 2 +- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java index d9aa2f5be..f132cec34 100644 --- a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java @@ -258,7 +258,7 @@ public class MutilTempalteTabPane extends JComponent { private String tempalteShowName(JTemplate template) { - String name = template.getEditingFILE().getName(); + String name = template.getTemplateName(); if (!template.isSaved() && !name.endsWith(" *")) { name += " *"; } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index f7b309eae..b7fbae773 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -830,7 +830,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta } defaultTitleSB.append(username).append("@").append(envName).append("[").append(workspace.getDescription()).append("]"); if (editingTemplate != null) { - String path = editingTemplate.getEditingFILE().getPath(); + String path = editingTemplate.getPath(); if (!editingTemplate.getEditingFILE().exists()) { path = FILEFactory.MEM_PREFIX + path; } else if (path.startsWith(ProjectConstants.REPORTLETS_NAME)) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 97df45c4a..305edac11 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -243,12 +243,12 @@ public abstract class JTemplate> public void judgeSheetAuthority(String roles) { } - + /** * 刷新内部资源 */ public void refreshResource() { - + try { this.template = JTemplateFactory.asIOFile(this.editingFILE); setTarget(this.template); @@ -1232,4 +1232,9 @@ public abstract class JTemplate> } public abstract String route(); + + public String getTemplateName(){ + return getEditingFILE().getName(); + } + }