Browse Source

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

Merge in DESIGN/design from ~DESTINY.LIN/design:release/11.0 to release/11.0

* commit '4c5818d42893d5864cc6f646ef2c06c56ed53b5d':
  REPORT-109525 【设计器性能】启动性能优化 代码规范
  REPORT-109525 【设计器性能】启动性能优化 插件禁用启用逻辑完善
release/11.0
Destiny.Lin-林锦龙 11 months ago
parent
commit
07b8a0bd9f
  1. 6
      designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java
  2. 4
      designer-base/src/main/java/com/fr/design/extra/PluginUtils.java

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

@ -153,9 +153,9 @@ 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 running = plugin.isRunning() || plugin.isPrepare();
PluginTaskCallback modifyStatusCallback = new ModifyStatusCallback(isRunning, jsCallback); PluginTaskCallback modifyStatusCallback = new ModifyStatusCallback(running, jsCallback);
changePluginActive(isRunning, pluginMarker, modifyStatusCallback, plugin); changePluginActive(running, 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