|
|
@ -57,10 +57,8 @@ public class UpmBridge { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JSObject window; |
|
|
|
private JSObject window; |
|
|
|
private Browser browser; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private UpmBridge(Browser browser) { |
|
|
|
private UpmBridge(Browser browser) { |
|
|
|
this.browser = browser; |
|
|
|
|
|
|
|
this.window = browser.executeJavaScriptAndReturnValue("window").asObject(); |
|
|
|
this.window = browser.executeJavaScriptAndReturnValue("window").asObject(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -96,7 +94,6 @@ public class UpmBridge { |
|
|
|
callback.invoke(window, "success", Toolkit.i18nText("Fine-Design_Basic_Update_Plugin_Manager_Download_Success")); |
|
|
|
callback.invoke(window, "success", Toolkit.i18nText("Fine-Design_Basic_Update_Plugin_Manager_Download_Success")); |
|
|
|
EventDispatcher.fire(DownloadEvent.SUCCESS, "success"); |
|
|
|
EventDispatcher.fire(DownloadEvent.SUCCESS, "success"); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
|
|
|
|
callback.invoke(window, "error", Toolkit.i18nText("Fine-Design_Basic_Update_Plugin_Manager_Download_Error")); |
|
|
|
callback.invoke(window, "error", Toolkit.i18nText("Fine-Design_Basic_Update_Plugin_Manager_Download_Error")); |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
EventDispatcher.fire(DownloadEvent.ERROR, "error"); |
|
|
|
EventDispatcher.fire(DownloadEvent.ERROR, "error"); |
|
|
@ -114,11 +111,6 @@ public class UpmBridge { |
|
|
|
return ServerPreferenceConfig.getInstance().getOptimizedUPMVersion(); |
|
|
|
return ServerPreferenceConfig.getInstance().getOptimizedUPMVersion(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@JSBridge |
|
|
|
|
|
|
|
public void reload() { |
|
|
|
|
|
|
|
browser.reloadIgnoringCache(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@JSBridge |
|
|
|
@JSBridge |
|
|
|
public String i18nText(String key) { |
|
|
|
public String i18nText(String key) { |
|
|
|
return Toolkit.i18nText(key); |
|
|
|
return Toolkit.i18nText(key); |
|
|
|