Recently I noticed that the @Value annotation (https://projectlombok.org/features/Value.html) stopped generating the expected fields. It doesn't appear to be generating anything, but this is most easily seen with the lack of getters:
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Value;
public class scratch {
public static void main(String[] args) {
GetterEx getterEx = new GetterEx("some-value");
getterEx.getValue(); // <- This works just fine.
ValueEx valueEx = new ValueEx("some-value");
valueEx.getValue(); // <- This is no longer working.
}
@AllArgsConstructor
@Getter
public static class GetterEx {
private String value;
}
@AllArgsConstructor
@Value
public static class ValueEx {
private final String value;
}
}
I'm running:
IntelliJ IDEA 2016.3
Build #IU-163.7743.44, built on November 17, 2016
JRE: 1.8.0_112-release-408-b2 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Lombok Plugin: 0.13.16
I saw something simular. I'v got a class, annotated as Value
@Value
@AllArgsConstructor(access = AccessLevel.PACKAGE)
class FunctionParameters {
private final double a;
private final double b;
private final double c;
private final double d;
private final double e;
}
In my case the generated code is correct:
final class FunctionParameters {
private final double a;
private final double b;
private final double c;
private final double d;
private final double e;
public double getA() {
return this.a;
}
public double getB() {
return this.b;
}
public double getC() {
return this.c;
}
public double getD() {
return this.d;
}
public double getE() {
return this.e;
}
public boolean equals(Object o) {
if(o == this) {
return true;
} else if(!(o instanceof FunctionParameters)) {
return false;
} else {
FunctionParameters other = (FunctionParameters)o;
return Double.compare(this.getA(), other.getA()) != 0?false:(Double.compare(this.getB(), other.getB()) != 0?false:(Double.compare(this.getC(), other.getC()) != 0?false:(Double.compare(this.getD(), other.getD()) != 0?false:Double.compare(this.getE(), other.getE()) == 0)));
}
}
public int hashCode() {
boolean PRIME = true;
byte result = 1;
long $a = Double.doubleToLongBits(this.getA());
int result1 = result * 59 + (int)($a >>> 32 ^ $a);
long $b = Double.doubleToLongBits(this.getB());
result1 = result1 * 59 + (int)($b >>> 32 ^ $b);
long $c = Double.doubleToLongBits(this.getC());
result1 = result1 * 59 + (int)($c >>> 32 ^ $c);
long $d = Double.doubleToLongBits(this.getD());
result1 = result1 * 59 + (int)($d >>> 32 ^ $d);
long $e = Double.doubleToLongBits(this.getE());
result1 = result1 * 59 + (int)($e >>> 32 ^ $e);
return result1;
}
public String toString() {
return "FunctionParameters(a=" + this.getA() + ", b=" + this.getB() + ", c=" + this.getC() + ", d=" + this.getD() + ", e=" + this.getE() + ")";
}
FunctionParameters(double a, double b, double c, double d, double e) {
this.a = a;
this.b = b;
this.c = c;
this.d = d;
this.e = e;
}
}
But the syntax checker says that he cannot resolve method:

Same issue here, compiled class is ok but Intellij is not showing generated code in Structure View and not in Autocompletion.
No Getters Setters etc...
IntelliJ IDEA 2016.3.2
Build #IU-163.10154.41, built on December 21, 2016
JRE: 1.8.0_112-release-408-b6 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
I have structure window shows all correct
Class and fields have final marks and fields also have private logo
But I don't see it in the code generated from menu Refactor -> Delombok


after Delomobok:

IntelliJ IDEA 2017.2.3 EAP
Build #IU-172.3968.1, built on August 15, 2017
JRE: 1.8.0_152-release-915-b10 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Did you tried to restart IntelliJ and invalidate IntelliJ caches?
Unfortunatly, I cann't reproduce this issue, please provide some example, showing incorrect behavior.
Will close it for now, feel free to reopen the issue.
Most helpful comment
Same issue here, compiled class is ok but Intellij is not showing generated code in Structure View and not in Autocompletion.
No Getters Setters etc...
IntelliJ IDEA 2016.3.2
Build #IU-163.10154.41, built on December 21, 2016
JRE: 1.8.0_112-release-408-b6 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o