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