logic: add auto-detection for JRE System Library
* fixed error columns are not saved to database correctly * implemented setting JRE System Library paths in app settings * added detector for JRE System Library that not use Java Runtime specified in AppSettings but detects JRE on its own by reusing the JavaPathDetector. * added option to use JRE System Library in JavaSourceGroup
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
#include "utility/path_detector/java_runtime/JavaPathDetectorMac.h"
|
||||
#include "utility/path_detector/java_runtime/JavaPathDetectorWindows.h"
|
||||
|
||||
#include "utility/path_detector/jre_system_library/JreSystemLibraryPathDetectorLinux.h"
|
||||
#include "utility/path_detector/jre_system_library/JreSystemLibraryPathDetectorMac.h"
|
||||
#include "utility/path_detector/jre_system_library/JreSystemLibraryPathDetectorWindows.h"
|
||||
|
||||
#include "utility/path_detector/maven_executable/MavenPathDetectorUnix.h"
|
||||
#include "utility/path_detector/maven_executable/MavenPathDetectorWindows.h"
|
||||
|
||||
@@ -32,6 +36,25 @@ std::shared_ptr<CombinedPathDetector> utility::getJavaRuntimePathDetector()
|
||||
return combinedDetector;
|
||||
}
|
||||
|
||||
std::shared_ptr<CombinedPathDetector> utility::getJreSystemLibraryPathsDetector()
|
||||
{
|
||||
std::shared_ptr<CombinedPathDetector> combinedDetector = std::make_shared<CombinedPathDetector>();
|
||||
if (QSysInfo::windowsVersion() != QSysInfo::WV_None)
|
||||
{
|
||||
combinedDetector->addDetector(std::make_shared<JreSystemLibraryPathDetectorWindows>("1.8"));
|
||||
}
|
||||
else if (QSysInfo::macVersion() != QSysInfo::MV_None)
|
||||
{
|
||||
combinedDetector->addDetector(std::make_shared<JreSystemLibraryPathDetectorMac>("1.8"));
|
||||
}
|
||||
else
|
||||
{
|
||||
combinedDetector->addDetector(std::make_shared<JreSystemLibraryPathDetectorLinux>("1.8"));
|
||||
}
|
||||
|
||||
return combinedDetector;
|
||||
}
|
||||
|
||||
std::shared_ptr<CombinedPathDetector> utility::getMavenExecutablePathDetector()
|
||||
{
|
||||
std::shared_ptr<CombinedPathDetector> combinedDetector = std::make_shared<CombinedPathDetector>();
|
||||
|
||||
Reference in New Issue
Block a user