|
|
|
@ -12,7 +12,6 @@ import com.fr.design.ui.util.UIUtil;
|
|
|
|
|
import com.fr.event.Event; |
|
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
|
import com.fr.event.Listener; |
|
|
|
|
import com.fr.file.FILEChooserPane; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.report.RemoteDesignConstants; |
|
|
|
|
import com.fr.serialization.SerializerHelper; |
|
|
|
@ -28,12 +27,12 @@ import io.socket.client.IO;
|
|
|
|
|
import io.socket.client.Socket; |
|
|
|
|
import io.socket.emitter.Emitter; |
|
|
|
|
|
|
|
|
|
import java.awt.Window; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
import javax.swing.UIManager; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.net.URI; |
|
|
|
|
import java.net.URL; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
|
|
|
|
|
public class DesignerSocketIO { |
|
|
|
|
|
|
|
|
@ -177,18 +176,13 @@ public class DesignerSocketIO {
|
|
|
|
|
UIUtil.invokeAndWaitIfNeeded(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
// 因为有可能在文件保存界面的时候,弹出连接失败弹窗,为了避免二级弹窗问题,这边对父窗口做个判断
|
|
|
|
|
boolean isFileChooserPaneExist = FILEChooserPane.getInstance().isDialogVisible(); |
|
|
|
|
Window window = isFileChooserPaneExist ? FILEChooserPane.getInstance().getDialog() : DesignerContext.getDesignerFrame(); |
|
|
|
|
FineJOptionPane.showMessageDialog( |
|
|
|
|
window, |
|
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Remote_Disconnected"), |
|
|
|
|
UIManager.getString("OptionPane.messageDialogTitle"), |
|
|
|
|
JOptionPane.ERROR_MESSAGE, |
|
|
|
|
UIManager.getIcon("OptionPane.errorIcon")); |
|
|
|
|
// 紧接着弹出的选择工作环境的窗口也判断一下父窗口,否则会被文件保存界面覆盖掉
|
|
|
|
|
Window window1 = isFileChooserPaneExist ? FILEChooserPane.getInstance().getDialog() : SwingUtilities.getWindowAncestor(DesignerContext.getDesignerFrame()); |
|
|
|
|
EnvChangeEntrance.getInstance().chooseEnv(DesignerEnvManager.getEnvManager().getCurEnvName(), window1); |
|
|
|
|
EnvChangeEntrance.getInstance().chooseEnv(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|