From 8d537ff7c6eadac2793c94df3d9a703fce8759f4 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 10 Jun 2021 11:05:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-53734=20=E3=80=90=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E8=81=94=E5=8A=A8=E3=80=91=E7=BB=84=E4=BB=B6=E5=90=8D/?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E5=90=8D=E6=9B=BF=E6=8D=A2=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=8F=91=E7=8E=B0=E6=9B=BF=E6=8D=A2=E5=A4=9A=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/module/DesignerActivator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0427fe3c4d..5e4887aa35 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 @@ -165,7 +165,6 @@ public class DesignerActivator extends Activator implements Prepare { storePassport(); AlphaFineHelper.switchConfig4Locale(); RecoverManager.register(new RecoverForDesigner()); - ContentReplacerCenter.getInstance().register(); pushUpdateTask.run(); } @@ -455,5 +454,6 @@ public class DesignerActivator extends Activator implements Prepare { @Override public void prepare() { LoginAuthServer.getInstance().start(); + ContentReplacerCenter.getInstance().register(); } } From 7dd528f13314b0c3b19d22ebff302faebb957999 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 10 Jun 2021 11:08:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-52936=20saveWorker=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=AF=B9=E6=A8=A1=E6=9D=BFid=E7=9A=84=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/file/WebPreviewUtils.java | 6 +++--- .../com/fr/design/file/MutilTempalteTabPane.java | 2 +- .../java/com/fr/design/mainframe/JTemplate.java | 16 ++++++++++------ .../fr/design/mainframe/check/CheckButton.java | 6 +++--- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java b/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java index 8f8d4ae139..2503db1de2 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java @@ -76,7 +76,7 @@ public final class WebPreviewUtils { browserTemplate(jt, baseRoute, map, actionType); } }); - worker.start(jt.getTarget().getTemplateID()); + worker.start(jt.getRuntimeId()); return; } browserTemplate(jt, baseRoute, map, actionType); @@ -97,7 +97,7 @@ public final class WebPreviewUtils { ); if (OK_OPTION == selVal) { CallbackSaveWorker worker = jt.saveAs(); - worker.start(jt.getTarget().getTemplateID()); + worker.start(jt.getRuntimeId()); worker.addSuccessCallback(new Runnable() { @Override public void run() { @@ -125,7 +125,7 @@ public final class WebPreviewUtils { browseUrl(jt.getEditingFILE(), baseRoute, map, actionType, jt); } }); - worker.start(jt.getTarget().getTemplateID()); + worker.start(jt.getRuntimeId()); } } } 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 9fa676f94e..87b7f2f25c 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 @@ -706,7 +706,7 @@ public class MutilTempalteTabPane extends JComponent { closeTpl(specifiedTemplate); } }); - worker.start(specifiedTemplate.getTarget().getTemplateID()); + worker.start(specifiedTemplate.getRuntimeId()); } else if (returnVal == JOptionPane.NO_OPTION) { closeTpl(specifiedTemplate); } 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 3c62f3b583..9e8df6b85f 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 @@ -129,6 +129,11 @@ public abstract class JTemplate> private volatile boolean opening = false; private volatile boolean openFailed = false; + /** + * UI界面模板运行时唯一的id 不存储在模板中 仅在运行时使用 模板界面上关闭就不关注了 + */ + private final String runtimeId = UUID.randomUUID().toString(); + private PluginEventListener pluginListener; public JTemplate() { @@ -1492,10 +1497,6 @@ public abstract class JTemplate> editingFILE = fileChooser.getSelectedFILE(); } - //收集和生成templateID 因为是另存为操作 无论怎么样都需要重新生成templateID - // TODO Hades https://work.fineres.com/browse/REPORT-52936 - // initForCollect(); - FILE finalEditingFILE = editingFILE; CallbackSaveWorker worker = new CallbackSaveWorker(new Callable() { @Override @@ -1587,13 +1588,13 @@ public abstract class JTemplate> @Override public void saveDirectly() { CallbackSaveWorker worker = save(); - worker.start(this.template.getTemplateID()); + worker.start(getRuntimeId()); } @Override public void saveAsDirectly() { CallbackSaveWorker worker = saveAs(); - worker.start(this.template.getTemplateID()); + worker.start(getRuntimeId()); } @Override @@ -1634,4 +1635,7 @@ public abstract class JTemplate> return !isSaving() && !isOpening() && !isOpenFailed(); } + public String getRuntimeId() { + return runtimeId; + } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java index 7757ea2f42..0ec50ef248 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java @@ -116,7 +116,7 @@ public class CheckButton extends UIButton { startCheck(checkThread); } }); - worker.start(jtemplate.getTarget().getTemplateID()); + worker.start(jtemplate.getRuntimeId()); } } else { if (!jtemplate.isSaved()) { @@ -127,7 +127,7 @@ public class CheckButton extends UIButton { startCheck(checkThread); } }); - worker.start(jtemplate.getTarget().getTemplateID()); + worker.start(jtemplate.getRuntimeId()); } else { startCheck(checkThread); } @@ -148,7 +148,7 @@ public class CheckButton extends UIButton { startCheck(checkThread); } }); - worker.start(jtemplate.getTarget().getTemplateID()); + worker.start(jtemplate.getRuntimeId()); } } }