From 81bfabb4a07e650ec4875c6f509e81bc2653c62b Mon Sep 17 00:00:00 2001 From: "abel.chen" Date: Thu, 12 Jul 2018 19:50:29 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E6=9C=8D=E5=8A=A1=E7=AB=AF=E9=85=8D=E7=BD=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/socketio/DesignerSocketIO.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java index a44bdf8b20..5fb7262c16 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java @@ -1,8 +1,12 @@ package com.fr.design.mainframe.socketio; +import com.fr.config.ConfigEvent; +import com.fr.config.Configuration; +import com.fr.config.RemoteEvent; import com.fr.decision.webservice.utils.DecisionServiceConstants; import com.fr.design.mainframe.loghandler.DesignerLogHandler; import com.fr.env.operator.socket.SocketInfoOperator; +import com.fr.event.EventDispatcher; import com.fr.general.LogRecordTime; import com.fr.general.LogUtils; import com.fr.log.FineLoggerFactory; @@ -54,6 +58,14 @@ public class DesignerSocketIO { String uri = getSocketUri(current); socketIO = Optional.of(IO.socket(new URI(uri))); socketIO.get().on(WorkspaceConstants.WS_LOGRECORD, printLog); + socketIO.get().on(WorkspaceConstants.CONFIG_MODIFY, new Emitter.Listener() { + @Override + public void call(Object... objects) { + assert objects != null && objects.length == 1; + String param = (String) objects[0]; + EventDispatcher.fire(RemoteEvent.EDIT, param); + } + }); socketIO.get().connect(); } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); From af233af5906977e96c519d0b570d48ec91cdbb79 Mon Sep 17 00:00:00 2001 From: "abel.chen" Date: Thu, 12 Jul 2018 19:53:18 +0800 Subject: [PATCH 2/3] fix --- .../java/com/fr/design/mainframe/socketio/DesignerSocketIO.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java index 5fb7262c16..d0b9a7043d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java @@ -1,7 +1,5 @@ package com.fr.design.mainframe.socketio; -import com.fr.config.ConfigEvent; -import com.fr.config.Configuration; import com.fr.config.RemoteEvent; import com.fr.decision.webservice.utils.DecisionServiceConstants; import com.fr.design.mainframe.loghandler.DesignerLogHandler; From 8daa87f8dd441add00640f60e71f015752e79a6b Mon Sep 17 00:00:00 2001 From: "abel.chen" Date: Fri, 13 Jul 2018 16:20:56 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=94=B9=E4=B8=AA=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/socketio/DesignerSocketIO.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java index 50f38a39a2..b67c7956d7 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java @@ -1,6 +1,6 @@ package com.fr.design.mainframe.socketio; -import com.fr.config.RemoteEvent; +import com.fr.config.RemoteConfigEvent; import com.fr.decision.webservice.utils.DecisionServiceConstants; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.loghandler.DesignerLogHandler; @@ -65,7 +65,7 @@ public class DesignerSocketIO { public void call(Object... objects) { assert objects != null && objects.length == 1; String param = (String) objects[0]; - EventDispatcher.fire(RemoteEvent.EDIT, param); + EventDispatcher.fire(RemoteConfigEvent.EDIT, param); } }); socketIO.get().on(Socket.EVENT_DISCONNECT, new Emitter.Listener() {