Browse Source

代码修改

feature/big-screen
kerry 4 years ago
parent
commit
b0710669bc
  1. 18
      designer-base/src/main/java/com/fr/design/utils/DesignUtils.java
  2. 2
      designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java

18
designer-base/src/main/java/com/fr/design/utils/DesignUtils.java

@ -5,17 +5,12 @@ import com.fr.base.ServerConfig;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.constants.DesignerLaunchStatus;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.fun.DesignerEnvProcessor;
import com.fr.design.gui.UILookAndFeel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import com.fr.event.Listener;
import com.fr.event.Null;
import com.fr.exit.DesignerExiter;
import com.fr.file.FileFILE;
import com.fr.general.ComparatorUtils;
@ -66,16 +61,6 @@ import java.util.concurrent.TimeoutException;
public class DesignUtils {
private static int port = DesignerPort.getInstance().getMessagePort();
static {
EventDispatcher.listen(DesignerLaunchStatus.WORKSPACE_INIT_COMPLETE, new Listener<Null>() {
@Override
public void on(Event event, Null aNull) {
checkDesignerEnvMatch();
}
});
}
private static boolean started = false;
/**
@ -444,6 +429,9 @@ public class DesignUtils {
return true;
}
/**
* check下设计器jar包版本和当前envjar包版本是否匹配设计器启动后和环境切换成功后调用
*/
public static void checkDesignerEnvMatch(){
if (WorkContext.getCurrent().isLocal()){
designerEnvMatch = true;

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

@ -6,6 +6,7 @@ import com.fr.design.constants.DesignerLaunchStatus;
import com.fr.design.env.DesignerWorkspaceGenerator;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.env.LocalDesignerWorkspaceInfo;
import com.fr.design.utils.DesignUtils;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import com.fr.event.Listener;
@ -59,6 +60,7 @@ public class DesignerWorkspaceProvider extends Activator {
EnvChangeEntrance.getInstance().dealEvnExceptionWhenStartDesigner();
} else {
WorkContext.switchTo(workspace);
DesignUtils.checkDesignerEnvMatch();
//在设计器完全启动完成后,对初始环境进行一次服务检测,对主要功能无影响,异常仅做日志提示即可
final DesignerWorkspaceInfo selectEnv = workspaceInfo;
EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener<Null>() {

Loading…
Cancel
Save