|
|
@ -6,6 +6,7 @@ import com.fr.design.DesignerEnvManager; |
|
|
|
import com.fr.design.EnvChangeEntrance; |
|
|
|
import com.fr.design.EnvChangeEntrance; |
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
import com.fr.design.env.DesignerWorkspaceInfo; |
|
|
|
import com.fr.design.env.DesignerWorkspaceInfo; |
|
|
|
|
|
|
|
import com.fr.design.env.DesignerWorkspaceInfoContext; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.loghandler.DesignerLogger; |
|
|
|
import com.fr.design.mainframe.loghandler.DesignerLogger; |
|
|
@ -127,9 +128,7 @@ public class DesignerSocketIO { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static SSLContext getSSLContext() throws Exception { |
|
|
|
private static SSLContext getSSLContext() throws Exception { |
|
|
|
String currentName = DesignerEnvManager.getEnvManager().getCurEnvName(); |
|
|
|
WorkspaceConnectionInfo connection = getConnectionInfo(); |
|
|
|
DesignerWorkspaceInfo info = DesignerEnvManager.getEnvManager().getWorkspaceInfo(currentName); |
|
|
|
|
|
|
|
WorkspaceConnectionInfo connection = info.getConnection(); |
|
|
|
|
|
|
|
String certPath = connection.getCertPath(); |
|
|
|
String certPath = connection.getCertPath(); |
|
|
|
String certSecretKey = connection.getCertSecretKey(); |
|
|
|
String certSecretKey = connection.getCertSecretKey(); |
|
|
|
if (StringUtils.isBlank(certPath) || StringUtils.isBlank(certSecretKey)) { |
|
|
|
if (StringUtils.isBlank(certPath) || StringUtils.isBlank(certSecretKey)) { |
|
|
@ -144,6 +143,16 @@ public class DesignerSocketIO { |
|
|
|
.build(); |
|
|
|
.build(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static WorkspaceConnectionInfo getConnectionInfo() { |
|
|
|
|
|
|
|
if (DesignerWorkspaceInfoContext.getWorkspaceInfo() == null) { |
|
|
|
|
|
|
|
String currentName = DesignerEnvManager.getEnvManager().getCurEnvName(); |
|
|
|
|
|
|
|
DesignerWorkspaceInfo info = DesignerEnvManager.getEnvManager().getWorkspaceInfo(currentName); |
|
|
|
|
|
|
|
return info.getConnection(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return DesignerWorkspaceInfoContext.getWorkspaceInfo().getConnection(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static String[] getSocketUri() throws IOException { |
|
|
|
private static String[] getSocketUri() throws IOException { |
|
|
|
Workspace current = WorkContext.getCurrent(); |
|
|
|
Workspace current = WorkContext.getCurrent(); |
|
|
|
URL url = new URL(current.getPath()); |
|
|
|
URL url = new URL(current.getPath()); |
|
|
|