Browse Source

REPORT-109525 【设计器性能】启动性能优化 插件禁用启用逻辑完善

release/11.0
Destiny.Lin 11 months ago
parent
commit
8940716dcb
  1. 2
      designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java
  2. 4
      designer-base/src/main/java/com/fr/design/extra/PluginUtils.java

2
designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java

@ -153,7 +153,7 @@ public class PluginOperateUtils {
public void run() { public void run() {
PluginMarker pluginMarker = PluginUtils.createPluginMarker(pluginInfo); PluginMarker pluginMarker = PluginUtils.createPluginMarker(pluginInfo);
PluginContext plugin = PluginManager.getContext(pluginMarker); PluginContext plugin = PluginManager.getContext(pluginMarker);
boolean isRunning = plugin.isRunning(); boolean isRunning = plugin.isRunning() || plugin.isPrepare();
PluginTaskCallback modifyStatusCallback = new ModifyStatusCallback(isRunning, jsCallback); PluginTaskCallback modifyStatusCallback = new ModifyStatusCallback(isRunning, jsCallback);
changePluginActive(isRunning, pluginMarker, modifyStatusCallback, plugin); changePluginActive(isRunning, pluginMarker, modifyStatusCallback, plugin);
} }

4
designer-base/src/main/java/com/fr/design/extra/PluginUtils.java

@ -270,8 +270,8 @@ public class PluginUtils {
jo.put("vendor", pluginContext.getVendor()); jo.put("vendor", pluginContext.getVendor());
jo.put("price", pluginContext.getPrice()); jo.put("price", pluginContext.getPrice());
jo.put("requiredJarTime", pluginContext.getRequiredJarTime()); jo.put("requiredJarTime", pluginContext.getRequiredJarTime());
// 前端需求的active实际上是插件的运行状态,通过isRunning()获取 // 前端需求的active实际上是插件的运行状态,通过isRunning()或isPrepare()获取
jo.put("active", pluginContext.isRunning()); jo.put("active", pluginContext.isRunning() || pluginContext.isPrepare());
jo.put("hidden", pluginContext.isHidden()); jo.put("hidden", pluginContext.isHidden());
jo.put("free", pluginContext.isFree()); jo.put("free", pluginContext.isFree());
jo.put("licDamaged", pluginContext.isLicDamaged()); jo.put("licDamaged", pluginContext.isLicDamaged());

Loading…
Cancel
Save