From 9760b35197969465736c004c6c4e4a283b1b8d3b Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Thu, 2 Jan 2014 23:43:52 +0100 Subject: 591: setting positions for parameters even when running in NB editor, to avoid problems in javac's Flow. --- src/core/lombok/javac/handlers/JavacHandlerUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index ef2a936a..03c2dcff 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -149,7 +149,7 @@ public class JavacHandlerUtil { if (source == null) generatedNodes.remove(node); else generatedNodes.put(node, new WeakReference(source)); } - if (source != null && !inNetbeansEditor(context)) node.pos = source.pos; + if (source != null && (!inNetbeansEditor(context) || (node instanceof JCVariableDecl && (((JCVariableDecl) node).mods.flags & Flags.PARAMETER) != 0))) node.pos = source.pos; return node; } -- cgit