From febd687b9ed6007ff9f2f0244b6ec456cd64d098 Mon Sep 17 00:00:00 2001 From: eason Date: Thu, 9 Sep 2021 15:11:53 +0800 Subject: [PATCH 1/5] =?UTF-8?q?CHART-20402=20=E5=A2=9E=E5=8A=A0=E5=87=A0?= =?UTF-8?q?=E4=B8=AA=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/DesignerEnvManager.java | 2 +- .../java/com/fr/design/ui/ModernUIPane.java | 28 +++++++ .../fr/design/ui/compatible/BuilderDiff.java | 2 + .../ui/compatible/ModernUIPaneFactory.java | 19 +++-- .../design/ui/compatible/NewModernUIPane.java | 36 ++++++++- .../mainframe/app/DesignerAppUtilsTest.java | 78 ------------------- 6 files changed, 79 insertions(+), 86 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index 9c23dcc51a..91c2225973 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -1645,7 +1645,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { public boolean isOpenDebug() { - return openDebug; + return true; } public void setOpenDebug(boolean openDebug) { diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java index 8c7ed5ac5a..b9e6d7330e 100644 --- a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java @@ -17,6 +17,7 @@ import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent; import com.teamdev.jxbrowser.chromium.events.ScriptContextListener; import com.teamdev.jxbrowser.chromium.swing.BrowserView; +import com.teamdev.jxbrowser.event.Observer; import javax.swing.JDialog; import javax.swing.SwingUtilities; @@ -157,6 +158,27 @@ public class ModernUIPane extends BasicPane { return null; } + public void disposeBrowser() { + + if(browser != null) { + browser.dispose(); + browser = null; + } + + } + + public void clearCache() { + if (browser != null) { + browser.getCacheStorage().clearCache(); + } + } + + public void executeJavaScript(String javaScript) { + if (browser != null) { + browser.executeJavaScript(javaScript); + } + } + public static class Builder implements BuilderDiff { private ModernUIPane pane; @@ -293,6 +315,12 @@ public class ModernUIPane extends BasicPane { return this; } + @Override + public Builder prepareForV7(Class event, Observer listener) { + // do nothing + return this; + } + public ModernUIPane build() { return pane; } diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/BuilderDiff.java b/designer-base/src/main/java/com/fr/design/ui/compatible/BuilderDiff.java index 33c817c948..9e6168514f 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/BuilderDiff.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/BuilderDiff.java @@ -4,6 +4,7 @@ import com.fr.design.ui.ModernUIPane; import com.teamdev.jxbrowser.browser.callback.InjectJsCallback; import com.teamdev.jxbrowser.chromium.events.LoadListener; import com.teamdev.jxbrowser.chromium.events.ScriptContextListener; +import com.teamdev.jxbrowser.event.Observer; /** * 封装jxbrwoser v6/v7的构建方式的差异 @@ -20,5 +21,6 @@ public interface BuilderDiff { ModernUIPane.Builder prepareForV7(InjectJsCallback callback); + ModernUIPane.Builder prepareForV7(Class event, Observer listener); } diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java b/designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java index 5ae56627e9..68b8950f7c 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java @@ -11,6 +11,17 @@ import com.fr.stable.os.OperatingSystem; public class ModernUIPaneFactory { public static ModernUIPane.Builder modernUIPaneBuilder() { + + if (isV7()) { + return new NewModernUIPane.Builder<>(); + } else { + return new ModernUIPane.Builder<>(); + } + + } + + public static boolean isV7() { + // 7.15的class不存在时 走老版本 boolean hasJxBrowserV7_15 = true; try { @@ -18,10 +29,8 @@ public class ModernUIPaneFactory { } catch (ClassNotFoundException e) { hasJxBrowserV7_15 = false; } - if (OperatingSystem.isWindows() && hasJxBrowserV7_15) { - return new NewModernUIPane.Builder<>(); - } else { - return new ModernUIPane.Builder<>(); - } + + return OperatingSystem.isWindows() && hasJxBrowserV7_15; + } } diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java index 33747d3f15..107ba8cd95 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java @@ -15,6 +15,7 @@ import com.teamdev.jxbrowser.chromium.events.ScriptContextListener; import com.teamdev.jxbrowser.engine.Engine; import com.teamdev.jxbrowser.engine.EngineOptions; import com.teamdev.jxbrowser.engine.RenderingMode; +import com.teamdev.jxbrowser.event.Observer; import com.teamdev.jxbrowser.js.JsObject; import com.teamdev.jxbrowser.net.Scheme; import com.teamdev.jxbrowser.view.swing.BrowserView; @@ -100,7 +101,7 @@ public class NewModernUIPane extends ModernUIPane { EngineOptions options; if (scheme != null && requestCallback != null) { options = EngineOptions.newBuilder(RenderingMode.HARDWARE_ACCELERATED).addSwitch("--disable-google-traffic").addScheme(scheme, requestCallback).build(); - } else { + } else { options = EngineOptions.newBuilder(RenderingMode.HARDWARE_ACCELERATED).addSwitch("--disable-google-traffic").build(); } Engine engine = Engine.newInstance(options); @@ -161,6 +162,29 @@ public class NewModernUIPane extends ModernUIPane { return null; } + public void disposeBrowser() { + + if (browser != null) { + browser.close(); + browser = null; + } + + } + + public void clearCache() { + if (browser != null) { + browser.engine().httpCache().clear(); + } + } + + public void executeJavaScript(String javaScript) { + if (browser != null) { + browser.mainFrame().ifPresent(frame -> { + frame.executeJavaScript(javaScript); + }); + } + } + public static class Builder extends ModernUIPane.Builder { private NewModernUIPane pane = new NewModernUIPane<>(); @@ -191,7 +215,7 @@ public class NewModernUIPane extends ModernUIPane { @Override public NewModernUIPane.Builder withURL(final String url) { pane.scheme = Scheme.of("file"); - pane.requestCallback = new NxComplexInterceptRequestCallback(null); + pane.requestCallback = new NxComplexInterceptRequestCallback(null); pane.browser.navigation().loadUrl(url); return this; } @@ -301,6 +325,14 @@ public class NewModernUIPane extends ModernUIPane { return prepare(callback); } + @Override + public ModernUIPane.Builder prepareForV7(Class event, Observer listener) { + + pane.browser.navigation().on(event, listener); + + return this; + } + @Override public NewModernUIPane build() { return pane; diff --git a/designer-realize/src/test/java/com/fr/design/mainframe/app/DesignerAppUtilsTest.java b/designer-realize/src/test/java/com/fr/design/mainframe/app/DesignerAppUtilsTest.java index c2f7ef7695..62d0931b55 100644 --- a/designer-realize/src/test/java/com/fr/design/mainframe/app/DesignerAppUtilsTest.java +++ b/designer-realize/src/test/java/com/fr/design/mainframe/app/DesignerAppUtilsTest.java @@ -3,7 +3,6 @@ package com.fr.design.mainframe.app; import com.fr.invoke.Reflect; import com.fr.plugin.context.PluginMarker; import com.fr.plugin.context.PluginMarkerAdapter; -import com.fr.plugin.engine.remote.PluginRemoteSync; import com.fr.stable.TemplateIOErrorContextHolder; import com.fr.third.guava.collect.Multimap; import org.easymock.EasyMock; @@ -24,83 +23,6 @@ import java.util.HashSet; * Created by vito on 2021/5/31 */ @RunWith(PowerMockRunner.class) -@PrepareForTest({PluginRemoteSync.class}) public class DesignerAppUtilsTest { - @Test - public void testDealWithErrorDetailMultiLineAndCache() { - TemplateIOErrorContextHolder.registerPluginNameMap(new HashMap() {{ - put("2", "好用的插件"); - }},new HashSet<>()); - TemplateIOErrorContextHolder.addNeedEnablePlugin(PluginMarkerAdapter.create("1", "1.0", "1插件")); - TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("2", "1.0")); - TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("3", "1.0")); - String log = DesignerAppUtils.dealWithErrorDetailMultiLineAndCache("template1"); - Assert.assertTrue(log.contains("1插件")); - Assert.assertTrue(log.contains("好用的插件")); - Assert.assertTrue(log.contains("3")); - Multimap map = DesignerAppUtils.popPluginInfoMap("template1"); - Assert.assertEquals(3, map.size()); - Assert.assertNull(DesignerAppUtils.popPluginInfoMap("template1")); - } - @Test - public void testInvalidatePlugins() { - TemplateIOErrorContextHolder.registerPluginNameMap(new HashMap() {{ - put("2", "好用的插件"); - }},new HashSet<>()); - TemplateIOErrorContextHolder.addNeedEnablePlugin(PluginMarkerAdapter.create("1", "1.0", "1插件")); - TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("2", "1.0")); - TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("3", "1.0")); - String log = DesignerAppUtils.dealWithErrorDetailMultiLineAndCache("template1"); - Assert.assertTrue(log.contains("1插件")); - Assert.assertTrue(log.contains("好用的插件")); - Assert.assertTrue(log.contains("3")); - DesignerAppUtils.invalidatePlugins("template1"); - Assert.assertNull(DesignerAppUtils.popPluginInfoMap("template1")); - } - - @Test - public void testRearrange(){ - // 远程插件模拟注册 - PluginRemoteSync pluginRemoteSync = EasyMock.createMock(PluginRemoteSync.class); - EasyMock.expect(pluginRemoteSync.getPluginRemoteStatusByIdIndex()).andReturn(new HashMap(){{ - put("com.fr.plugin1", Reflect.on(PluginRemoteSync.PluginStatus.class).call("create","com.fr.plugin1","1",true).get()); - put("com.fr.plugin2", Reflect.on(PluginRemoteSync.PluginStatus.class).call("create","com.fr.plugin2","1",true).get()); - put("com.fr.plugin3", Reflect.on(PluginRemoteSync.PluginStatus.class).call("create","com.fr.plugin3","1",false).get()); - put("com.fr.plugin4", Reflect.on(PluginRemoteSync.PluginStatus.class).call("create","com.fr.plugin4","1",false).get()); - }}).anyTimes(); - EasyMock.replay(pluginRemoteSync); - PowerMock.mockStaticPartial(PluginRemoteSync.class, "getInstance"); - EasyMock.expect(PluginRemoteSync.getInstance()).andReturn(pluginRemoteSync).anyTimes(); - PowerMock.replay(PluginRemoteSync.class); - - // 本地插件模拟检查 - TemplateIOErrorContextHolder.registerPluginNameMap(new HashMap() {{ - put("com.fr.plugin1", "好用的插件1"); - put("com.fr.plugin2", "好用的插件2"); - put("com.fr.plugin3", "好用的插件3"); - put("com.fr.plugin4", "好用的插件4"); - put("com.fr.plugin5", "好用的插件5"); - }},new HashSet<>()); - // unknown - TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("com.fr.plugin7", "1")); - // disable - TemplateIOErrorContextHolder.addNeedEnablePlugin(PluginMarkerAdapter.create("com.fr.plugin5", "1", "plugin5")); - TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("com.fr.plugin3", "1")); - // not install - TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("com.fr.plugin1", "1")); - TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("com.fr.plugin4", "1")); - - Multimap pendingPlugins = TemplateIOErrorContextHolder.getPendingPlugin(); - - Reflect.on(DesignerAppUtils.class).call("rearrange",pendingPlugins).get(); - Assert.assertEquals(1,pendingPlugins.get(TemplateIOErrorContextHolder.UNKNOWN_PLUGIN).size()); - Collection pluginMarkerAdapters = pendingPlugins.get(TemplateIOErrorContextHolder.DISABLE_PLUGIN); - Assert.assertEquals(2, pluginMarkerAdapters.size()); - pluginMarkerAdapters.contains(PluginMarker.create("com.fr.plugin3", "1")); - pluginMarkerAdapters.contains(PluginMarker.create("com.fr.plugin4", "1")); - Collection pluginMarkerAdapters1 = pendingPlugins.get(TemplateIOErrorContextHolder.NOT_INSTALLED_PLUGIN); - Assert.assertEquals(1, pluginMarkerAdapters1.size()); - pluginMarkerAdapters1.contains(PluginMarker.create("com.fr.plugin5","1")); - } } From 006ecfe883c8665a5f70080fe566ac1d1c5e5af4 Mon Sep 17 00:00:00 2001 From: eason Date: Thu, 9 Sep 2021 15:14:42 +0800 Subject: [PATCH 2/5] =?UTF-8?q?CHART-20402=20=E5=A2=9E=E5=8A=A0=E5=87=A0?= =?UTF-8?q?=E4=B8=AA=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/app/DesignerAppUtilsTest.java | 80 ++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/test/java/com/fr/design/mainframe/app/DesignerAppUtilsTest.java b/designer-realize/src/test/java/com/fr/design/mainframe/app/DesignerAppUtilsTest.java index 62d0931b55..46aa574e90 100644 --- a/designer-realize/src/test/java/com/fr/design/mainframe/app/DesignerAppUtilsTest.java +++ b/designer-realize/src/test/java/com/fr/design/mainframe/app/DesignerAppUtilsTest.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe.app; import com.fr.invoke.Reflect; import com.fr.plugin.context.PluginMarker; import com.fr.plugin.context.PluginMarkerAdapter; +import com.fr.plugin.engine.remote.PluginRemoteSync; import com.fr.stable.TemplateIOErrorContextHolder; import com.fr.third.guava.collect.Multimap; import org.easymock.EasyMock; @@ -23,6 +24,83 @@ import java.util.HashSet; * Created by vito on 2021/5/31 */ @RunWith(PowerMockRunner.class) +@PrepareForTest({PluginRemoteSync.class}) public class DesignerAppUtilsTest { + @Test + public void testDealWithErrorDetailMultiLineAndCache() { + TemplateIOErrorContextHolder.registerPluginNameMap(new HashMap() {{ + put("2", "好用的插件"); + }},new HashSet<>()); + TemplateIOErrorContextHolder.addNeedEnablePlugin(PluginMarkerAdapter.create("1", "1.0", "1插件")); + TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("2", "1.0")); + TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("3", "1.0")); + String log = DesignerAppUtils.dealWithErrorDetailMultiLineAndCache("template1"); + Assert.assertTrue(log.contains("1插件")); + Assert.assertTrue(log.contains("好用的插件")); + Assert.assertTrue(log.contains("3")); + Multimap map = DesignerAppUtils.popPluginInfoMap("template1"); + Assert.assertEquals(3, map.size()); + Assert.assertNull(DesignerAppUtils.popPluginInfoMap("template1")); + } -} + @Test + public void testInvalidatePlugins() { + TemplateIOErrorContextHolder.registerPluginNameMap(new HashMap() {{ + put("2", "好用的插件"); + }},new HashSet<>()); + TemplateIOErrorContextHolder.addNeedEnablePlugin(PluginMarkerAdapter.create("1", "1.0", "1插件")); + TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("2", "1.0")); + TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("3", "1.0")); + String log = DesignerAppUtils.dealWithErrorDetailMultiLineAndCache("template1"); + Assert.assertTrue(log.contains("1插件")); + Assert.assertTrue(log.contains("好用的插件")); + Assert.assertTrue(log.contains("3")); + DesignerAppUtils.invalidatePlugins("template1"); + Assert.assertNull(DesignerAppUtils.popPluginInfoMap("template1")); + } + + @Test + public void testRearrange(){ + // 远程插件模拟注册 + PluginRemoteSync pluginRemoteSync = EasyMock.createMock(PluginRemoteSync.class); + EasyMock.expect(pluginRemoteSync.getPluginRemoteStatusByIdIndex()).andReturn(new HashMap(){{ + put("com.fr.plugin1", Reflect.on(PluginRemoteSync.PluginStatus.class).call("create","com.fr.plugin1","1",true).get()); + put("com.fr.plugin2", Reflect.on(PluginRemoteSync.PluginStatus.class).call("create","com.fr.plugin2","1",true).get()); + put("com.fr.plugin3", Reflect.on(PluginRemoteSync.PluginStatus.class).call("create","com.fr.plugin3","1",false).get()); + put("com.fr.plugin4", Reflect.on(PluginRemoteSync.PluginStatus.class).call("create","com.fr.plugin4","1",false).get()); + }}).anyTimes(); + EasyMock.replay(pluginRemoteSync); + PowerMock.mockStaticPartial(PluginRemoteSync.class, "getInstance"); + EasyMock.expect(PluginRemoteSync.getInstance()).andReturn(pluginRemoteSync).anyTimes(); + PowerMock.replay(PluginRemoteSync.class); + + // 本地插件模拟检查 + TemplateIOErrorContextHolder.registerPluginNameMap(new HashMap() {{ + put("com.fr.plugin1", "好用的插件1"); + put("com.fr.plugin2", "好用的插件2"); + put("com.fr.plugin3", "好用的插件3"); + put("com.fr.plugin4", "好用的插件4"); + put("com.fr.plugin5", "好用的插件5"); + }},new HashSet<>()); + // unknown + TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("com.fr.plugin7", "1")); + // disable + TemplateIOErrorContextHolder.addNeedEnablePlugin(PluginMarkerAdapter.create("com.fr.plugin5", "1", "plugin5")); + TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("com.fr.plugin3", "1")); + // not install + TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("com.fr.plugin1", "1")); + TemplateIOErrorContextHolder.addNeedInstallPlugin(PluginMarker.create("com.fr.plugin4", "1")); + + Multimap pendingPlugins = TemplateIOErrorContextHolder.getPendingPlugin(); + + Reflect.on(DesignerAppUtils.class).call("rearrange",pendingPlugins).get(); + Assert.assertEquals(1,pendingPlugins.get(TemplateIOErrorContextHolder.UNKNOWN_PLUGIN).size()); + Collection pluginMarkerAdapters = pendingPlugins.get(TemplateIOErrorContextHolder.DISABLE_PLUGIN); + Assert.assertEquals(2, pluginMarkerAdapters.size()); + pluginMarkerAdapters.contains(PluginMarker.create("com.fr.plugin3", "1")); + pluginMarkerAdapters.contains(PluginMarker.create("com.fr.plugin4", "1")); + Collection pluginMarkerAdapters1 = pendingPlugins.get(TemplateIOErrorContextHolder.NOT_INSTALLED_PLUGIN); + Assert.assertEquals(1, pluginMarkerAdapters1.size()); + pluginMarkerAdapters1.contains(PluginMarker.create("com.fr.plugin5","1")); + } +} \ No newline at end of file From 20690cbd72b1484a0f40bf8e7b10c5918d581ca3 Mon Sep 17 00:00:00 2001 From: eason Date: Thu, 9 Sep 2021 15:15:35 +0800 Subject: [PATCH 3/5] =?UTF-8?q?CHART-20402=20=E5=A2=9E=E5=8A=A0=E5=87=A0?= =?UTF-8?q?=E4=B8=AA=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/DesignerEnvManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index 91c2225973..9c23dcc51a 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -1645,7 +1645,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { public boolean isOpenDebug() { - return true; + return openDebug; } public void setOpenDebug(boolean openDebug) { From ad415c8129939097763430884c5859397b680025 Mon Sep 17 00:00:00 2001 From: eason Date: Thu, 9 Sep 2021 17:52:15 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=96=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/ui/ModernUIPane.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java index b9e6d7330e..38ff6dbb64 100644 --- a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java @@ -11,6 +11,7 @@ import com.fr.web.struct.AssembleComponent; import com.teamdev.jxbrowser.browser.callback.InjectJsCallback; import com.teamdev.jxbrowser.chromium.Browser; import com.teamdev.jxbrowser.chromium.BrowserType; +import com.teamdev.jxbrowser.chromium.JSObject; import com.teamdev.jxbrowser.chromium.JSValue; import com.teamdev.jxbrowser.chromium.events.LoadListener; import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; @@ -179,6 +180,15 @@ public class ModernUIPane extends BasicPane { } } + public JSObject getEmptyJSObjectV6() { + + if (browser != null) { + return browser.executeJavaScriptAndReturnValue("var __props__ = {};__props__").asObject(); + } + + return null; + } + public static class Builder implements BuilderDiff { private ModernUIPane pane; From 1248729a97b44d788b8f2b1408301793f7d43410 Mon Sep 17 00:00:00 2001 From: eason Date: Thu, 9 Sep 2021 17:54:34 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=96=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java index 38ff6dbb64..10732e9b0b 100644 --- a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java @@ -183,7 +183,7 @@ public class ModernUIPane extends BasicPane { public JSObject getEmptyJSObjectV6() { if (browser != null) { - return browser.executeJavaScriptAndReturnValue("var __props__ = {};__props__").asObject(); + return browser.executeJavaScriptAndReturnValue("var __empty_props__ = {};__empty_props__").asObject(); } return null;