Browse Source

fix 调整

persist/11.0
Hades 5 years ago
parent
commit
5f6e4f48ed
  1. 8
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 5
      designer-base/src/main/java/com/fr/design/RestartHelper.java
  3. 5
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  4. 6
      designer-base/src/main/java/com/fr/design/utils/DesignUtils.java
  5. 30
      designer-base/src/main/java/com/fr/exit/DesignerExiter.java
  6. 6
      designer-base/src/main/java/com/fr/start/BaseDesigner.java
  7. 8
      designer-realize/src/main/java/com/fr/start/CollectUserInformationDialog.java
  8. 3
      designer-realize/src/main/java/com/fr/start/MainDesigner.java
  9. 5
      designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java

8
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -13,11 +13,10 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.utils.DesignUtils;
import com.fr.env.EnvListPane;
import com.fr.exit.DesignerExiter;
import com.fr.general.GeneralContext;
import com.fr.license.exception.RegistEditionException;
import com.fr.log.FineLoggerFactory;
import com.fr.process.engine.core.FineProcessContext;
import com.fr.process.engine.core.FineProcessEngineEvent;
import com.fr.stable.AssistUtils;
import com.fr.stable.EnvChangedListener;
import com.fr.start.server.ServerTray;
@ -245,14 +244,13 @@ public class EnvChangeEntrance {
@Override
public void doOk() {
if (!envListOkAction(envListPane, PopTipStrategy.NOW)) {
FineProcessContext.getChildPipe().fire(FineProcessEngineEvent.DESTROY);
DesignerExiter.getInstance().execute();
}
}
@Override
public void doCancel() {
FineProcessContext.getChildPipe().fire(FineProcessEngineEvent.DESTROY);
}
DesignerExiter.getInstance().execute(); }
});
envListDialog.setVisible(true);
}

5
designer-base/src/main/java/com/fr/design/RestartHelper.java

@ -2,11 +2,10 @@ package com.fr.design;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.os.impl.RestartAction;
import com.fr.exit.DesignerExiter;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.process.engine.core.FineProcessContext;
import com.fr.process.engine.core.FineProcessEngineEvent;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
@ -154,7 +153,7 @@ public class RestartHelper {
} finally {
WorkContext.getCurrent().close();
frame.dispose();
FineProcessContext.getChildPipe().fire(FineProcessEngineEvent.DESTROY);
DesignerExiter.getInstance().execute();
}
}

5
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -43,6 +43,7 @@ import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.event.EventDispatcher;
import com.fr.exception.DecryptTemplateException;
import com.fr.exit.DesignerExiter;
import com.fr.file.FILE;
import com.fr.file.FILEFactory;
import com.fr.file.FileFILE;
@ -54,8 +55,6 @@ import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.manage.PluginFilter;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.process.engine.core.FineProcessContext;
import com.fr.process.engine.core.FineProcessEngineEvent;
import com.fr.stable.OperatingSystem;
import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
@ -1161,7 +1160,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
this.dispose();
this.ad.shutDown();
FineProcessContext.getChildPipe().fire(FineProcessEngineEvent.DESTROY);
DesignerExiter.getInstance().execute();
}
// harry:添加程序外拖拽文件进来打开的功能

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

