diff options
author | Sander Koning <askoning@gmail.com> | 2012-01-16 12:34:24 -0800 |
---|---|---|
committer | Sander Koning <askoning@gmail.com> | 2012-01-16 12:34:24 -0800 |
commit | 06dceeb5419703b8bf87877eb6dcd448a148625a (patch) | |
tree | db3d82326ccb3ed5d98ee727102046e1ef89ed25 /src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | |
parent | 1514316a5d9ad721625b27625f2716e74e2520c2 (diff) | |
parent | 1a08aa5cbca685ffd8b056f4a4fc64ce9912027c (diff) | |
download | lombok-06dceeb5419703b8bf87877eb6dcd448a148625a.tar.gz lombok-06dceeb5419703b8bf87877eb6dcd448a148625a.tar.bz2 lombok-06dceeb5419703b8bf87877eb6dcd448a148625a.zip |
Merge pull request #27 from jvanderhel/Issue_316_Rename_with_multiple_types_II
Issue 316 rename with multiple types II
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java index ec071042..65852687 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java @@ -261,7 +261,7 @@ public class PatchFixes { } } - public static void setIsGeneratedFlagForSimpleName(SimpleName name, Object internalNode) throws Exception { + public static void setIsGeneratedFlagForName(org.eclipse.jdt.core.dom.Name name, Object internalNode) throws Exception { if (internalNode instanceof org.eclipse.jdt.internal.compiler.ast.ASTNode) { if (internalNode.getClass().getField("$generatedBy").get(internalNode) != null) { name.getClass().getField("$isGenerated").set(name, true); @@ -307,9 +307,9 @@ public class PatchFixes { public static IMethod[] removeGeneratedMethods(IMethod[] methods) throws Exception { List<IMethod> result = new ArrayList<IMethod>(); for (IMethod m : methods) { - if (m.getNameRange().getLength() > 0) result.add(m); + if (m.getNameRange().getLength() > 0 && !m.getNameRange().equals(m.getSourceRange())) result.add(m); } - return result.size() == methods.length ? methods : result.toArray(new IMethod[0]); + return result.size() == methods.length ? methods : result.toArray(new IMethod[result.size()]); } public static SimpleName[] removeGeneratedSimpleNames(SimpleName[] in) throws Exception { |