diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lombok/core/AnnotationProcessor.java | 4 | ||||
-rw-r--r-- | src/core/lombok/core/PublicApiCreatorApp.java | 5 | ||||
-rw-r--r-- | src/installer/lombok/installer/IdeLocation.java | 6 | ||||
-rw-r--r-- | src/installer/lombok/installer/Installer.java | 4 |
4 files changed, 9 insertions, 10 deletions
diff --git a/src/core/lombok/core/AnnotationProcessor.java b/src/core/lombok/core/AnnotationProcessor.java index e9cf3891..6c61fef2 100644 --- a/src/core/lombok/core/AnnotationProcessor.java +++ b/src/core/lombok/core/AnnotationProcessor.java @@ -43,7 +43,7 @@ import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.tools.Diagnostic.Kind; -import lombok.patcher.inject.LiveInjector; +import lombok.patcher.HomeFinder; @SupportedAnnotationTypes("*") public class AnnotationProcessor extends AbstractProcessor { @@ -102,7 +102,7 @@ public class AnnotationProcessor extends AbstractProcessor { if (environmentClassLoader != null && environmentClassLoader.getClass().getCanonicalName().equals("org.codehaus.plexus.compiler.javac.IsolatedClassLoader")) { if (lombokAlreadyAddedTo.put(environmentClassLoader, true) == null) { Method m = environmentClassLoader.getClass().getDeclaredMethod("addURL", URL.class); - URL selfUrl = new File(LiveInjector.findPathJar(AnnotationProcessor.class)).toURI().toURL(); + URL selfUrl = new File(HomeFinder.findHomeOfClass(AnnotationProcessor.class)).toURI().toURL(); m.invoke(environmentClassLoader, selfUrl); } return environmentClassLoader; diff --git a/src/core/lombok/core/PublicApiCreatorApp.java b/src/core/lombok/core/PublicApiCreatorApp.java index 24bcf83d..b776bf8f 100644 --- a/src/core/lombok/core/PublicApiCreatorApp.java +++ b/src/core/lombok/core/PublicApiCreatorApp.java @@ -35,8 +35,7 @@ import java.util.jar.JarOutputStream; import java.util.zip.ZipEntry; import lombok.Lombok; -import lombok.installer.IdeFinder; -import lombok.patcher.inject.LiveInjector; +import lombok.patcher.HomeFinder; import org.mangosdk.spi.ProviderFor; @@ -80,7 +79,7 @@ public class PublicApiCreatorApp extends LombokApp { * a jar that wasn't accessed via the file-system, or if its started via e.g. unpacking the jar. */ private static File findOurJar() { - return new File(LiveInjector.findPathJar(IdeFinder.class)); + return new File(HomeFinder.findHomeOfClass(PublicApiCreatorApp.class)); } private int writeApiJar(File outFile) throws Exception { diff --git a/src/installer/lombok/installer/IdeLocation.java b/src/installer/lombok/installer/IdeLocation.java index 4d28fb90..ea1f470f 100644 --- a/src/installer/lombok/installer/IdeLocation.java +++ b/src/installer/lombok/installer/IdeLocation.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 The Project Lombok Authors. + * Copyright (C) 2009-2014 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 @@ -26,7 +26,7 @@ import java.io.IOException; import java.net.URL; import lombok.installer.eclipse.EclipseFinder; -import lombok.patcher.inject.LiveInjector; +import lombok.patcher.HomeFinder; /** * Represents a location that contains an IDE. @@ -46,7 +46,7 @@ public abstract class IdeLocation { * a jar that wasn't accessed via the file-system, or if its started via e.g. unpacking the jar. */ public static File findOurJar() { - return new File(LiveInjector.findPathJar(IdeFinder.class)); + return new File(HomeFinder.findHomeOfClass(IdeFinder.class)); } @Override public String toString() { diff --git a/src/installer/lombok/installer/Installer.java b/src/installer/lombok/installer/Installer.java index 29ffde89..4050ad95 100644 --- a/src/installer/lombok/installer/Installer.java +++ b/src/installer/lombok/installer/Installer.java @@ -39,7 +39,7 @@ import lombok.core.LombokApp; import lombok.core.SpiLoadUtil; import lombok.core.Version; import lombok.installer.IdeFinder.OS; -import lombok.patcher.inject.LiveInjector; +import lombok.patcher.HomeFinder; import org.mangosdk.spi.ProviderFor; @@ -101,7 +101,7 @@ public class Installer { } public static boolean isSelf(String jar) { - String self = LiveInjector.findPathJar(Installer.class); + String self = HomeFinder.findHomeOfClass(Installer.class); if (self == null) return false; File a = new File(jar).getAbsoluteFile(); File b = new File(self).getAbsoluteFile(); |