diff --git a/designer_base/src/com/fr/design/extra/PluginOperateUtils.java b/designer_base/src/com/fr/design/extra/PluginOperateUtils.java index 5b4f44515a..6515a4ce3e 100644 --- a/designer_base/src/com/fr/design/extra/PluginOperateUtils.java +++ b/designer_base/src/com/fr/design/extra/PluginOperateUtils.java @@ -3,9 +3,12 @@ package com.fr.design.extra; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.extra.exe.callback.*; +import com.fr.design.extra.exe.extratask.InstallDependenceTask; import com.fr.design.extra.exe.extratask.InstallPluginTask; +import com.fr.design.extra.exe.extratask.UpdateDependenceTask; import com.fr.design.extra.exe.extratask.UpdatePluginTask; import com.fr.general.FRLogger; +import com.fr.general.Inter; import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; @@ -19,6 +22,7 @@ import com.fr.plugin.manage.control.PluginTaskCallback; import com.fr.plugin.view.PluginView; import com.fr.stable.StringUtils; +import javax.swing.*; import java.io.File; import java.util.List; @@ -28,12 +32,11 @@ import java.util.List; */ public class PluginOperateUtils { - public static void installPluginOnline(final String pluginInfo, JSCallback jsCallback) { + public static void installPluginOnline(final PluginMarker pluginMarker, JSCallback jsCallback) { //下载插件 if (!BBSPluginLogin.getInstance().hasLogin()) { LoginCheckContext.fireLoginCheckListener(); } - PluginMarker pluginMarker = PluginUtils.createPluginMarker(pluginInfo); if (BBSPluginLogin.getInstance().hasLogin()) { PluginManager.getController().download(pluginMarker, new DownloadCallback(new InstallPluginTask(pluginMarker, jsCallback), jsCallback)); } @@ -43,29 +46,50 @@ public class PluginOperateUtils { PluginManager.getController().install(zipFile, new InstallFromDiskCallback(zipFile, jsCallback)); } + public static void installPluginDependence(PluginMarker pluginMarker, JSCallback jsCallback){ + PluginManager.getController().download(pluginMarker, new DownloadCallback(new InstallDependenceTask(pluginMarker, jsCallback), jsCallback)); + } + public static void updatePluginOnline(List pluginMarkerList, JSCallback jsCallback) { if (!(BBSPluginLogin.getInstance().hasLogin())) { LoginCheckContext.fireLoginCheckListener(); } if (BBSPluginLogin.getInstance().hasLogin()) { for (int i = 0; i < pluginMarkerList.size(); i++) { - try { - JSONObject latestPluginInfo = PluginUtils.getLatestPluginInfo(pluginMarkerList.get(i).getPluginID()); - String latestPluginVersion = (String) latestPluginInfo.get("version"); - PluginMarker pluginMarker = pluginMarkerList.get(i); - PluginMarker toPluginMarker = PluginMarker.create(pluginMarkerList.get(i).getPluginID(), latestPluginVersion); - PluginManager.getController().download(pluginMarkerList.get(i), new DownloadCallback(new UpdatePluginTask(pluginMarker, toPluginMarker, jsCallback), jsCallback)); - } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); - } + updatePluginOnline(pluginMarkerList.get(i), jsCallback); } } } + public static void updatePluginOnline(PluginMarker pluginMarker, JSCallback jsCallback) { + try { + 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)); + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + } + + } + + public static void updatePluginFromDisk(final String filePath, JSCallback jsCallback) { PluginManager.getController().update(new File(filePath), new UpdateFromDiskCallback(new File(filePath), jsCallback)); } + public static void updatePluginDependence(PluginMarker pluginMarker, JSCallback jsCallback){ + try { + 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 UpdateDependenceTask(pluginMarker, toPluginMarker, jsCallback), jsCallback)); + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + } + + } + public static void setPluginActive(String pluginInfo, JSCallback jsCallback) { PluginMarker pluginMarker = PluginUtils.createPluginMarker(pluginInfo); PluginContext plugin = PluginManager.getContext(pluginMarker); @@ -79,8 +103,17 @@ public class PluginOperateUtils { } public static void uninstallPlugin(final String pluginInfo, final boolean isForce, JSCallback jsCallback) { - PluginMarker pluginMarker = PluginUtils.createPluginMarker(pluginInfo); - PluginManager.getController().uninstall(pluginMarker, isForce, new UninstallPluginCallback(pluginMarker, jsCallback)); + int rv = JOptionPane.showConfirmDialog( + null, + Inter.getLocText("FR-Designer-Plugin_Delete_Confirmed"), + Inter.getLocText("FR-Designer-Plugin_Warning"), + JOptionPane.OK_CANCEL_OPTION, + JOptionPane.INFORMATION_MESSAGE + ); + if (rv == JOptionPane.OK_OPTION) { + PluginMarker pluginMarker = PluginUtils.createPluginMarker(pluginInfo); + PluginManager.getController().uninstall(pluginMarker, isForce, new UninstallPluginCallback(pluginMarker, jsCallback)); + } } public static void readUpdateOnline(final JSCallback jsCallback) { @@ -237,7 +270,7 @@ public class PluginOperateUtils { } public static void getLoginInfo(JSCallback jsCallback) { - + if (!BBSPluginLogin.getInstance().hasLogin()) { String userName = DesignerEnvManager.getEnvManager().getBBSName(); String password = DesignerEnvManager.getEnvManager().getBBSPassword(); diff --git a/designer_base/src/com/fr/design/extra/PluginWebBridge.java b/designer_base/src/com/fr/design/extra/PluginWebBridge.java index 126a85fa95..b468f351d3 100644 --- a/designer_base/src/com/fr/design/extra/PluginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/PluginWebBridge.java @@ -148,7 +148,8 @@ public class PluginWebBridge { */ public void installPluginOnline(final String pluginInfo, final JSObject callback) { JSCallback jsCallback = new JSCallback(webEngine, callback); - PluginOperateUtils.installPluginOnline(pluginInfo, jsCallback); + PluginMarker pluginMarker = PluginUtils.createPluginMarker(pluginInfo); + PluginOperateUtils.installPluginOnline(pluginMarker, jsCallback); } diff --git a/designer_base/src/com/fr/design/extra/exe/callback/InstallDependenceCallback.java b/designer_base/src/com/fr/design/extra/exe/callback/InstallDependenceCallback.java new file mode 100644 index 0000000000..4edc0c112e --- /dev/null +++ b/designer_base/src/com/fr/design/extra/exe/callback/InstallDependenceCallback.java @@ -0,0 +1,38 @@ +package com.fr.design.extra.exe.callback; + +import com.fr.general.FRLogger; +import com.fr.general.Inter; +import com.fr.plugin.context.PluginMarker; +import com.fr.plugin.manage.control.PluginTaskResult; + +import javax.swing.*; + +/** + * Created by ibm on 2017/6/21. + */ +public class InstallDependenceCallback extends AbstractPluginTaskCallback { + protected JSCallback jsCallback; + private static int HUNDRED_PERCENT = 100; + + public InstallDependenceCallback(PluginMarker pluginMarker, JSCallback jsCallback){ + this.pluginMarker = pluginMarker; + this.jsCallback = jsCallback; + } + + @Override + public void updateProgress(String description, double aProgress) { + jsCallback.execute(String.valueOf(aProgress * HUNDRED_PERCENT + "%")); + } + + + @Override + public void done(PluginTaskResult result) { + if (result.isSuccess()) { + FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin-Install_Dependence_Success")); + }else { + FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin-Install_Dependence_Failed")); + JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE); + } + } +} + 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 7a3f4be6c9..317293e4e3 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 @@ -1,13 +1,17 @@ package com.fr.design.extra.exe.callback; +import com.fr.design.extra.PluginOperateUtils; import com.fr.general.FRLogger; import com.fr.general.Inter; +import com.fr.plugin.context.PluginMarker; import com.fr.plugin.error.PluginErrorCode; import com.fr.plugin.manage.PluginManager; +import com.fr.plugin.manage.control.PluginTask; import com.fr.plugin.manage.control.PluginTaskResult; import javax.swing.*; import java.io.File; +import java.util.List; /** * Created by ibm on 2017/5/26. @@ -30,8 +34,8 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback { @Override public void done(PluginTaskResult result) { - jsCallback.execute("success"); if (result.isSuccess()) { + jsCallback.execute("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) { @@ -48,8 +52,29 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback { if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { return; } + List pluginTasks = result.getPreTasks(); + for(PluginTask pluginTask : pluginTasks){ + PluginMarker marker = pluginTask.getMarker(); + PluginOperateUtils.installPluginDependence(marker, jsCallback); + } PluginManager.getController().install(zipFile, new InstallFromDiskCallback(zipFile, jsCallback)); - } else { + } else if(result.errorCode() == PluginErrorCode.HasLowerPluginWhenInstall){ + int rv = JOptionPane.showOptionDialog( + null, + Inter.getLocText("FR-Designer-Plugin_Has_Install_Lower"), + Inter.getLocText("FR-Designer-Plugin_Warning"), + JOptionPane.YES_NO_CANCEL_OPTION, + JOptionPane.INFORMATION_MESSAGE, + null, + null, + null + ); + if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { + return; + } + PluginOperateUtils.updatePluginOnline(pluginMarker, jsCallback); + }else { + jsCallback.execute("failed"); FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Install_Failed")); JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE); } diff --git a/designer_base/src/com/fr/design/extra/exe/callback/InstallOnlineCallback.java b/designer_base/src/com/fr/design/extra/exe/callback/InstallOnlineCallback.java index f13e55fa06..e0f678c169 100644 --- a/designer_base/src/com/fr/design/extra/exe/callback/InstallOnlineCallback.java +++ b/designer_base/src/com/fr/design/extra/exe/callback/InstallOnlineCallback.java @@ -1,13 +1,15 @@ package com.fr.design.extra.exe.callback; +import com.fr.design.extra.PluginOperateUtils; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.plugin.context.PluginMarker; import com.fr.plugin.error.PluginErrorCode; -import com.fr.plugin.manage.PluginManager; +import com.fr.plugin.manage.control.PluginTask; import com.fr.plugin.manage.control.PluginTaskResult; import javax.swing.*; +import java.util.List; /** * Created by ibm on 2017/5/26. @@ -29,8 +31,8 @@ public class InstallOnlineCallback extends AbstractPluginTaskCallback { @Override public void done(PluginTaskResult result) { - jsCallback.execute("success"); if (result.isSuccess()) { + jsCallback.execute("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) { @@ -47,9 +49,30 @@ public class InstallOnlineCallback extends AbstractPluginTaskCallback { if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { return; } + List pluginTasks = result.getPreTasks(); + for(PluginTask pluginTask : pluginTasks){ + PluginMarker marker = pluginTask.getMarker(); + PluginOperateUtils.installPluginDependence(marker, jsCallback ); + } //执行JS回调 - PluginManager.getController().install(pluginMarker, new InstallOnlineCallback(pluginMarker, jsCallback)); - } else { + PluginOperateUtils.installPluginOnline(pluginMarker, jsCallback); + } else if(result.errorCode() == PluginErrorCode.HasLowerPluginWhenInstall){ + int rv = JOptionPane.showOptionDialog( + null, + Inter.getLocText("FR-Designer-Plugin_Has_Install_Lower"), + Inter.getLocText("FR-Designer-Plugin_Warning"), + JOptionPane.YES_NO_CANCEL_OPTION, + JOptionPane.INFORMATION_MESSAGE, + null, + null, + null + ); + if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { + return; + } + PluginOperateUtils.updatePluginOnline(pluginMarker, jsCallback); + }else { + jsCallback.execute("failed"); FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Install_Failed")); JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE); } diff --git a/designer_base/src/com/fr/design/extra/exe/callback/UninstallPluginCallback.java b/designer_base/src/com/fr/design/extra/exe/callback/UninstallPluginCallback.java index 0a9664d5e7..9342b2b601 100644 --- a/designer_base/src/com/fr/design/extra/exe/callback/UninstallPluginCallback.java +++ b/designer_base/src/com/fr/design/extra/exe/callback/UninstallPluginCallback.java @@ -42,6 +42,7 @@ public class UninstallPluginCallback extends AbstractPluginTaskCallback { } PluginManager.getController().uninstall(pluginMarker, true, new UninstallPluginCallback(pluginMarker, jsCallback)); } else { + jsCallback.execute("failed"); FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Delete_Failed")); JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE); } diff --git a/designer_base/src/com/fr/design/extra/exe/callback/UpdateDependenceCallback.java b/designer_base/src/com/fr/design/extra/exe/callback/UpdateDependenceCallback.java new file mode 100644 index 0000000000..47e6bc20f7 --- /dev/null +++ b/designer_base/src/com/fr/design/extra/exe/callback/UpdateDependenceCallback.java @@ -0,0 +1,39 @@ +package com.fr.design.extra.exe.callback; + +import com.fr.general.FRLogger; +import com.fr.general.Inter; +import com.fr.plugin.context.PluginMarker; +import com.fr.plugin.manage.control.PluginTaskResult; + +import javax.swing.*; + +/** + * Created by ibm on 2017/6/21. + */ +public class UpdateDependenceCallback extends AbstractPluginTaskCallback { + public PluginMarker toPluginMarker; + protected JSCallback jsCallback; + private static int HUNDRED_PERCENT = 100; + + public UpdateDependenceCallback(PluginMarker pluginMarker, PluginMarker toPluginMarker, JSCallback jsCallback){ + this.pluginMarker = pluginMarker; + this.toPluginMarker = toPluginMarker; + this.jsCallback = jsCallback; + } + + @Override + public void updateProgress(String description, double aProgress) { + jsCallback.execute(String.valueOf(aProgress * HUNDRED_PERCENT + "%")); + } + + + @Override + public void done(PluginTaskResult result) { + if (result.isSuccess()) { + FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin-Update_Dependence_Success")); + }else { + FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin-Update_Dependence_Failed")); + JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE); + } + } +} \ No newline at end of file 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 10d8cd82b3..ea3883609a 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 @@ -1,13 +1,17 @@ package com.fr.design.extra.exe.callback; +import com.fr.design.extra.PluginOperateUtils; import com.fr.general.FRLogger; import com.fr.general.Inter; +import com.fr.plugin.context.PluginMarker; import com.fr.plugin.error.PluginErrorCode; import com.fr.plugin.manage.PluginManager; +import com.fr.plugin.manage.control.PluginTask; import com.fr.plugin.manage.control.PluginTaskResult; import javax.swing.*; import java.io.File; +import java.util.List; /** * Created by ibm on 2017/5/27. @@ -30,8 +34,8 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback { @Override public void done(PluginTaskResult result) { - jsCallback.execute("success"); if (result.isSuccess()) { + jsCallback.execute("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) { @@ -48,8 +52,29 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback { if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { return; } + List pluginTasks = result.getPreTasks(); + for(PluginTask pluginTask : pluginTasks){ + PluginMarker marker = pluginTask.getMarker(); + PluginOperateUtils.updatePluginDependence(marker, jsCallback); + } PluginManager.getController().update(zipFile, new UpdateFromDiskCallback(zipFile, jsCallback)); - } else { + } else if(result.errorCode() == PluginErrorCode.NoPluginToUpdate){ + int rv = JOptionPane.showOptionDialog( + null, + Inter.getLocText("FR-Designer-Plugin_No_Plugin_Update"), + Inter.getLocText("FR-Designer-Plugin_Warning"), + JOptionPane.YES_NO_CANCEL_OPTION, + JOptionPane.INFORMATION_MESSAGE, + null, + null, + null + ); + if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { + return; + } + PluginOperateUtils.installPluginFromDisk(zipFile, jsCallback); + }else { + jsCallback.execute("failed"); FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Update_Failed")); JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE); } 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 91bf4983c1..ca9876b560 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 @@ -1,13 +1,16 @@ package com.fr.design.extra.exe.callback; +import com.fr.design.extra.PluginOperateUtils; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.plugin.context.PluginMarker; import com.fr.plugin.error.PluginErrorCode; import com.fr.plugin.manage.PluginManager; +import com.fr.plugin.manage.control.PluginTask; import com.fr.plugin.manage.control.PluginTaskResult; import javax.swing.*; +import java.util.List; /** * Created by ibm on 2017/5/26. @@ -30,8 +33,8 @@ public class UpdateOnlineCallback extends AbstractPluginTaskCallback { @Override public void done(PluginTaskResult result) { - jsCallback.execute("success"); if (result.isSuccess()) { + jsCallback.execute("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) { @@ -48,8 +51,14 @@ public class UpdateOnlineCallback extends AbstractPluginTaskCallback { if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { return; } + List pluginTasks = result.getPreTasks(); + for(PluginTask pluginTask : pluginTasks){ + PluginMarker marker = pluginTask.getMarker(); + PluginOperateUtils.updatePluginDependence(marker, jsCallback); + } PluginManager.getController().update(pluginMarker, toPluginMarker, new UpdateOnlineCallback(pluginMarker, toPluginMarker, jsCallback)); } else { + jsCallback.execute("failed"); FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Update_Failed")); JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE); } diff --git a/designer_base/src/com/fr/design/extra/exe/extratask/InstallDependenceTask.java b/designer_base/src/com/fr/design/extra/exe/extratask/InstallDependenceTask.java new file mode 100644 index 0000000000..4c0d731ff6 --- /dev/null +++ b/designer_base/src/com/fr/design/extra/exe/extratask/InstallDependenceTask.java @@ -0,0 +1,24 @@ +package com.fr.design.extra.exe.extratask; + +import com.fr.design.extra.exe.callback.InstallDependenceCallback; +import com.fr.design.extra.exe.callback.JSCallback; +import com.fr.plugin.context.PluginMarker; +import com.fr.plugin.manage.PluginManager; + +/** + * Created by ibm on 2017/6/21. + */ +public class InstallDependenceTask extends AbstractExtraPluginTask { + protected JSCallback jsCallback; + + + public InstallDependenceTask(PluginMarker pluginMarker, JSCallback jsCallback) { + this.pluginMarker = pluginMarker; + this.jsCallback = jsCallback; + } + + @Override + public void doExtraPluginTask() { + PluginManager.getController().install(pluginMarker, new InstallDependenceCallback(pluginMarker, jsCallback)); + } +} \ No newline at end of file diff --git a/designer_base/src/com/fr/design/extra/exe/extratask/UpdateDependenceTask.java b/designer_base/src/com/fr/design/extra/exe/extratask/UpdateDependenceTask.java new file mode 100644 index 0000000000..2751fb7e6c --- /dev/null +++ b/designer_base/src/com/fr/design/extra/exe/extratask/UpdateDependenceTask.java @@ -0,0 +1,26 @@ +package com.fr.design.extra.exe.extratask; + +import com.fr.design.extra.exe.callback.JSCallback; +import com.fr.design.extra.exe.callback.UpdateDependenceCallback; +import com.fr.plugin.context.PluginMarker; +import com.fr.plugin.manage.PluginManager; + +/** + * Created by ibm on 2017/6/21. + */ +public class UpdateDependenceTask extends AbstractExtraPluginTask { + + public PluginMarker toPluginMarker; + protected JSCallback jsCallback; + + public UpdateDependenceTask(PluginMarker pluginMarker, PluginMarker toPluginMarker, JSCallback jsCallback) { + this.pluginMarker = pluginMarker; + this.toPluginMarker = toPluginMarker; + this.jsCallback = jsCallback; + } + + @Override + public void doExtraPluginTask() { + PluginManager.getController().update(pluginMarker, toPluginMarker, new UpdateDependenceCallback(pluginMarker, toPluginMarker, jsCallback)); + } +} diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 5e197ba346..c85ee3f37c 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2005,7 +2005,14 @@ FR-Designer-Alphafine_No_Remind= FR-Designer-Plugin_Install_Success= FR-Designer-Plugin_Install_Failed= FR-Designer-Plugin_Install_Dependence= +FR-Designer-Plugin_Has_Install_Lower= +FR-Designer-Plugin_No_Plugin_Update= FR-Designer-Plugin-Install_Package= +FR-Designer-Plugin-Update_Dependence_Success= +FR-Designer-Plugin-Update_Dependence_Failed= +FR-Designer-Plugin-Install_Dependence_Success= +FR-Designer-Plugin-Install_Dependence_Failed= +FR-Designer-Plugin_Delete_Confirmed= FR-Designer-Plugin_Delete_Dependence= FR-Designer-Plugin_Delete_Success= FR-Designer-Plugin_Delete_Failed= diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 0d48fd1849..97529a5dd9 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -2003,7 +2003,14 @@ FR-Designer-Alphafine_No_Remind=don't remind Designer-Plugin_Install_Success= FR-Designer-Plugin_Install_Failed= FR-Designer-Plugin_Install_Dependence= +FR-Designer-Plugin_Has_Install_Lower= +FR-Designer-Plugin_No_Plugin_Update= FR-Designer-Plugin-Install_Package= +FR-Designer-Plugin-Update_Dependence_Success= +FR-Designer-Plugin-Update_Dependence_Failed= +FR-Designer-Plugin-Install_Dependence_Success= +FR-Designer-Plugin-Install_Dependence_Failed= +FR-Designer-Plugin_Delete_Confirmed= FR-Designer-Plugin_Delete_Dependence= FR-Designer-Plugin_Delete_Success= FR-Designer-Plugin_Delete_Failed= diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 45715f666d..ad20056312 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -1985,7 +1985,14 @@ FormulaD-Data_Fields=\u30C7\u30FC\u30BF\u30D5\u30A3\u30FC\u30EB\u30C9 Designer-Plugin_Install_Success= FR-Designer-Plugin_Install_Failed= FR-Designer-Plugin_Install_Dependence= +FR-Designer-Plugin_Has_Install_Lower= +FR-Designer-Plugin_No_Plugin_Update= FR-Designer-Plugin-Install_Package= +FR-Designer-Plugin-Update_Dependence_Success= +FR-Designer-Plugin-Update_Dependence_Failed= +FR-Designer-Plugin-Install_Dependence_Success= +FR-Designer-Plugin-Install_Dependence_Failed= +FR-Designer-Plugin_Delete_Confirmed= FR-Designer-Plugin_Delete_Dependence= FR-Designer-Plugin_Delete_Success= FR-Designer-Plugin_Delete_Failed= diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index d7d7b0401c..112c1eeeb8 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -1986,7 +1986,14 @@ FormulaD-Data_Fields=\uB370\uC774\uD130\uD56D\uBAA9 Designer-Plugin_Install_Success= FR-Designer-Plugin_Install_Failed= FR-Designer-Plugin_Install_Dependence= +FR-Designer-Plugin_Has_Install_Lower= +FR-Designer-Plugin_No_Plugin_Update= FR-Designer-Plugin-Install_Package= +FR-Designer-Plugin-Update_Dependence_Success= +FR-Designer-Plugin-Update_Dependence_Failed= +FR-Designer-Plugin-Install_Dependence_Success= +FR-Designer-Plugin-Install_Dependence_Failed= +FR-Designer-Plugin_Delete_Confirmed= FR-Designer-Plugin_Delete_Dependence= FR-Designer-Plugin_Delete_Success= FR-Designer-Plugin_Delete_Failed= diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index ed27f84a95..2bbcdabe4d 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -2002,7 +2002,14 @@ FR-Designer-Alphafine_No_Remind=\u4E0D\u518D\u63D0\u793A FR-Designer-Plugin_Install_Success=\u63D2\u4EF6\u5B89\u88C5\u6210\u529F FR-Designer-Plugin_Install_Failed=\u63D2\u4EF6\u5B89\u88C5\u5931\u8D25 FR-Designer-Plugin_Install_Dependence=\u662F\u5426\u5B89\u88C5\u4F9D\u8D56\u73AF\u5883 +FR-Designer-Plugin_Has_Install_Lower=\u5DF2\u7ECF\u5B89\u88C5\u4F4E\u7248\u672C\u63D2\u4EF6\uFF0C\u662F\u5426\u8FDB\u884C\u66F4\u65B0\uFF1F +FR-Designer-Plugin_No_Plugin_Update=\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u7684\u63D2\u4EF6\uFF0C\u662F\u5426\u5B89\u88C5\uFF1F FR-Designer-Plugin-Install_Package=\u63D2\u4EF6\u5B89\u88C5\u5305 +FR-Designer-Plugin-Update_Dependence_Success=\u4F9D\u8D56\u63D2\u4EF6\u66F4\u65B0\u6210\u529F +FR-Designer-Plugin-Update_Dependence_Failed=\u4F9D\u8D56\u63D2\u4EF6\u66F4\u65B0\u5931\u8D25 +FR-Designer-Plugin-Install_Dependence_Success=\u4F9D\u8D56\u63D2\u4EF6\u5B89\u88C5\u6210\u529F +FR-Designer-Plugin-Install_Dependence_Failed=\u4F9D\u8D56\u63D2\u4EF6\u5B89\u88C5\u5931\u8D25 +FR-Designer-Plugin_Delete_Confirmed=\u786E\u5B9A\u5220\u9664\u6B64\u63D2\u4EF6\uFF1F FR-Designer-Plugin_Delete_Dependence=\u662F\u5426\u5220\u9664\u4F9D\u8D56\u73AF\u5883 FR-Designer-Plugin_Delete_Success=\u63D2\u4EF6\u5220\u9664\u6210\u529F FR-Designer-Plugin_Delete_Failed=\u63D2\u4EF6\u5220\u9664\u5931\u8D25 diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 4e7fa5056b..0c07222dd2 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -2003,7 +2003,14 @@ FR-Designer-Alphafine_No_Remind=\u4E0D\u518D\u63D0\u793A Designer-Plugin_Install_Success= FR-Designer-Plugin_Install_Failed= FR-Designer-Plugin_Install_Dependence= +FR-Designer-Plugin_Has_Install_Lower= +FR-Designer-Plugin_No_Plugin_Update= FR-Designer-Plugin-Install_Package= +FR-Designer-Plugin-Update_Dependence_Success= +FR-Designer-Plugin-Update_Dependence_Failed= +FR-Designer-Plugin-Install_Dependence_Success= +FR-Designer-Plugin-Install_Dependence_Failed= +FR-Designer-Plugin_Delete_Confirmed= FR-Designer-Plugin_Delete_Dependence= FR-Designer-Plugin_Delete_Success= FR-Designer-Plugin_Delete_Failed=