aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/launch/PatchFixesHider.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-01-29 00:43:46 +0100
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-01-29 00:43:46 +0100
commit54dce4c83b57b78c75f471ec5978b87b2bbd464f (patch)
tree9fb92d983b8a33f621e79867cd08e8c92aed3ad3 /src/eclipseAgent/lombok/launch/PatchFixesHider.java
parent2a8225a6af39d4a82f20928409fcb96ae72d363f (diff)
downloadlombok-54dce4c83b57b78c75f471ec5978b87b2bbd464f.tar.gz
lombok-54dce4c83b57b78c75f471ec5978b87b2bbd464f.tar.bz2
lombok-54dce4c83b57b78c75f471ec5978b87b2bbd464f.zip
[fixes #2024] FieldNameConstants was causing lots of problems in eclipse, especially with save actions.
Diffstat (limited to 'src/eclipseAgent/lombok/launch/PatchFixesHider.java')
-rwxr-xr-xsrc/eclipseAgent/lombok/launch/PatchFixesHider.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/eclipseAgent/lombok/launch/PatchFixesHider.java b/src/eclipseAgent/lombok/launch/PatchFixesHider.java
index 5c409603..3741aba8 100755
--- a/src/eclipseAgent/lombok/launch/PatchFixesHider.java
+++ b/src/eclipseAgent/lombok/launch/PatchFixesHider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2015 The Project Lombok Authors.
+ * Copyright (C) 2010-2019 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
@@ -31,8 +31,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Stack;
-import lombok.eclipse.EclipseAugments;
-
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IAnnotatable;
import org.eclipse.jdt.core.IAnnotation;
@@ -64,6 +62,8 @@ import org.eclipse.jdt.internal.core.dom.rewrite.TokenScanner;
import org.eclipse.jdt.internal.corext.refactoring.SearchResultGroup;
import org.eclipse.jdt.internal.corext.refactoring.structure.ASTNodeSearchUtil;
+import lombok.eclipse.EclipseAugments;
+
/** These contain a mix of the following:
* <ul>
* <li> 'dependency free' method wrappers that cross the shadowloader barrier.
@@ -476,8 +476,10 @@ final class PatchFixesHider {
return original == -1 ? start : original;
}
- public static int fixRetrieveIdentifierEndPosition(int original, int end) {
- return original == -1 ? end : original;
+ public static int fixRetrieveIdentifierEndPosition(int original, int start, int end) {
+ if (original == -1) return end;
+ if (original < start) return end;
+ return original;
}
public static int fixRetrieveEllipsisStartPosition(int original, int end) {