Browse Source

REPORT-22308 切换环境问题

research/11.0
vito 5 years ago
parent
commit
30c9c43eea
  1. 1
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/UpdateActionManager.java
  2. 2
      designer-base/src/main/java/com/fr/start/BaseDesigner.java
  3. 1
      designer-realize/src/main/java/com/fr/start/DesignerInitial.java
  4. 16
      designer-realize/src/main/java/com/fr/start/SplashContext.java
  5. 25
      designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java
  6. 2
      designer-realize/src/main/java/com/fr/start/module/DesignerShowActivator.java
  7. 2
      designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java

1
designer-base/src/main/java/com/fr/design/mainframe/toolbar/UpdateActionManager.java

@ -129,6 +129,7 @@ public class UpdateActionManager {
EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener<Null>() { EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener<Null>() {
@Override @Override
public void on(Event event, Null param) { public void on(Event event, Null param) {
EventDispatcher.stopListen(this);
afterStartup = true; afterStartup = true;
for (Map.Entry<String, UpdateAction> cache : updateActionsIndexCache.entrySet()) { for (Map.Entry<String, UpdateAction> cache : updateActionsIndexCache.entrySet()) {
searchPool.execute(new IndexTask(cache.getKey(), cache.getValue())); searchPool.execute(new IndexTask(cache.getKey(), cache.getValue()));

2
designer-base/src/main/java/com/fr/start/BaseDesigner.java

@ -61,6 +61,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
EventDispatcher.listen(DesignerLaunchStatus.DESIGNER_INIT_COMPLETE, new Listener<Null>() { EventDispatcher.listen(DesignerLaunchStatus.DESIGNER_INIT_COMPLETE, new Listener<Null>() {
@Override @Override
public void on(Event event, Null param) { public void on(Event event, Null param) {
EventDispatcher.stopListen(this);
UIUtil.invokeLaterIfNeeded(new Runnable() { UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -75,6 +76,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener<Null>() { EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener<Null>() {
@Override @Override
public void on(Event event, Null param) { public void on(Event event, Null param) {
EventDispatcher.stopListen(this);
collectUserInformation(); collectUserInformation();
} }
}); });

1
designer-realize/src/main/java/com/fr/start/DesignerInitial.java

@ -37,6 +37,7 @@ public class DesignerInitial {
EventDispatcher.listen(DesignerLaunchStatus.OPEN_LAST_FILE_COMPLETE, new Listener<Null>() { EventDispatcher.listen(DesignerLaunchStatus.OPEN_LAST_FILE_COMPLETE, new Listener<Null>() {
@Override @Override
public void on(Event event, Null param) { public void on(Event event, Null param) {
EventDispatcher.stopListen(this);
UIUtil.invokeLaterIfNeeded(new Runnable() { UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override @Override
public void run() { public void run() {

16
designer-realize/src/main/java/com/fr/start/SplashContext.java

@ -77,13 +77,15 @@ public class SplashContext {
* 隐藏启动动画 * 隐藏启动动画
*/ */
public void hide() { public void hide() {
// 窗口关闭后取消定时获取模块信息的timer if (splashStrategy != null) {
scheduler.shutdown(); // 窗口关闭后取消定时获取模块信息的timer
//取消监听 scheduler.shutdown();
EventDispatcher.stopListen(listener); //取消监听
splashStrategy.hide(); EventDispatcher.stopListen(listener);
// 一次性 splashStrategy.hide();
splashStrategy = null; // 一次性
splashStrategy = null;
}
} }
private void initListener() { private void initListener() {

25
designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java

@ -0,0 +1,25 @@
package com.fr.start.module;
import com.fr.module.Activator;
import com.fr.start.DesignerInitial;
/**
* 设计器界面初始化
*
* @author vito
* @version 10.0
* Created by vito on 2019/9/25
*/
public class DesignerInitActivator extends Activator {
@Override
public void start() {
DesignerInitial.init(findSingleton(StartupArgs.class).get());
}
@Override
public void stop() {
// void
}
}

2
designer-realize/src/main/java/com/fr/start/module/DesignerShowActivator.java

@ -13,7 +13,7 @@ public class DesignerShowActivator extends Activator {
@Override @Override
public void start() { public void start() {
DesignerInitial.init(findSingleton(StartupArgs.class).get()); // DesignerInitial.init(findSingleton(StartupArgs.class).get());
EventDispatcher.asyncFire(ModuleEvent.MajorModuleStarting, Toolkit.i18nText("Fine-Design_Module_Name_Designer")); EventDispatcher.asyncFire(ModuleEvent.MajorModuleStarting, Toolkit.i18nText("Fine-Design_Module_Name_Designer"));
DesignerInitial.prepare(); DesignerInitial.prepare();
} }

2
designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java

@ -70,7 +70,7 @@ public class DesignerStartup extends Activator {
@Metrics @Metrics
public void start() { public void start() {
startSub(PreStartActivator.class); startSub(PreStartActivator.class);
startSub(DesignerWorkspaceActivator.class); startSub("parallel");
//designer模块启动好后,查看demo //designer模块启动好后,查看demo
browserDemoIfNeeded(); browserDemoIfNeeded();
startupEmbedServerIfNeeded(); startupEmbedServerIfNeeded();

Loading…
Cancel
Save