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