aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/launch
diff options
context:
space:
mode:
Diffstat (limited to 'src/eclipseAgent/lombok/launch')
-rwxr-xr-xsrc/eclipseAgent/lombok/launch/PatchFixesHider.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/eclipseAgent/lombok/launch/PatchFixesHider.java b/src/eclipseAgent/lombok/launch/PatchFixesHider.java
index 73a4b82d..89e2a2cc 100755
--- a/src/eclipseAgent/lombok/launch/PatchFixesHider.java
+++ b/src/eclipseAgent/lombok/launch/PatchFixesHider.java
@@ -39,9 +39,9 @@ import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.dom.ArrayType;
import org.eclipse.jdt.core.dom.MethodDeclaration;
import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.Type;
import org.eclipse.jdt.core.search.SearchMatch;
import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
import org.eclipse.jdt.internal.compiler.ast.Annotation;
@@ -519,6 +519,10 @@ final class PatchFixesHider {
return original == -1 ? end : original;
}
+ public static int fixRetrieveStartBlockPosition(int original, int start) {
+ return original == -1 ? start : original;
+ }
+
public static int fixRetrieveRightBraceOrSemiColonPosition(int original, int end) {
// if (original == -1) {
// Thread.dumpStack();
@@ -540,9 +544,9 @@ final class PatchFixesHider {
return -1;
}
- public static int fixRetrieveProperRightBracketPosition(int retVal, ArrayType arrayType) {
- if (retVal != -1 || arrayType == null) return retVal;
- if (isGenerated(arrayType)) return arrayType.getStartPosition() + arrayType.getLength() - 1;
+ public static int fixRetrieveProperRightBracketPosition(int retVal, Type type) {
+ if (retVal != -1 || type == null) return retVal;
+ if (isGenerated(type)) return type.getStartPosition() + type.getLength() - 1;
return -1;
}