|
|
@ -12,7 +12,6 @@ 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; |
|
|
@ -28,12 +27,12 @@ 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 javax.swing.JOptionPane; |
|
|
|
import java.util.Arrays; |
|
|
|
import javax.swing.UIManager; |
|
|
|
import javax.swing.*; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.net.URI; |
|
|
|
import java.net.URI; |
|
|
|
import java.net.URL; |
|
|
|
import java.net.URL; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
|
|
|
|
|
|
|
|
public class DesignerSocketIO { |
|
|
|
public class DesignerSocketIO { |
|
|
|
|
|
|
|
|
|
|
@ -177,18 +176,13 @@ public class DesignerSocketIO { |
|
|
|
UIUtil.invokeAndWaitIfNeeded(new Runnable() { |
|
|
|
UIUtil.invokeAndWaitIfNeeded(new Runnable() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|
// 因为有可能在文件保存界面的时候,弹出连接失败弹窗,为了避免二级弹窗问题,这边对父窗口做个判断
|
|
|
|
|
|
|
|
boolean isFileChooserPaneExist = FILEChooserPane.getInstance().isDialogVisible(); |
|
|
|
|
|
|
|
Window window = isFileChooserPaneExist ? FILEChooserPane.getInstance().getDialog() : DesignerContext.getDesignerFrame(); |
|
|
|
|
|
|
|
FineJOptionPane.showMessageDialog( |
|
|
|
FineJOptionPane.showMessageDialog( |
|
|
|
window, |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
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")); |
|
|
|
// 紧接着弹出的选择工作环境的窗口也判断一下父窗口,否则会被文件保存界面覆盖掉
|
|
|
|
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) { |
|
|
|