From c8149fecfb4cf2e7a79361b01a44fcb7ba63cc1f Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 8 Nov 2019 16:38:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=80=E4=B8=AA=E6=8C=87=E5=AE=9A=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E7=94=A8=E4=BA=8E=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/start/module/DesignerWorkspaceProvider.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java b/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java index ee57bb551b..7d63571ad6 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java @@ -5,8 +5,10 @@ import com.fr.design.EnvChangeEntrance; import com.fr.design.constants.DesignerLaunchStatus; import com.fr.design.env.DesignerWorkspaceGenerator; import com.fr.design.env.DesignerWorkspaceInfo; +import com.fr.design.env.LocalDesignerWorkspaceInfo; import com.fr.log.FineLoggerFactory; import com.fr.module.Activator; +import com.fr.stable.StringUtils; import com.fr.value.NotNullLazyValue; import com.fr.workspace.WorkContext; import com.fr.workspace.Workspace; @@ -19,6 +21,8 @@ import org.jetbrains.annotations.NotNull; */ public class DesignerWorkspaceProvider extends Activator { + private static final String SPECIFY_WORKSPACE = "fr.designer.workspace"; + private NotNullLazyValue startupArgs = new NotNullLazyValue() { @NotNull @Override @@ -37,7 +41,13 @@ public class DesignerWorkspaceProvider extends Activator { } else { try { String current = DesignerEnvManager.getEnvManager().getCurEnvName(); - DesignerWorkspaceInfo workspaceInfo = DesignerEnvManager.getEnvManager().getWorkspaceInfo(current); + String workspacePath; + DesignerWorkspaceInfo workspaceInfo; + if (StringUtils.isNotEmpty(workspacePath = System.getProperty(SPECIFY_WORKSPACE))) { + workspaceInfo = LocalDesignerWorkspaceInfo.create(StringUtils.EMPTY, workspacePath); + } else { + workspaceInfo = DesignerEnvManager.getEnvManager().getWorkspaceInfo(current); + } Workspace workspace = DesignerWorkspaceGenerator.generate(workspaceInfo); boolean checkValid = workspace != null && workspaceInfo.checkValid(); if (!checkValid) {