From 24939bf44ab421791b0fd4f392cdd72803512e2c Mon Sep 17 00:00:00 2001 From: ju Date: Wed, 8 Aug 2018 11:28:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20master?= =?UTF-8?q?=E5=B1=8F=E8=94=BD=E5=9B=BD=E9=99=85=E5=8C=96=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/module/DesignerActivator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index bac7d7247..5316eb8ff 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -123,9 +123,9 @@ public class DesignerActivator extends Activator { public void start() { List markers = rightCollectMutable(InterMutableKey.Path); for (LocaleMarker marker : markers) { - if (marker.match(LocaleScope.DESIGN)) { +// if (marker.match(LocaleScope.DESIGN)) { Toolkit.addResource(marker.getPath()); - } +// } } designerModuleStart(); preLoadPane(); From b4b0e01924fb7855aa988d7d4faefda4467e16e6 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Tue, 4 Sep 2018 16:19:54 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=EF=BC=8C=20?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E4=BF=AE=E5=A4=8D.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/start/module/DesignerActivator.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index 5316eb8ff..80edec701 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -27,7 +27,7 @@ import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.hyperlink.ReportletHyperlinkPane; import com.fr.design.hyperlink.WebHyperlinkPane; -import com.fr.design.i18n.Toolkit; +import com.fr.design.i18n.DesignI18nImpl; import com.fr.design.javascript.EmailPane; import com.fr.design.javascript.JavaScriptImplPane; import com.fr.design.javascript.ParameterJavaScriptPane; @@ -123,9 +123,9 @@ public class DesignerActivator extends Activator { public void start() { List markers = rightCollectMutable(InterMutableKey.Path); for (LocaleMarker marker : markers) { -// if (marker.match(LocaleScope.DESIGN)) { - Toolkit.addResource(marker.getPath()); -// } + if (marker.match(LocaleScope.DESIGN)) { + DesignI18nImpl.getInstance().addResource(marker.getPath()); + } } designerModuleStart(); preLoadPane(); @@ -252,11 +252,11 @@ public class DesignerActivator extends Activator { private static NameableCreator[] hyperlinkTypes() { return new NameableCreator[]{ - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Hyperlink_Reportlet"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Email"), EmailJavaScript.class, EmailPane.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Hyperlink-Web_link"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("JavaScript-Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_JavaScript"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class) + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"), EmailJavaScript.class, EmailPane.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_JavaScript_Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class) }; } @@ -410,4 +410,4 @@ public class DesignerActivator extends Activator { unloadLogAppender(); DesignerSocketIO.close(); } -} \ No newline at end of file +} From 6d2eccd17459d858e80afc57c585d0068545caf7 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 6 Sep 2018 10:39:16 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-11123=20=E3=80=9010.0=E5=86=92?= =?UTF-8?q?=E7=83=9F=E3=80=91=E8=A1=A8=E5=8D=95=E9=A2=84=E8=A7=88=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E9=97=AE=E9=A2=98=EF=BC=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=B2=A1=E5=8F=8D=E5=BA=94=EF=BC=88master=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E9=A2=84=E8=A7=88=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 4 +++- .../src/main/java/com/fr/design/preview/FormPreview.java | 3 +-- .../src/main/java/com/fr/design/preview/MobilePreview.java | 4 +--- .../src/main/java/com/fr/design/mainframe/JForm.java | 4 +--- .../src/main/java/com/fr/design/mainframe/JWorkBook.java | 7 ++----- 5 files changed, 8 insertions(+), 14 deletions(-) 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 6f9383e4d..c0d41814c 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 @@ -16,6 +16,7 @@ import com.fr.design.actions.edit.RedoAction; import com.fr.design.actions.edit.UndoAction; import com.fr.design.actions.file.SaveAsTemplateAction; import com.fr.design.actions.file.SaveTemplateAction; +import com.fr.design.actions.file.WebPreviewUtils; import com.fr.design.constants.UIConstants; import com.fr.design.designer.TargetComponent; import com.fr.design.dialog.InformationWarnPane; @@ -1102,7 +1103,8 @@ public abstract class JTemplate> * @param provider 预览模式 */ public void previewMenuActionPerformed(PreviewProvider provider) { - + setPreviewType(provider); + WebPreviewUtils.preview(this, provider); } /** diff --git a/designer-base/src/main/java/com/fr/design/preview/FormPreview.java b/designer-base/src/main/java/com/fr/design/preview/FormPreview.java index d6206a2c0..8522d6773 100644 --- a/designer-base/src/main/java/com/fr/design/preview/FormPreview.java +++ b/designer-base/src/main/java/com/fr/design/preview/FormPreview.java @@ -1,7 +1,6 @@ package com.fr.design.preview; import com.fr.design.fun.impl.AbstractPreviewProvider; -import com.fr.locale.InterProviderFactory; /** @@ -13,7 +12,7 @@ public class FormPreview extends AbstractPreviewProvider { @Override public String nameForPopupItem() { - return InterProviderFactory.getProvider().getLocText("Fine-Design_Form_M_Form_Preview"); + return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Form_Preview"); } @Override diff --git a/designer-base/src/main/java/com/fr/design/preview/MobilePreview.java b/designer-base/src/main/java/com/fr/design/preview/MobilePreview.java index 4ab942501..c0f9e973d 100644 --- a/designer-base/src/main/java/com/fr/design/preview/MobilePreview.java +++ b/designer-base/src/main/java/com/fr/design/preview/MobilePreview.java @@ -1,8 +1,6 @@ package com.fr.design.preview; import com.fr.design.fun.impl.AbstractPreviewProvider; -import com.fr.general.Inter; - import java.util.HashMap; import java.util.Map; @@ -16,7 +14,7 @@ public class MobilePreview extends AbstractPreviewProvider { @Override public String nameForPopupItem() { - return Inter.getLocText("Fine-Design_Mobile_Preview"); + return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Preview"); } @Override diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 25fc777e6..b08a479e3 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -6,9 +6,7 @@ import com.fr.base.Parameter; import com.fr.base.vcs.DesignerMode; import com.fr.design.DesignState; import com.fr.design.actions.core.WorkBookSupportable; -import com.fr.design.actions.file.WebPreviewUtils; import com.fr.design.cell.FloatElementsProvider; -import com.fr.design.constants.UIConstants; import com.fr.design.designer.TargetComponent; import com.fr.design.designer.beans.actions.CopyAction; import com.fr.design.designer.beans.actions.CutAction; @@ -938,7 +936,7 @@ public class JForm extends JTemplate implements BaseJForm { */ @Override public PreviewProvider[] supportPreview() { - return new PreviewProvider[]{new FormPreview(), new MobilePreview()}; + return new PreviewProvider[]{new FormPreview()}; } /** diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java index e60fa5978..b546d618b 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java @@ -10,7 +10,6 @@ import com.fr.design.DesignModelAdapter; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.AllowAuthorityEditAction; import com.fr.design.actions.ExitAuthorityEditAction; -import com.fr.design.actions.file.WebPreviewUtils; import com.fr.design.actions.file.export.CSVExportAction; import com.fr.design.actions.file.export.EmbeddedExportExportAction; import com.fr.design.actions.file.export.ExcelExportAction; @@ -53,7 +52,6 @@ import com.fr.design.menu.ToolBarDef; import com.fr.design.module.DesignModuleFactory; import com.fr.design.parameter.ParameterDefinitePane; import com.fr.design.parameter.ParameterInputPane; -import com.fr.design.preview.MobilePreview; import com.fr.design.preview.PagePreview; import com.fr.design.preview.ViewPreview; import com.fr.design.preview.WriteEnhancePreview; @@ -891,7 +889,7 @@ public class JWorkBook extends JTemplate { public PreviewProvider[] supportPreview() { Set set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING); return ArrayUtils.addAll(new PreviewProvider[]{ - new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview(), new MobilePreview() + new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview() }, set.toArray(new PreviewProvider[set.size()])); } @@ -924,8 +922,7 @@ public class JWorkBook extends JTemplate { */ @Override public void previewMenuActionPerformed(PreviewProvider provider) { - setPreviewType(provider); - WebPreviewUtils.preview(this, provider); + super.previewMenuActionPerformed(provider); } /** From 6675c853b82799b507df9b4c1364e8f88ba1cd87 Mon Sep 17 00:00:00 2001 From: ju Date: Sat, 29 Sep 2018 16:55:43 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=A5=E9=87=8Dfindbugs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/itree/filetree/FileNodeComparator.java | 11 ++++++----- .../src/main/java/com/fr/file/FILEChooserPane.java | 10 ++-------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeComparator.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeComparator.java index 68dbec78c..bf4a5155c 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeComparator.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeComparator.java @@ -1,6 +1,6 @@ package com.fr.design.gui.itree.filetree; -import com.fr.file.filetree.LocalFileNodes; +import com.fr.base.FRContext; import com.fr.file.filetree.FileNode; import java.util.Comparator; @@ -59,13 +59,14 @@ public class FileNodeComparator implements Comparator { private int groupByFileType(FileNode nameNode1, FileNode nameNode2, int i) { - if (i < LocalFileNodes.FILE_TYPE.length) { - if (nameNode1.isFileType(LocalFileNodes.FILE_TYPE[i])) - if (nameNode2.isFileType(LocalFileNodes.FILE_TYPE[i])) + String[] supportTypes = FRContext.getFileNodes().getSupportedTypes(); + if (i < supportTypes.length) { + if (nameNode1.isFileType(supportTypes[i])) + if (nameNode2.isFileType(supportTypes[i])) return nameNode1.getName().toLowerCase().compareTo(nameNode2.getName().toLowerCase()); else return-1; - else if (nameNode2.isFileType(LocalFileNodes.FILE_TYPE[i])) + else if (nameNode2.isFileType(supportTypes[i])) return 1; else{ return groupByFileType(nameNode1, nameNode2, i+1); diff --git a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java index 1e4ec0d65..f3f9c7d28 100644 --- a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java +++ b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java @@ -23,7 +23,6 @@ import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.JTemplate; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.file.filetree.FileNode; -import com.fr.file.filetree.LocalFileNodes; import com.fr.file.filter.ChooseFileFilter; import com.fr.file.filter.FILEFilter; import com.fr.general.ComparatorUtils; @@ -693,14 +692,9 @@ public class FILEChooserPane extends BasicPane { String appName = ProductConstants.APP_NAME; JTemplate editing = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); if (editing == null || !editing.isChartBook()) { - String[] fileSuffix_local = LocalFileNodes.FILE_TYPE; - EnumSet fileExtensions = EnumSet.of(FileExtension.CPT, FileExtension.CPTX, FileExtension.FRM, FileExtension.FRMX, FileExtension.CHT); + if (type == JFileChooser.OPEN_DIALOG) { - if (WorkContext.getCurrent().isLocal()) { //本地连接 - this.addChooseFILEFilter(new ChooseFileFilter(fileSuffix_local, appName + Toolkit.i18nText("Fine-Design_Report_Template_File"))); - } else { - this.addChooseFILEFilter(new ChooseFileFilter(fileExtensions, appName + Toolkit.i18nText("Fine-Design_Report_Template_File"))); - } + this.addChooseFILEFilter(new ChooseFileFilter(FRContext.getFileNodes().getSupportedTypes(), appName + Toolkit.i18nText("Fine-Design_Report_Template_File"))); } // ben:filefilter设置初值为cpt过滤