aboutsummaryrefslogtreecommitdiff
path: root/src/installer
diff options
context:
space:
mode:
Diffstat (limited to 'src/installer')
-rw-r--r--src/installer/lombok/installer/InstallerGUI.java5
-rw-r--r--src/installer/lombok/installer/eclipse/EclipseProductLocation.java12
-rw-r--r--src/installer/lombok/installer/eclipse/STS4LocationProvider.java44
3 files changed, 55 insertions, 6 deletions
diff --git a/src/installer/lombok/installer/InstallerGUI.java b/src/installer/lombok/installer/InstallerGUI.java
index b96fec9c..231e2d3c 100644
--- a/src/installer/lombok/installer/InstallerGUI.java
+++ b/src/installer/lombok/installer/InstallerGUI.java
@@ -171,6 +171,7 @@ public class InstallerGUI {
container.add(buttonBar, constraints);
container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415));
+ container.setMinimumSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415));
return container;
}
@@ -195,6 +196,7 @@ public class InstallerGUI {
JLabel title;
container.add(title = new JLabel(SUCCESS_TITLE), constraints);
title.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 20));
+ title.setMinimumSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 20));
constraints.gridy = 1;
constraints.insets = new Insets(8, 0, 0, 16);
@@ -296,6 +298,7 @@ public class InstallerGUI {
container.add(buttonBar, constraints);
container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415));
+ container.setMinimumSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415));
return container;
}
@@ -319,6 +322,7 @@ public class InstallerGUI {
constraints.gridy = 2;
container.add(example, constraints);
container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 105));
+ container.setMinimumSize(new Dimension(INSTALLER_WINDOW_WIDTH, 105));
return container;
}
@@ -507,6 +511,7 @@ public class InstallerGUI {
container.add(uninstallPlaceholder, constraints);
container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 296));
+ container.setMinimumSize(new Dimension(INSTALLER_WINDOW_WIDTH, 296));
return container;
}
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();
diff --git a/src/installer/lombok/installer/eclipse/STS4LocationProvider.java b/src/installer/lombok/installer/eclipse/STS4LocationProvider.java
new file mode 100644
index 00000000..47a07bdd
--- /dev/null
+++ b/src/installer/lombok/installer/eclipse/STS4LocationProvider.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2018 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
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package lombok.installer.eclipse;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+import lombok.installer.IdeLocationProvider;
+
+import org.mangosdk.spi.ProviderFor;
+
+@ProviderFor(IdeLocationProvider.class)
+public class STS4LocationProvider extends EclipseProductLocationProvider {
+
+ private static final EclipseProductDescriptor STS4 = new StandardProductDescriptor("Spring Tools Suite 4",
+ "SpringToolSuite4",
+ "sts",
+ STS4LocationProvider.class.getResource("STS.png"),
+ Collections.unmodifiableList(Arrays.asList("springsource", "spring-tool-suite"))
+ );
+
+ public STS4LocationProvider() {
+ super(STS4);
+ }
+}