|
|
|
@ -16,6 +16,7 @@ import com.fr.stable.StringUtils;
|
|
|
|
|
import com.fr.value.NotNullLazyValue; |
|
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
|
import com.fr.workspace.Workspace; |
|
|
|
|
import com.fr.workspace.engine.exception.WorkspaceCheckException; |
|
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -43,10 +44,10 @@ public class DesignerWorkspaceProvider extends Activator {
|
|
|
|
|
if (startupArgs.getValue().isDemo()) { |
|
|
|
|
DesignerEnvManager.getEnvManager().setCurrentEnv2Default(); |
|
|
|
|
} else { |
|
|
|
|
String workspacePath; |
|
|
|
|
DesignerWorkspaceInfo workspaceInfo = null; |
|
|
|
|
try { |
|
|
|
|
String current = DesignerEnvManager.getEnvManager().getCurEnvName(); |
|
|
|
|
String workspacePath; |
|
|
|
|
DesignerWorkspaceInfo workspaceInfo; |
|
|
|
|
if (StringUtils.isNotEmpty(workspacePath = System.getProperty(SPECIFY_WORKSPACE))) { |
|
|
|
|
workspaceInfo = LocalDesignerWorkspaceInfo.create(StringUtils.EMPTY, workspacePath); |
|
|
|
|
} else { |
|
|
|
@ -73,6 +74,10 @@ public class DesignerWorkspaceProvider extends Activator {
|
|
|
|
|
} |
|
|
|
|
} catch (Throwable e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
if (e.getCause() instanceof WorkspaceCheckException && workspaceInfo != null) { |
|
|
|
|
WorkspaceCheckException exception = (WorkspaceCheckException) e.getCause(); |
|
|
|
|
EnvChangeEntrance.getInstance().handleWorkspaceCheckException(exception, EnvChangeEntrance.PopTipStrategy.LATER, workspaceInfo.getConnection()); |
|
|
|
|
} |
|
|
|
|
EnvChangeEntrance.getInstance().dealEvnExceptionWhenStartDesigner(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|