From af75c06a8ea90034a81f754b368851e5a5c67c25 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 19 May 2021 17:12:11 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-52212=20=20=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E5=87=BA=E7=8E=B0=E7=99=BD=E8=89=B2=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=20=E6=BC=8F=E6=94=B9=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/start/module/DesignerWorkspaceActivator.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java index 0e02e93de9..24d9189518 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java @@ -2,7 +2,6 @@ package com.fr.start.module; import com.fr.concurrent.NamedThreadFactory; import com.fr.design.PluginClassRefreshManager; -import com.fr.design.env.WorkspaceChangeLoadingDialog; import com.fr.design.file.HistoryTemplateListCache; import com.fr.event.Event; import com.fr.event.Listener; @@ -62,9 +61,8 @@ public class DesignerWorkspaceActivator extends Activator { @Override public void on(Event event, Workspace workspace) { - + HistoryTemplateListCache.getInstance().load(); PluginClassRefreshManager.getInstance().addPluginListener(); - WorkspaceChangeLoadingDialog.hideDialog(); } }); } From 582920d2358bd85969950027361a00be55ba5a77 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 20 May 2021 16:04:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-52564=20=E6=8F=92=E4=BB=B6-=E6=96=B0?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94-=E6=8F=92=E4=BB=B6=E5=92=8C?= =?UTF-8?q?=E6=96=B0=E4=B8=BBjar=E6=9C=89=E4=B8=8D=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E6=9C=89=E7=9A=84=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=96=B0=E8=80=81=E6=A8=A1=E5=BC=8F=E4=B8=8D?= =?UTF-8?q?=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/app/FormApp.java | 57 ++++++++++--------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java index 02692c991c..6a896329ad 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java @@ -44,30 +44,8 @@ class FormApp extends AbstractAppProvider { HashMap classType = new HashMap(); classType.put(Constants.ARG_0, Form.class); classType.put(Constants.ARG_1, FILE.class); - classType.put(Constants.ARG_2, Parameter[].class); - JForm emptyForm = new JForm(new Form(new WBorderLayout("form")), tplFile); - OpenWorker> worker = new OpenWorker<>( - new Callable>() { - @Override - public OpenResult call() throws Exception { - Form form = asIOFile(tplFile); - return new OpenResult<>(form, form.getParameters()); - } - }, emptyForm); - worker.addCallBack(new Callable>() { - @Override - public JTemplate call() throws Exception { - OpenResult result = worker.getResult(); - return compatibleForm(result.getBaseBook(), result.getRef(), tplFile, classType); - } - }); FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Report_Template_Opening_And_Waiting", tplFile.getName()) + "..."); - worker.start(tplFile.getPath()); - OpenResult result = worker.getResult(); - if (result != null) { - return compatibleForm(result.getBaseBook(), new Parameter[0], tplFile, classType); - } - return emptyForm; + return compatibleForm(tplFile, classType); } /** @@ -75,13 +53,36 @@ class FormApp extends AbstractAppProvider { * * @return */ - private JTemplate compatibleForm(Form form, Parameter[] parameters, FILE tplFile, HashMap classType) { - if (ComparatorUtils.equals(StableFactory.getRegisteredClass(BaseJForm.XML_TAG).getName(), JForm.class)) { - return (JTemplate) StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, - new Object[]{form, tplFile, parameters}, classType, BaseJForm.class); + private JTemplate compatibleForm(FILE tplFile, HashMap classType) { + if (ComparatorUtils.equals(StableFactory.getRegisteredClass(BaseJForm.XML_TAG), JForm.class)) { + classType.put(Constants.ARG_2, Parameter[].class); + JForm emptyForm = new JForm(new Form(new WBorderLayout("form")), tplFile); + OpenWorker> worker = new OpenWorker<>( + new Callable>() { + @Override + public OpenResult call() throws Exception { + Form form = asIOFile(tplFile); + return new OpenResult<>(form, form.getParameters()); + } + }, emptyForm); + worker.addCallBack(new Callable>() { + @Override + public JTemplate call() throws Exception { + OpenResult result = worker.getResult(); + return (JTemplate) StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, + new Object[]{result.getBaseBook(), tplFile, result.getRef()}, classType, BaseJForm.class); + } + }); + worker.start(tplFile.getPath()); + OpenResult result = worker.getResult(); + if (result != null) { + return (JTemplate) StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, + new Object[]{result.getBaseBook(), tplFile, new Parameter[0]}, classType, BaseJForm.class); + } + return emptyForm; } else { return (JTemplate) StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, - new Object[]{form, tplFile}, classType, BaseJForm.class); + new Object[]{asIOFile(tplFile), tplFile}, classType, BaseJForm.class); } } From dfa979bd453d9863273a71929f1ad3163881c695 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 20 May 2021 16:39:29 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-52554=20=E5=AE=89=E8=A3=85=E4=BA=86?= =?UTF-8?q?=E6=8A=BD=E6=95=B0=E7=BC=93=E5=AD=98=E6=8F=92=E4=BB=B6=20?= =?UTF-8?q?=E5=AD=98=E5=9C=A8npe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/data/BasicTableDataTreePane.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java index b72ae2f157..b0997b7f6c 100644 --- a/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java +++ b/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java @@ -497,7 +497,9 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp } public void refreshToolBar() { - toolbarDef.refreshToolBar(FORBIDDEN_SET); + if (toolbarDef != null) { + toolbarDef.refreshToolBar(FORBIDDEN_SET); + } } public void checkEnable() {