diff options
-rw-r--r-- | doc/changelog.markdown | 1 | ||||
-rw-r--r-- | src/installer/lombok/installer/eclipse/EclipseProductLocation.java | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/doc/changelog.markdown b/doc/changelog.markdown index 951f579f..642034ca 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -9,6 +9,7 @@ Lombok Changelog * DEVELOPMENT: Compiling lombok on JDK1.9 is now possible. * BUGFIX: The generated hashCode would break the contract if `callSuper=true,of={}`. [Issue #1505](https://github.com/rzwitserloot/lombok/issues/1505) * BUGFIX: `delombok` no longer prints the synthetic outer-class parameter. [Issue #1521](https://github.com/rzwitserloot/lombok/issues/1521) +* INSTALLER: By default, the lombok installer now inserts an absolute path in `eclipse.ini` and friends, instead of a relative path. If you want the old behavior, you can use `java -jar -Dlombok.installer.fullpath=false lombok.jar`. ### v1.16.18 (July 3rd, 2017) * PLATFORM: JDK9 support much improved since v1.16.6; [Issue #985](https://github.com/rzwitserloot/lombok/issues/985) diff --git a/src/installer/lombok/installer/eclipse/EclipseProductLocation.java b/src/installer/lombok/installer/eclipse/EclipseProductLocation.java index 886e3e85..aa97a3e5 100644 --- a/src/installer/lombok/installer/eclipse/EclipseProductLocation.java +++ b/src/installer/lombok/installer/eclipse/EclipseProductLocation.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2016 The Project Lombok Authors. + * Copyright (C) 2009-2017 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 @@ -256,11 +256,11 @@ public final class EclipseProductLocation extends IdeLocation { */ @Override public String install() throws InstallException { - // For whatever reason, relative paths in your eclipse.ini file don't work on linux, but only for -javaagent. - // If someone knows how to fix this, please do so, as this current hack solution (putting the absolute path - // to the jar files in your eclipse.ini) means you can't move your eclipse around on linux without lombok - // breaking it. NB: rerunning lombok.jar installer and hitting 'update' will fix it if you do that. - boolean fullPathRequired = OsUtils.getOS() == OsUtils.OS.UNIX || System.getProperty("lombok.installer.fullpath") != null; + // On Linux, for whatever reason, relative paths in your eclipse.ini file don't work, but only for -javaagent. + // On Windows, since the Oomph, the generated shortcut starts in the wrong directory. + // So the default is to use absolute paths, breaking lombok when you move the eclipse directory. + // Or not break when you copy your directory, but break later when you remove the original one. + boolean fullPathRequired = !"false".equals(System.getProperty("lombok.installer.fullpath", "true")); boolean installSucceeded = false; StringBuilder newContents = new StringBuilder(); |