Browse Source

误传

research/10.0
richie 5 years ago
parent
commit
9d0ac48c96
  1. 26
      designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceGenerator.java

26
designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceGenerator.java vendored

@ -11,20 +11,20 @@ public class DesignerWorkspaceGenerator {
public static Workspace generate(DesignerWorkspaceInfo config) throws Exception { public static Workspace generate(DesignerWorkspaceInfo config) throws Exception {
if (config == null || config.getType() == null) { if (config == null || config.getType() == null) {
return null; return null;
} }
Workspace workspace = null; Workspace workspace = null;
switch (config.getType()) { switch (config.getType()) {
case Local: { case Local: {
workspace = WorkContext.getFactory().build(config.getPath()); workspace = WorkContext.getFactory().build(config.getPath());
break; break;
} }
case Remote: { case Remote: {
WorkspaceClient client = WorkContext.getConnector().connect(config.getConnection()); WorkspaceClient client = WorkContext.getConnector().connect(config.getConnection());
if (client != null) { if (client != null) {
workspace = new RemoteWorkspace(client, config.getConnection()); workspace = new RemoteWorkspace(client, config.getConnection());
} }
break; break;
} }

Loading…
Cancel
Save