From da26d091fe513978e282fbd6bb88b7e9ed202f84 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 21 Jun 2017 19:39:53 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-2354=20=E5=B0=86=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E7=9A=84=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86=E5=92=8C=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E7=9A=84=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/PluginOperateUtils.java | 2 +- .../design/extra/exe/callback/InstallFromDiskCallback.java | 6 ++---- .../design/extra/exe/callback/UpdateFromDiskCallback.java | 6 ++---- .../fr/design/extra/exe/callback/UpdateOnlineCallback.java | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/PluginOperateUtils.java b/designer_base/src/com/fr/design/extra/PluginOperateUtils.java index eee7cfb8f0..516d1f0e19 100644 --- a/designer_base/src/com/fr/design/extra/PluginOperateUtils.java +++ b/designer_base/src/com/fr/design/extra/PluginOperateUtils.java @@ -61,7 +61,7 @@ public class PluginOperateUtils { JSONObject latestPluginInfo = PluginUtils.getLatestPluginInfo(pluginMarker.getPluginID()); String latestPluginVersion = (String) latestPluginInfo.get("version"); PluginMarker toPluginMarker = PluginMarker.create(pluginMarker.getPluginID(), latestPluginVersion); - PluginManager.getController().download(pluginMarker, new DownloadCallback(new UpdatePluginTask(pluginMarker, toPluginMarker, jsCallback), jsCallback)); + PluginManager.getController().download(toPluginMarker, new DownloadCallback(new UpdatePluginTask(pluginMarker, toPluginMarker, jsCallback), jsCallback)); } catch (Exception e) { FRContext.getLogger().error(e.getMessage(), e); } diff --git a/designer_base/src/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java b/designer_base/src/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java index cd5b44b50e..16c46ebe7d 100644 --- a/designer_base/src/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java +++ b/designer_base/src/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java @@ -36,11 +36,9 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback { @Override public void done(PluginTaskResult result) { if (result.isSuccess()) { - PluginContext pluginContext = PluginManager.getContext(pluginMarker); - String pluginName = pluginContext.getName(); jsCallback.execute("success"); - FRLogger.getLogger().info(pluginName + Inter.getLocText("FR-Designer-Plugin_Install_Success")); - JOptionPane.showMessageDialog(null, pluginName + Inter.getLocText("FR-Designer-Plugin_Install_Success")); + FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Install_Success")); + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Install_Success")); } else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) { int rv = JOptionPane.showOptionDialog( null, diff --git a/designer_base/src/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java b/designer_base/src/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java index 42aa922fd6..8a37b7b7db 100644 --- a/designer_base/src/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java +++ b/designer_base/src/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java @@ -36,11 +36,9 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback { @Override public void done(PluginTaskResult result) { if (result.isSuccess()) { - PluginContext pluginContext = PluginManager.getContext(pluginMarker); - String pluginName = pluginContext.getName(); jsCallback.execute("success"); - FRLogger.getLogger().info(pluginName + Inter.getLocText("FR-Designer-Plugin_Update_Success")); - JOptionPane.showMessageDialog(null, pluginName + Inter.getLocText("FR-Designer-Plugin_Update_Success")); + FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Update_Success")); + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Update_Success")); } else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) { int rv = JOptionPane.showOptionDialog( null, diff --git a/designer_base/src/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java b/designer_base/src/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java index 720a6da839..f68f34b952 100644 --- a/designer_base/src/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java +++ b/designer_base/src/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java @@ -35,7 +35,7 @@ public class UpdateOnlineCallback extends AbstractPluginTaskCallback { @Override public void done(PluginTaskResult result) { if (result.isSuccess()) { - PluginContext pluginContext = PluginManager.getContext(pluginMarker); + PluginContext pluginContext = PluginManager.getContext(toPluginMarker); String pluginName = pluginContext.getName(); jsCallback.execute("success"); FRLogger.getLogger().info(pluginName + Inter.getLocText("FR-Designer-Plugin_Update_Success"));