From 1e6f5fc892b0ece639dfe1c2d640ee84ce6202d1 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sat, 12 Dec 2009 14:25:57 +0100 Subject: installer fixes: - when manually specifying paths via the command line installer, each location would get installed/uninstalled twice, and errors would occur if you provided paths with no known IDEs - fixed a problematic earlier checkin regarding STSFinder; now STSFinder looks in all the appropriate spots. --- src/installer/lombok/installer/IdeLocation.java | 4 ++++ src/installer/lombok/installer/Installer.java | 1 - src/installer/lombok/installer/eclipse/STSFinder.java | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/installer/lombok/installer/IdeLocation.java b/src/installer/lombok/installer/IdeLocation.java index e23a0033..f23eef01 100644 --- a/src/installer/lombok/installer/IdeLocation.java +++ b/src/installer/lombok/installer/IdeLocation.java @@ -48,6 +48,10 @@ public abstract class IdeLocation { return new File(LiveInjector.findPathJar(IdeFinder.class)); } + @Override public String toString() { + return getName(); + } + /** * Returns a full path to the provided file. * Returns the canonical path, unless that is not available, in which cae it returns the absolute path. diff --git a/src/installer/lombok/installer/Installer.java b/src/installer/lombok/installer/Installer.java index 9ed9e93a..7700cd90 100644 --- a/src/installer/lombok/installer/Installer.java +++ b/src/installer/lombok/installer/Installer.java @@ -240,7 +240,6 @@ public class Installer { IdeLocation loc = tryAllProviders(rawPath); if (loc != null) locations.add(loc); else problems.add(new CorruptedIdeLocationException("Can't find any IDE at: " + rawPath, null, null)); - locations.add(tryAllProviders(rawPath)); } catch (CorruptedIdeLocationException e) { problems.add(e); } diff --git a/src/installer/lombok/installer/eclipse/STSFinder.java b/src/installer/lombok/installer/eclipse/STSFinder.java index 47abb186..15e0404d 100644 --- a/src/installer/lombok/installer/eclipse/STSFinder.java +++ b/src/installer/lombok/installer/eclipse/STSFinder.java @@ -57,8 +57,7 @@ public class STSFinder extends EclipseFinder { } @Override protected List getSourceDirsOnWindows() { -// return Arrays.asList("\\", "\\springsource", "\\Program Files", "\\Program Files\\springsource", System.getProperty("user.home", "."), System.getProperty("user.home", ".") + "\\springsource"); - return Arrays.asList(); + return Arrays.asList("\\", "\\springsource", "\\Program Files", "\\Program Files\\springsource", System.getProperty("user.home", "."), System.getProperty("user.home", ".") + "\\springsource"); } @Override protected List getSourceDirsOnMac() { -- cgit