Browse Source

Merge pull request #236 in DESIGN/design from ~HZZZ/design61:release/10.0 to release/10.0

* commit '760a21e7feba87677bc227b1a8f3ddb50384084c':
  .
  .
  .
  REPORT-9723【阻塞】【10.0二轮回归】切换远程工作目录失败
master
Hzzz 6 years ago
parent
commit
802954eb05
  1. 1
      designer-base/src/main/java/com/fr/design/mainframe/TemplatePane.java
  2. 2
      designer-base/src/main/java/com/fr/design/remote/ui/AuthorityListControlPane.java
  3. 4
      designer-base/src/main/java/com/fr/design/remote/ui/UserManagerPane.java
  4. 17
      designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

1
designer-base/src/main/java/com/fr/design/mainframe/TemplatePane.java

@ -141,7 +141,6 @@ public class TemplatePane extends JPanel implements MouseListener {
return false;
}
WorkContext.switchTo(workspace, new WorkContextCallback() {
@Override
public void done() {
DesignerEnvManager.getEnvManager().setCurEnvName(selectedName);

2
designer-base/src/main/java/com/fr/design/remote/ui/AuthorityListControlPane.java

@ -18,12 +18,12 @@ import com.fr.design.remote.RemoteDesignAuthorityCreator;
import com.fr.design.remote.ui.list.AuthorityList;
import com.fr.design.remote.ui.list.AuthorityListCellRenderer;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.workspace.server.authority.RemoteDesignMember;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.report.DesignAuthority;
import com.fr.stable.ArrayUtils;
import com.fr.workspace.server.authority.RemoteDesignMember;
import javax.swing.BorderFactory;
import javax.swing.DefaultListModel;

4
designer-base/src/main/java/com/fr/design/remote/ui/UserManagerPane.java

@ -13,12 +13,12 @@ import com.fr.design.remote.ui.list.AddedMemberListCellRender;
import com.fr.design.remote.ui.list.AddingMemberList;
import com.fr.design.remote.ui.list.AddingMemberListCellRender;
import com.fr.design.remote.ui.list.MemberListSelectedChangeListener;
import com.fr.workspace.server.authority.RemoteDesignMember;
import com.fr.workspace.server.authority.decision.DecisionOperator;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import com.fr.third.guava.collect.ImmutableList;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.authority.RemoteDesignMember;
import com.fr.workspace.server.authority.decision.DecisionOperator;
import javax.swing.BorderFactory;
import javax.swing.DefaultListModel;

17
designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

@ -27,7 +27,14 @@ import java.net.URL;
public class DesignerSocketIO {
enum Status {
Connected,
Disconnected,
Disconnecting
}
private static Optional<Socket> socketIO = Optional.absent();
public static Status status = Status.Disconnected;
private static final Emitter.Listener printLog = new Emitter.Listener() {
@Override
@ -45,8 +52,10 @@ public class DesignerSocketIO {
public static void close() {
if (socketIO.isPresent()) {
status = Status.Disconnecting;
socketIO.get().close();
socketIO = Optional.absent();
status = Status.Disconnected;
}
}
@ -70,11 +79,15 @@ public class DesignerSocketIO {
socketIO.get().on(Socket.EVENT_DISCONNECT, new Emitter.Listener() {
@Override
public void call(Object... objects) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Disconnected"}),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
if (status != Status.Disconnecting) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Disconnected"}),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
status = Status.Disconnected;
}
}
});
socketIO.get().connect();
status = Status.Connected;
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}

Loading…
Cancel
Save