bool FRiderSourceCodeAccessor::OpenSolution()

in Source/RiderSourceCodeAccess/Private/RiderSourceCodeAccessor.cpp [201:218]


bool FRiderSourceCodeAccessor::OpenSolution()
{
	if (!bHasRiderInstalled) return false;
	
	TOptional<FString> OptionalSolutionPath = GetSolutionPath();
	if (!OptionalSolutionPath.IsSet()) return false;

	const FString SolutionPath = OptionalSolutionPath.GetValue();
	
	const FString FullPath = IFileManager::Get().ConvertToAbsolutePathForExternalAppForRead(*SolutionPath);
	const FString Params = FString::Printf(TEXT("\"%s\""), *FullPath);
	const FString ErrorMessage = FString::Printf(TEXT("Opening solution (%s) failed."), *FullPath);

	return HandleOpeningRider([this, &Params, &ErrorMessage]()->bool
	{
		return RSCA::OpenRider(ExecutablePath, Params, ErrorMessage);
	});
}