Browse Source

Pull request #13248: REPORT-107976 远程设计切换目录性能优化

Merge in DESIGN/design from ~ROGER.CHEN/design:feature/x to feature/x

* commit 'f482baa997d41c29d1e18fa3e71e32e1dfb930de':
  REPORT-107976 远程设计切换目录性能优化
feature/x
Roger.Chen-陈旺 12 months ago
parent
commit
24985b2139
  1. 6
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java
  2. 20
      designer-realize/src/main/java/com/fr/start/module/optimized/DesignerPluginActivator.java

6
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -187,8 +187,10 @@ public class DesignerActivator extends Activator implements Prepare {
}
CompletableFuture<Void> themeConfigPrepare = CompletableFuture.runAsync(() -> {
FormThemeConfigMigrator.getInstance().upgrade();
ReportThemeConfigMigrator.getInstance().upgrade();
if (WorkContext.getCurrent().isLocal()) {
FormThemeConfigMigrator.getInstance().upgrade();
ReportThemeConfigMigrator.getInstance().upgrade();
}
}, DesignerStartupPool.common());
CompletableFuture<Void> mainDesignerPrepare = CompletableFuture.runAsync(this::designerModuleStart, DesignerStartupPool.common());

20
designer-realize/src/main/java/com/fr/start/module/optimized/DesignerPluginActivator.java

@ -3,7 +3,11 @@ package com.fr.start.module.optimized;
import com.fr.module.Activator;
import com.fr.module.ModuleContext;
import com.fr.plugin.PluginActivator;
import com.fr.plugin.manage.PluginManager;
import com.fr.start.common.DesignerStartupExecutor;
import com.fr.workspace.WorkContext;
import com.fr.workspace.WorkspaceSwitchHelper;
import com.fr.workspace.WorkspaceSwitchProcess;
/**
* created by Harrison on 2022/06/22
@ -12,13 +16,21 @@ public class DesignerPluginActivator extends Activator {
@Override
public void start() {
DesignerStartupExecutor.getInstance().execute(() -> ModuleContext.getModule(PluginActivator.class).start());
WorkspaceSwitchProcess process = WorkContext.getSwitcher().getProcess();
if (WorkspaceSwitchHelper.supportHotSwitch(process)) {
PluginManager.getHotModule().start();
} else {
DesignerStartupExecutor.getInstance().execute(() -> ModuleContext.getModule(PluginActivator.class).start());
}
}
@Override
public void stop() {
ModuleContext.getModule(PluginActivator.class).stop();
WorkspaceSwitchProcess process = WorkContext.getSwitcher().getProcess();
if (WorkspaceSwitchHelper.supportHotSwitch(process)) {
PluginManager.getHotModule().stop();
} else {
ModuleContext.getModule(PluginActivator.class).stop();
}
}
}

Loading…
Cancel
Save