aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok
diff options
context:
space:
mode:
authorjvanderhel <Jappe.vanderhel@gmail.com>2011-11-22 19:42:31 +0100
committerjvanderhel <Jappe.vanderhel@gmail.com>2011-11-22 19:49:01 +0100
commitd3b9074f86a297d56966cb5965ae5e5aad603981 (patch)
treec54365907ae15b71a46777ae550a44dd7c75b03f /src/core/lombok
parentef820d8d5ab76c6db8335201da3c7ab9de7cb56a (diff)
downloadlombok-d3b9074f86a297d56966cb5965ae5e5aad603981.tar.gz
lombok-d3b9074f86a297d56966cb5965ae5e5aad603981.tar.bz2
lombok-d3b9074f86a297d56966cb5965ae5e5aad603981.zip
Added some more statementEnds to avoid errors in eclipse log
Diffstat (limited to 'src/core/lombok')
-rw-r--r--src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java7
-rw-r--r--src/core/lombok/eclipse/handlers/HandleGetter.java19
2 files changed, 15 insertions, 11 deletions
diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
index 96dea22d..5130c7de 100644
--- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
+++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
@@ -848,7 +848,7 @@ public class EclipseHandlerUtil {
MessageSend call = new MessageSend();
setGeneratedBy(call, source);
- call.sourceStart = pS; call.sourceEnd = pE;
+ call.sourceStart = pS; call.statementEnd = call.sourceEnd = pE;
call.receiver = new ThisReference(pS, pE);
setGeneratedBy(call.receiver, source);
call.selector = getter.name;
@@ -878,7 +878,7 @@ public class EclipseHandlerUtil {
MessageSend call = new MessageSend();
setGeneratedBy(call, source);
- call.sourceStart = pS; call.sourceEnd = pE;
+ call.sourceStart = pS; call.statementEnd = call.sourceEnd = pE;
call.receiver = new SingleNameReference(receiver, p);
setGeneratedBy(call.receiver, source);
call.selector = getter.name;
@@ -1136,7 +1136,7 @@ public class EclipseHandlerUtil {
NullLiteral nullLiteral = new NullLiteral(pS, pE);
setGeneratedBy(nullLiteral, source);
EqualExpression equalExpression = new EqualExpression(varName, nullLiteral, OperatorIds.EQUAL_EQUAL);
- equalExpression.sourceStart = pS; equalExpression.sourceEnd = pE;
+ equalExpression.sourceStart = pS; equalExpression.statementEnd = equalExpression.sourceEnd = pE;
setGeneratedBy(equalExpression, source);
IfStatement ifStatement = new IfStatement(equalExpression, throwStatement, 0, 0);
setGeneratedBy(ifStatement, source);
@@ -1226,6 +1226,7 @@ public class EclipseHandlerUtil {
result.sourceStart = source.sourceStart;
result.sourceEnd = source.sourceEnd;
+ result.statementEnd = source.sourceEnd;
setGeneratedBy(result, source);
return result;
diff --git a/src/core/lombok/eclipse/handlers/HandleGetter.java b/src/core/lombok/eclipse/handlers/HandleGetter.java
index fa66d1aa..1d59afb4 100644
--- a/src/core/lombok/eclipse/handlers/HandleGetter.java
+++ b/src/core/lombok/eclipse/handlers/HandleGetter.java
@@ -305,12 +305,12 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
TypeReference[][] typeParams = AR_PARAMS.clone();
typeParams[4] = new TypeReference[] {copyType(componentType, source)};
valueDecl.type = new ParameterizedQualifiedTypeReference(AR, typeParams, 0, poss(source, 5));
- valueDecl.type.sourceStart = pS; valueDecl.type.sourceEnd = pE;
+ valueDecl.type.sourceStart = pS; valueDecl.type.sourceEnd = valueDecl.type.statementEnd = pE;
setGeneratedBy(valueDecl.type, source);
MessageSend getter = new MessageSend();
setGeneratedBy(getter, source);
- getter.sourceStart = pS; getter.sourceEnd = pE;
+ getter.sourceStart = pS; getter.statementEnd = getter.sourceEnd = pE;
getter.selector = new char[] {'g', 'e', 't'};
getter.receiver = createFieldAccessor(fieldNode, FieldAccess.ALWAYS_FIELD, source);
@@ -345,10 +345,11 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
/* value = this.fieldName.get(); */ {
MessageSend getter = new MessageSend();
setGeneratedBy(getter, source);
- getter.sourceStart = pS; getter.sourceEnd = pE;
+ getter.sourceStart = pS; getter.sourceEnd = getter.statementEnd = pE;
getter.selector = new char[] {'g', 'e', 't'};
getter.receiver = createFieldAccessor(fieldNode, FieldAccess.ALWAYS_FIELD, source);
Assignment assign = new Assignment(new SingleNameReference(valueName, p), getter, pE);
+ assign.sourceStart = pS; assign.statementEnd = assign.sourceEnd = pE;
setGeneratedBy(assign, source);
setGeneratedBy(assign.lhs, source);
inner.statements[0] = assign;
@@ -366,14 +367,16 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
/*value = new java.util.concurrent.atomic.AtomicReference<ValueType>(new ValueType()); */ {
AllocationExpression create = new AllocationExpression();
setGeneratedBy(create, source);
- create.sourceStart = pS; create.sourceEnd = pE;
+ create.sourceStart = pS; create.sourceEnd = create.statementEnd = pE;
TypeReference[][] typeParams = AR_PARAMS.clone();
typeParams[4] = new TypeReference[] {copyType(componentType, source)};
create.type = new ParameterizedQualifiedTypeReference(AR, typeParams, 0, poss(source, 5));
- create.type.sourceStart = pS; create.type.sourceEnd = pE;
+ create.type.sourceStart = pS; create.type.sourceEnd = create.type.statementEnd = pE;
setGeneratedBy(create.type, source);
create.arguments = new Expression[] {field.initialization};
Assignment innerAssign = new Assignment(new SingleNameReference(valueName, p), create, pE);
+ innerAssign.sourceStart = pS; innerAssign.statementEnd = innerAssign.sourceEnd = pE;
+
setGeneratedBy(innerAssign, source);
setGeneratedBy(innerAssign.lhs, source);
innerThen.statements[0] = innerAssign;
@@ -382,7 +385,7 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
/*this.fieldName.set(value);*/ {
MessageSend setter = new MessageSend();
setGeneratedBy(setter, source);
- setter.sourceStart = pS; setter.sourceEnd = pE;
+ setter.sourceStart = pS; setter.sourceEnd = setter.statementEnd = pE;
setter.receiver = createFieldAccessor(fieldNode, FieldAccess.ALWAYS_FIELD, source);
setter.selector = new char[] { 's', 'e', 't' };
setter.arguments = new Expression[] {
@@ -408,7 +411,7 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
/* return value.get(); */ {
MessageSend getter = new MessageSend();
setGeneratedBy(getter, source);
- getter.sourceStart = pS; getter.sourceEnd = pE;
+ getter.sourceStart = pS; getter.sourceEnd = getter.statementEnd = pE;
getter.selector = new char[] {'g', 'e', 't'};
getter.receiver = new SingleNameReference(valueName, p);
setGeneratedBy(getter.receiver, source);
@@ -435,7 +438,7 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
field.type = type;
AllocationExpression init = new AllocationExpression();
// Some magic here
- init.sourceStart = field.initialization.sourceStart; init.sourceEnd = field.initialization.sourceEnd;
+ init.sourceStart = field.initialization.sourceStart; init.sourceEnd = init.statementEnd = field.initialization.sourceEnd;
init.type = copyType(type, source);
field.initialization = init;
}