Auto-detect IDE in jar directory

This commit is contained in:
Rawi01 committed 2025-12-22 10:51:19 +01:00
1 parent 91c8c96a66
commit e07c55940e
1 file changed
+11 -1
+11 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2021 The Project Lombok Authors.
* Copyright (C) 2009-2025 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -92,6 +92,16 @@ public class Installer {
for (IdeLocationProvider provider : locationProviders) {
provider.findIdes(locations, problems);
}
// Search in lombok.jar directory
File ourJar = IdeLocation.findOurJar();
try {
IdeLocation location = tryAllProviders(ourJar.getParent());
if (location != null) {
locations.add(location);
}
} catch (CorruptedIdeLocationException e) {
problems.add(e);
}
}
public static boolean isSelf(String jar) {