From 6f9666c39113c88cb4389a86a82c78200ca7262d Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 9 Jun 2014 13:11:11 +0200 Subject: added eclipse logging to the configsystem’s error reporter, and cleaned up the changelog slightly. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/changelog.markdown | 2 +- .../lombok/core/configuration/ConfigurationProblemReporter.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/changelog.markdown b/doc/changelog.markdown index f928e5ac..46694951 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -6,7 +6,7 @@ Lombok Changelog * FEATURE: Added `@Tolerate`; put this annotation on any method or constructor and lombok will skip it when considering whether or not to generate a method or constructor. This is useful if the types of the parameters of your method do not clash with what lombok would generate. * FEATURE: Added config key `lombok.getter.noIsPrefix`, which lets you disable use and generation of `isFoo()`, instead going with `getFoo()`, for {@code boolean} fields. * BUGFIX: Errors in the eclipse log with `IndexOutOfBound: 2` in `ASTConverter.convertType`. [Issue #686](https://code.google.com/p/projectlombok/issues/detail?id=686) -* BUGFIX-IN-PROGRESS: As yet unknown conditions in eclipse result in lots of `IllegalArgumentException` in the log with message "Path must include project and resource name". This edge release will no longer error out, but we need to know when or how this occurs, thus, warnings will appear instead in your log with information pertinent to solving this issue. Please report these warnings back to us. [Issue #682](https://code.google.com/p/projectlombok/issues/detail?id=682) +* BUGFIX-IN-PROGRESS: As yet unknown conditions in eclipse result in lots of `IllegalArgumentException` in the log with message "Path must include project and resource name". Also, 'invalid URL' or 'URI not absolute' errors can occur when using exotic file system abstractions such as Jazz. These bugs haven't been fixed, but instead of catastrophic failure, warning logs will be emitted instead. [Issue #682](https://code.google.com/p/projectlombok/issues/detail?id=682) * BUGFIX: mvn builds fail with a 'URI not absolute' exception. [Issue #683](https://code.google.com/p/projectlombok/issues/detail?id=683) ### v1.14.0 "Branching Cobra" (May 27th, 2014) diff --git a/src/core/lombok/core/configuration/ConfigurationProblemReporter.java b/src/core/lombok/core/configuration/ConfigurationProblemReporter.java index 5dbf99a8..ca0c8210 100644 --- a/src/core/lombok/core/configuration/ConfigurationProblemReporter.java +++ b/src/core/lombok/core/configuration/ConfigurationProblemReporter.java @@ -21,11 +21,20 @@ */ package lombok.core.configuration; +import lombok.eclipse.handlers.EclipseHandlerUtil; + public interface ConfigurationProblemReporter { void report(String sourceDescription, String problem, int lineNumber, CharSequence line); ConfigurationProblemReporter CONSOLE = new ConfigurationProblemReporter() { @Override public void report(String sourceDescription, String problem, int lineNumber, CharSequence line) { + try { + // The console (System.err) is non-existent in eclipse environments, so we should try to + // log into at least the error log. This isn't really the appropriate place (should go in the + // relevant file instead, most people never see anything in the error log either!), but at least + // there is a way to see it, vs. System.err, which is completely invisible. + EclipseHandlerUtil.warning(String.format("%s (%s:%d)", problem, sourceDescription, lineNumber), null); + } catch (Throwable ignore) {} System.err.printf("%s (%s:%d)\n", problem, sourceDescription, lineNumber); } }; -- cgit