Browse Source

KERNEL-442 提供可以使用重构过的插件管理器开关(基于FineUI和TypeScript)

bugfix/10.0
richie 6 years ago
parent
commit
f3973fc6fe
  1. 14
      designer-base/src/main/java/com/fr/design/upm/UpmBridge.java
  2. 9
      designer-base/src/main/java/com/fr/design/upm/UpmPane.java

14
designer-base/src/main/java/com/fr/design/upm/UpmBridge.java

@ -2,6 +2,7 @@ package com.fr.design.upm;
import com.fr.base.passport.FinePassportManager; import com.fr.base.passport.FinePassportManager;
import com.fr.config.MarketConfig; import com.fr.config.MarketConfig;
import com.fr.decision.webservice.v10.plugin.helper.category.impl.UpmResourceLoader;
import com.fr.design.bridge.exec.JSBridge; import com.fr.design.bridge.exec.JSBridge;
import com.fr.design.bridge.exec.JSCallback; import com.fr.design.bridge.exec.JSCallback;
import com.fr.design.extra.PluginOperateUtils; import com.fr.design.extra.PluginOperateUtils;
@ -12,6 +13,7 @@ import com.fr.design.extra.exe.GetPluginFromStoreExecutor;
import com.fr.design.extra.exe.PluginLoginExecutor; import com.fr.design.extra.exe.PluginLoginExecutor;
import com.fr.design.extra.exe.ReadUpdateOnlineExecutor; import com.fr.design.extra.exe.ReadUpdateOnlineExecutor;
import com.fr.design.extra.exe.SearchOnlineExecutor; import com.fr.design.extra.exe.SearchOnlineExecutor;
import com.fr.design.i18n.Toolkit;
import com.fr.design.upm.event.CertificateEvent; import com.fr.design.upm.event.CertificateEvent;
import com.fr.design.upm.event.DownloadEvent; import com.fr.design.upm.event.DownloadEvent;
import com.fr.design.upm.exec.UpmBrowserExecutor; import com.fr.design.upm.exec.UpmBrowserExecutor;
@ -59,10 +61,20 @@ public class UpmBridge {
} }
public void startDownload() { public void startDownload() {
// do something..... try {
UpmResourceLoader.INSTANCE.download();
UpmResourceLoader.INSTANCE.install();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
EventDispatcher.fire(DownloadEvent.FINISH, "start"); EventDispatcher.fire(DownloadEvent.FINISH, "start");
} }
@JSBridge
public String i18nText(String key) {
return Toolkit.i18nText(key);
}
@JSBridge @JSBridge
public void closeWindow() { public void closeWindow() {
UpmFinder.closeWindow(); UpmFinder.closeWindow();

9
designer-base/src/main/java/com/fr/design/upm/UpmPane.java

@ -1,25 +1,16 @@
package com.fr.design.upm; package com.fr.design.upm;
import com.fr.base.TemplateUtils;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.ui.ModernUIPane; import com.fr.design.ui.ModernUIPane;
import com.fr.design.upm.event.DownloadEvent; import com.fr.design.upm.event.DownloadEvent;
import com.fr.event.Event; import com.fr.event.Event;
import com.fr.event.EventDispatcher; import com.fr.event.EventDispatcher;
import com.fr.event.Listener; import com.fr.event.Listener;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.stable.StringUtils;
import com.teamdev.jxbrowser.chromium.JSValue; import com.teamdev.jxbrowser.chromium.JSValue;
import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter;
import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent; import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent;
import java.awt.*; import java.awt.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
/** /**
* @author richie * @author richie

Loading…
Cancel
Save