@ -8,13 +8,12 @@ import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.DesignerEnvProcessor;
import com.fr.design.gui.UILookAndFeel;
import com.fr.design.mainframe.DesignerContext;
import com.fr.exit.DesignerExiter;
import com.fr.file.FileFILE;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralContext;
import com.fr.log.FineLoggerFactory;
import com.fr.process.engine.core.FineProcessContext;
import com.fr.process.engine.core.FineProcessEngineEvent;
import com.fr.stable.ArrayUtils;
import com.fr.stable.CommonCodeUtils;
import com.fr.stable.StableUtils;
@ -191,8 +190,7 @@ public class DesignUtils {
} else if ("check".equals(line)) {
clientSend(new String[] {"response"}, socket);
} else if ("end".equals(line)) {
FineProcessContext.getChildPipe().fire(FineProcessEngineEvent.DESTROY);
}
DesignerExiter.getInstance().execute(); }
else if (StringUtils.isNotEmpty(line)) {
File f = new File(line);
String path = f.getAbsolutePath();

30
designer-base/src/main/java/com/fr/exit/DesignerExiter.java

@ -0,0 +1,30 @@
package com.fr.exit;
import com.fr.process.engine.core.FineProcessContext;
import com.fr.process.engine.core.FineProcessEngineEvent;
import com.fr.stable.StableUtils;
/**
* @author hades
* @version 10.0
* Created by hades on 2020/2/12
*/
public class DesignerExiter {
public static final DesignerExiter INSTANCE = new DesignerExiter();
private static final String DOT = ".";
public static DesignerExiter getInstance() {
return INSTANCE;
}
public void execute() {
if (FineProcessContext.getParentPipe() == null && DOT.equals(StableUtils.getInstallHome())) {
System.exit(0);
} else {
FineProcessContext.getParentPipe().fire(FineProcessEngineEvent.DESTROY);
}
}
}

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

@ -14,18 +14,16 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.mainframe.toolbar.ToolBarMenuDock;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.DesignUtils;
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.FILE;
import com.fr.file.FILEFactory;
import com.fr.file.FileFILE;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.process.engine.core.FineProcessContext;
import com.fr.process.engine.core.FineProcessEngineEvent;
import com.fr.stable.OperatingSystem;
import java.awt.*;
@ -137,7 +135,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
if (!isException) {
showDesignerFrame(true);
} else {
FineProcessContext.getChildPipe().fire(FineProcessEngineEvent.DESTROY);
DesignerExiter.getInstance().execute();
}
}
}

8
designer-realize/src/main/java/com/fr/start/CollectUserInformationDialog.java

@ -11,13 +11,9 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.locale.impl.UserInfoMark;
import com.fr.design.mainframe.ActiveKeyGenerator;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.exit.DesignerExiter;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark;
import com.fr.process.engine.core.FineProcessContext;
import com.fr.process.engine.core.FineProcessEngineEvent;
import javax.swing.*;
import javax.swing.border.TitledBorder;
@ -157,7 +153,7 @@ public class CollectUserInformationDialog extends UIDialog {
exitButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
FineProcessContext.getChildPipe().fire(FineProcessEngineEvent.DESTROY);
DesignerExiter.getInstance().execute();
}
});
// set default pane.

3
designer-realize/src/main/java/com/fr/start/MainDesigner.java

@ -42,6 +42,7 @@ import com.fr.design.menu.ShortCut;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.utils.concurrent.ThreadFactoryBuilder;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.exit.DesignerExiter;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.module.Module;
@ -130,7 +131,7 @@ public class MainDesigner extends BaseDesigner {
@Override
protected void okEvent() {
dispose();
FineProcessContext.getChildPipe().fire(FineProcessEngineEvent.DESTROY);
DesignerExiter.getInstance().execute();
}
@Override

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

@ -13,11 +13,10 @@ import com.fr.design.mainframe.messagecollect.entity.DesignerErrorMessage;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.DesignerPort;
import com.fr.exit.DesignerExiter;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.module.Activator;
import com.fr.process.engine.core.FineProcessContext;
import com.fr.process.engine.core.FineProcessEngineEvent;
import com.fr.record.analyzer.EnableMetrics;
import com.fr.record.analyzer.Metrics;
import com.fr.stable.BuildContext;
@ -85,7 +84,7 @@ public class DesignerStartup extends Activator {
};
dialog.setVisible(true);
}
FineProcessContext.getChildPipe().fire(FineProcessEngineEvent.DESTROY);
DesignerExiter.getInstance().execute();
return;
}
// 快快显示启动画面

Loading…
Cancel
Save