Browse Source

REPORT-2354 将平台的插件管理和设计器的插件管理统一起来

master
kerry 8 years ago
parent
commit
88a2c6d11e
  1. 16
      designer_base/src/com/fr/design/extra/PluginOperateUtils.java
  2. 4
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties

16
designer_base/src/com/fr/design/extra/PluginOperateUtils.java

@ -3,9 +3,7 @@ package com.fr.design.extra;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.extra.exe.callback.*; 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.InstallPluginTask;
import com.fr.design.extra.exe.extratask.UpdateDependenceTask;
import com.fr.design.extra.exe.extratask.UpdatePluginTask; import com.fr.design.extra.exe.extratask.UpdatePluginTask;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
@ -46,9 +44,6 @@ public class PluginOperateUtils {
PluginManager.getController().install(zipFile, new InstallFromDiskCallback(zipFile, jsCallback)); 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<PluginMarker> pluginMarkerList, JSCallback jsCallback) { public static void updatePluginOnline(List<PluginMarker> pluginMarkerList, JSCallback jsCallback) {
if (!(BBSPluginLogin.getInstance().hasLogin())) { if (!(BBSPluginLogin.getInstance().hasLogin())) {
@ -78,17 +73,6 @@ public class PluginOperateUtils {
PluginManager.getController().update(new File(filePath), new UpdateFromDiskCallback(new File(filePath), 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) { public static void setPluginActive(String pluginInfo, JSCallback jsCallback) {
PluginMarker pluginMarker = PluginUtils.createPluginMarker(pluginInfo); PluginMarker pluginMarker = PluginUtils.createPluginMarker(pluginInfo);

4
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -2001,7 +2001,7 @@ FR-Designer_Alphafine=AlphaFine\u667A\u80FD\u641C\u7D22
FR-Designer-Alphafine_No_Remind=\u4E0D\u518D\u63D0\u793A FR-Designer-Alphafine_No_Remind=\u4E0D\u518D\u63D0\u793A
FR-Designer-Plugin_Install_Success=\u63D2\u4EF6\u5B89\u88C5\u6210\u529F 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_Failed=\u63D2\u4EF6\u5B89\u88C5\u5931\u8D25
FR-Designer-Plugin_Install_Dependence=\u662F\u5426\u5B89\u88C5\u4F9D\u8D56\u73AF\u5883 FR-Designer-Plugin_Install_Dependence=\u662F\u5426\u5B89\u88C5\u4F9D\u8D56\u63D2\u4EF6
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_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_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-Install_Package=\u63D2\u4EF6\u5B89\u88C5\u5305
@ -2013,7 +2013,7 @@ FR-Designer-Plugin_Delete_Confirmed=\u786E\u5B9A\u5220\u9664\u6B64\u63D2\u4EF6\u
FR-Designer-Plugin_Delete_Dependence=\u662F\u5426\u5220\u9664\u4F9D\u8D56\u73AF\u5883 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_Success=\u63D2\u4EF6\u5220\u9664\u6210\u529F
FR-Designer-Plugin_Delete_Failed=\u63D2\u4EF6\u5220\u9664\u5931\u8D25 FR-Designer-Plugin_Delete_Failed=\u63D2\u4EF6\u5220\u9664\u5931\u8D25
FR-Designer-Plugin_Update_Dependence=\u662F\u5426\u66F4\u65B0\u4F9D\u8D56\u73AF\u5883 FR-Designer-Plugin_Update_Dependence=\u662F\u5426\u66F4\u65B0\u4F9D\u8D56\u63D2\u4EF6
FR-Designer-Plugin_Update_Success=\u63D2\u4EF6\u66F4\u65B0\u6210\u529F FR-Designer-Plugin_Update_Success=\u63D2\u4EF6\u66F4\u65B0\u6210\u529F
FR-Designer-Plugin_Update_Failed=\u63D2\u4EF6\u66F4\u65B0\u5931\u8D25 FR-Designer-Plugin_Update_Failed=\u63D2\u4EF6\u66F4\u65B0\u5931\u8D25
FR-Designer-Plugin_Actived=\u63D2\u4EF6\u5DF2\u88AB\u542F\u7528 FR-Designer-Plugin_Actived=\u63D2\u4EF6\u5DF2\u88AB\u542F\u7528

Loading…
Cancel
Save