Browse Source

Merge pull request #951 in BA/design from ~KERRY/design:9.0 to 9.0

* commit 'f4c905c572f22e617818de2ddc8a9bfeaf03e1d7':
  REPORT-2354 将平台的插件管理和设计器的插件管理统一
master
superman 8 years ago
parent
commit
cf3cca4e6b
  1. 2
      designer_base/src/com/fr/design/extra/PluginOperateUtils.java
  2. 6
      designer_base/src/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java
  3. 6
      designer_base/src/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java
  4. 2
      designer_base/src/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java

2
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);
}

6
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,

6
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,

2
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"));

Loading…
Cancel
Save