aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2014-06-09 13:11:11 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2014-06-09 13:11:11 +0200
commit6f9666c39113c88cb4389a86a82c78200ca7262d (patch)
tree5be185464faf8ec275a1c8184697e13bb44fcde3 /src/core
parent33ead46639087a4e772d6535d0354f39fadc5724 (diff)
downloadlombok-6f9666c39113c88cb4389a86a82c78200ca7262d.tar.gz
lombok-6f9666c39113c88cb4389a86a82c78200ca7262d.tar.bz2
lombok-6f9666c39113c88cb4389a86a82c78200ca7262d.zip
added eclipse logging to the configsystem’s error reporter, and cleaned up the changelog slightly.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/core/configuration/ConfigurationProblemReporter.java9
1 files changed, 9 insertions, 0 deletions
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);
}
};