From be2cd9cf2ed9f9fb84434f0dfc7dd07c2abe4ada Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 18 Jul 2018 11:01:16 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-9747=20=E3=80=9010.0=E4=BA=8C?= =?UTF-8?q?=E8=BD=AE=E5=9B=9E=E5=BD=92=E3=80=91=E4=BF=AE=E6=94=B9=E4=BB=A5?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E6=A8=A1=E6=9D=BF=E6=97=A0=E6=B3=95=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/mainframe/DesignerFrame.java | 3 --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) 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 3636a18daf..279f399f87 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 @@ -1010,9 +1010,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta private void activeTemplate(FILE tplFile, JTemplate jt) { // 如果该模板已经打开,则进行激活就可以了 String fullName = StableUtils.pathJoin(new String[]{ProjectConstants.REPORTLETS_NAME, tplFile.getName()}); - if (tplFile instanceof FileNodeFILE) { - fullName = ((FileNodeFILE) tplFile).getEnvPath() + "/" + tplFile.getPath(); - } // 如果是从文件夹打开的文件,不是从设计器文件树打开的文件,则直接取path就行 if (tplFile instanceof FileFILE) { fullName = tplFile.getPath(); 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 c683488e86..11edfcb830 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 @@ -49,6 +49,7 @@ import com.fr.log.FineLoggerFactory; import com.fr.report.cell.Elem; import com.fr.report.cell.cellattr.CellImage; import com.fr.stable.ArrayUtils; +import com.fr.stable.OperatingSystem; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; import com.fr.stable.core.UUID; @@ -199,7 +200,12 @@ public abstract class JTemplate> } public String getPath() { - return getEditingFILE().getPath(); + String editingFileName = getEditingFILE().getPath(); + if (OperatingSystem.isWindows()) { + return editingFileName.replaceAll("/", "\\\\"); + } else { + return editingFileName.replaceAll("\\\\", "/"); + } } protected abstract JComponent createCenterPane(); From 7caddf7dddb537180d30044263b8743a28c04c90 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 18 Jul 2018 11:37:47 +0800 Subject: [PATCH 2/5] =?UTF-8?q?rtREPORT-9747=20=E3=80=9010.0=E4=BA=8C?= =?UTF-8?q?=E8=BD=AE=E5=9B=9E=E5=BD=92=E3=80=91=E4=BF=AE=E6=94=B9=E4=BB=A5?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E6=A8=A1=E6=9D=BF=E6=97=A0=E6=B3=95=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/mainframe/DesignerFrame.java | 8 +------- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 7 +------ 2 files changed, 2 insertions(+), 13 deletions(-) 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 279f399f87..0fb8380905 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 @@ -1009,13 +1009,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta */ private void activeTemplate(FILE tplFile, JTemplate jt) { // 如果该模板已经打开,则进行激活就可以了 - String fullName = StableUtils.pathJoin(new String[]{ProjectConstants.REPORTLETS_NAME, tplFile.getName()}); - // 如果是从文件夹打开的文件,不是从设计器文件树打开的文件,则直接取path就行 - if (tplFile instanceof FileFILE) { - fullName = tplFile.getPath(); - } - fullName = OperatingSystem.isWindows() ? fullName.replaceAll("/", "\\\\") : fullName.replaceAll("\\\\", "/"); - int index = HistoryTemplateListPane.getInstance().contains(fullName); + int index = HistoryTemplateListPane.getInstance().contains(tplFile.getPath()); List> historyList = HistoryTemplateListPane.getInstance().getHistoryList(); if (index != -1) { historyList.get(index).activeJTemplate(index, jt); 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 11edfcb830..b694137c1a 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 @@ -200,12 +200,7 @@ public abstract class JTemplate> } public String getPath() { - String editingFileName = getEditingFILE().getPath(); - if (OperatingSystem.isWindows()) { - return editingFileName.replaceAll("/", "\\\\"); - } else { - return editingFileName.replaceAll("\\\\", "/"); - } + return getEditingFILE().getPath(); } protected abstract JComponent createCenterPane(); From 762f6b5ad2e80a7df067576f47e568f8a8bb4cde Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 18 Jul 2018 11:45:28 +0800 Subject: [PATCH 3/5] rt --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 1 - 1 file changed, 1 deletion(-) 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 b694137c1a..c683488e86 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 @@ -49,7 +49,6 @@ import com.fr.log.FineLoggerFactory; import com.fr.report.cell.Elem; import com.fr.report.cell.cellattr.CellImage; import com.fr.stable.ArrayUtils; -import com.fr.stable.OperatingSystem; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; import com.fr.stable.core.UUID; From 3c908ba98563d184b37b9018d48a8a43b363775b Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 18 Jul 2018 16:27:45 +0800 Subject: [PATCH 4/5] =?UTF-8?q?rtREPORT-9747=20=E3=80=9010.0=E4=BA=8C?= =?UTF-8?q?=E8=BD=AE=E5=9B=9E=E5=BD=92=E3=80=91=E4=BF=AE=E6=94=B9=E4=BB=A5?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E6=A8=A1=E6=9D=BF=E6=97=A0=E6=B3=95=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/alphafine/cell/model/FileModel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/FileModel.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/FileModel.java index 70d55b872b..377c2c8ebd 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/FileModel.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/FileModel.java @@ -22,8 +22,8 @@ public class FileModel extends AlphaCellModel { public FileModel(String name, String filePath) { super(name, null, CellType.FILE); - this.filePath = filePath; - setDescription(AlphaFineHelper.findFolderName(filePath)); + this.filePath = filePath.replaceAll("\\\\", "/"); + setDescription(AlphaFineHelper.findFolderName(this.filePath)); } public String getFilePath() { From db41d2f32e0d010850e4faf9edf7ba15bc49530c Mon Sep 17 00:00:00 2001 From: richie Date: Wed, 18 Jul 2018 17:21:23 +0800 Subject: [PATCH 5/5] =?UTF-8?q?CORE-113=20=E6=8F=90=E4=BE=9B=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89AOP=E6=B3=A8=E8=A7=A3=E7=9A=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E5=8F=AF=E4=BB=A5=E5=9C=A8=E5=90=84=E4=B8=AA?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E8=87=AA=E8=A1=8C=E5=AE=9A=E4=B9=89=E6=96=B9?= =?UTF-8?q?=E4=BE=BF=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95=EF=BC=8C=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E7=A8=8D=E5=90=8E=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/Designer.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/Designer.java b/designer-realize/src/main/java/com/fr/start/Designer.java index 1088f5fdcb..880a7182b9 100644 --- a/designer-realize/src/main/java/com/fr/start/Designer.java +++ b/designer-realize/src/main/java/com/fr/start/Designer.java @@ -42,7 +42,6 @@ import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.module.Module; import com.fr.module.ModuleContext; -import com.fr.record.analyzer.FineAnalyzer; import com.fr.stable.BuildContext; import com.fr.stable.OperatingSystem; import com.fr.stable.ProductConstants; @@ -56,14 +55,9 @@ import com.fr.start.preload.ImagePreLoader; import com.fr.start.server.ServerTray; import com.fr.workspace.WorkContext; -import javax.swing.JComponent; -import javax.swing.JPanel; +import javax.swing.*; import javax.swing.border.MatteBorder; -import java.awt.Component; -import java.awt.Cursor; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Insets; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; @@ -96,8 +90,6 @@ public class Designer extends BaseDesigner { */ public static void main(String[] args) { - FineAnalyzer.init(); - BuildContext.setBuildFilePath("/com/fr/stable/build.properties"); @@ -197,7 +189,7 @@ public class Designer extends BaseDesigner { if (!BaseUtils.isAuthorityEditing()) { menuDef.addShortCut(SeparatorDef.DEFAULT); - + if (WorkContext.getCurrent().isRoot()) { menuDef.addShortCut(new ServerConfigManagerAction(), new StyleListAction(), new WidgetManagerAction()); if (ActionFactory.getChartPreStyleAction() != null) {