Browse Source

Merge branch 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~mata.li/designrel into release/10.0

final/10.0
Mata.Li 6 years ago
parent
commit
3ed6d0f441
  1. 12
      designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java
  2. 32
      designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

12
designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java

@ -16,12 +16,15 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.script.Calculator;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.BorderFactory;
import java.awt.*; import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
@ -155,7 +158,6 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
} }
} }
rtd.setTableDataSource(DesignTableDataManager.getEditingTableDataSource()); rtd.setTableDataSource(DesignTableDataManager.getEditingTableDataSource());
rtd.createDataModel(Calculator.createCalculator());
PreviewTablePane.previewTableData(rtd); PreviewTablePane.previewTableData(rtd);
} }
}); });

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

@ -68,8 +68,8 @@ public class DesignerSocketIO {
return; return;
} }
try { try {
String uri = getSocketUri(current); String[] uri = getSocketUri(current);
socketIO = Optional.of(IO.socket(new URI(uri))); socketIO = Optional.of(IO.socket(new URI(uri[0])));
socketIO.get().on(WorkspaceConstants.WS_LOGRECORD, printLog); socketIO.get().on(WorkspaceConstants.WS_LOGRECORD, printLog);
socketIO.get().on(WorkspaceConstants.CONFIG_MODIFY, new Emitter.Listener() { socketIO.get().on(WorkspaceConstants.CONFIG_MODIFY, new Emitter.Listener() {
@Override @Override
@ -109,19 +109,23 @@ public class DesignerSocketIO {
} }
} }
private static String getSocketUri(Workspace current) throws IOException { private static String[] getSocketUri(Workspace current) throws IOException {
URL url = new URL(current.getPath()); URL url = new URL(current.getPath());
int port = WorkContext.getCurrent().get(SocketInfoOperator.class).getPort(); Integer[] ports = WorkContext.getCurrent().get(SocketInfoOperator.class).getPort();
WorkspaceConnection connection = WorkContext.getCurrent().getConnection(); WorkspaceConnection connection = WorkContext.getCurrent().getConnection();
return String.format("%s://%s:%s%s?%s=%s&%s=%s", String[] result = new String[ports.length];
url.getProtocol(), for (int i = 0; i < ports.length; i++ ) {
url.getHost(), result[i] = String.format("%s://%s:%s%s?%s=%s&%s=%s",
port, url.getProtocol(),
WorkspaceConstants.WS_NAMESPACE, url.getHost(),
DecisionServiceConstants.WEB_SOCKET_TOKEN_NAME, ports[i],
connection.getToken(), WorkspaceConstants.WS_NAMESPACE,
RemoteDesignConstants.USER_LOCK_ID, DecisionServiceConstants.WEB_SOCKET_TOKEN_NAME,
connection.getId() connection.getToken(),
); RemoteDesignConstants.USER_LOCK_ID,
connection.getId());
}
return result;
} }
} }

Loading…
Cancel
Save