Add Angular IDE support in installer, fixes #1830

This commit is contained in:
Roel Spilker committed 2018-09-03 22:46:22 +02:00
1 parent a29c17761c
commit f1c9909bd4
4 files changed
+60 -2

No files matched your search

+2 -1
View File
@@ -6,6 +6,8 @@ Lombok Changelog
* BUGFIX: When using lombok to compile modularized (`module-info.java`-style) code, if the module name has dots in it, it wouldn't work. [Issue #1808](https://github.com/rzwitserloot/lombok/issues/1808)
* BUGFIX: Errors about lombok not reading a module providing `org.mapstruct.ap.spi` when trying to use lombok in jigsaw-mode on JDK 11. [Issue #1806](https://github.com/rzwitserloot/lombok/issues/1806)
* BUGFIX: Fix NetBeans compile on save. [Issue #1770](https://github.com/rzwitserloot/lombok/issues/1770)
* PLATFORM: Angular IDE is now recognized by the installer [Issue #1830](https://github.com/rzwitserloot/lombok/issues/1830)
### v1.18.2 (July 26th, 2018)
* BUGFIX: mapstruct + lombok in eclipse should hopefully work again. [Issue #1359](https://github.com/rzwitserloot/lombok/issues/1359) and [mapstruct issue #1159](https://github.com/mapstruct/mapstruct/issues/1159)
@@ -14,7 +16,6 @@ Lombok Changelog
* BUGFIX: Lombok and gradle v4.9 didn't work together; that's been fixed. [Issue #1716](https://github.com/rzwitserloot/lombok/issues/1716) and [gradle-apt-plugin issue #87](https://github.com/tbroyer/gradle-apt-plugin/issues/87)
* FEATURE: You can now make builders for type hierarchies, using the new (experimental) `@SuperBuilder` annotation. Thanks for the contribution, Jan Rieke. [`@SuperBuilder` documentation](https://projectlombok.org/features/experimental/SuperBuilder)
* FEATURE: `@NoArgsConstructor`, including forcing one with `lombok.config: lombok.noArgsConstructor.extraPrivate=true` now take any defaults set with `@Builder.Default` into account. [Issue #1347](https://github.com/rzwitserloot/lombok/issues/1347)
### v1.18.0 (June 5th, 2018)
* BREAKING CHANGE: The in 1.16.22 introduced configuration key `lombok.noArgsConstructor.extraPrivate` is now `false` by default. [Issue #1708](https://github.com/rzwitserloot/lombok/issues/1708)
* BUGFIX: Do not generate a private no-args constructor if that breaks the code. [Issue #1703](https://github.com/rzwitserloot/lombok/issues/1703), [Issue #1704](https://github.com/rzwitserloot/lombok/issues/1704), [Issue #1712](https://github.com/rzwitserloot/lombok/issues/1712)
@@ -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.Collections;
import org.mangosdk.spi.ProviderFor;
import lombok.installer.IdeLocationProvider;
@ProviderFor(IdeLocationProvider.class)
public class AngularIDELocationProvider extends EclipseProductLocationProvider {
private static final EclipseProductDescriptor ANGULAR = new StandardProductDescriptor(
"Angular IDE",
"angularide",
"angular",
AngularIDELocationProvider.class.getResource("angular.png"),
Collections.<String>emptySet()
);
public AngularIDELocationProvider() {
super(ANGULAR);
}
}
@@ -21,6 +21,7 @@
*/
package lombok.installer.eclipse;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
@@ -34,7 +35,7 @@ import lombok.installer.OsUtils;
public class StandardProductDescriptor implements EclipseProductDescriptor {
private static final String USER_HOME = System.getProperty("user.home", ".");
private static final String[] WINDOWS_ROOTS = {"\\", "\\Program Files", "\\Program Files (x86)", USER_HOME};
private static final String[] WINDOWS_ROOTS = windowsRoots();
private static final String[] MAC_ROOTS = {"/Applications", USER_HOME};
private static final String[] UNIX_ROOTS = {USER_HOME};
@@ -155,4 +156,16 @@ public class StandardProductDescriptor implements EclipseProductDescriptor {
}
return base + pathSeparator + alternative.replaceAll("[\\/]", "\\" + pathSeparator);
}
private static String[] windowsRoots() {
String localAppData = windowsLocalAppData();
if (localAppData == null) return new String[] {"\\", "\\Program Files", "\\Program Files (x86)", USER_HOME};
return new String[] {"\\", "\\Program Files", "\\Program Files (x86)", USER_HOME, localAppData};
}
private static String windowsLocalAppData() {
String localAppData = System.getenv("LOCALAPPDATA");
File file = localAppData == null ? null : new File(localAppData);
return file != null && file.exists() && file.canRead() && file.isDirectory() ? localAppData : null;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1012 B