Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Eclipse assign parameter not in class body #295
What steps will reproduce the problem?
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
A proper fix (vs the patchwork solution we applied for 155) for all these errors is rather complicated and involves tracking 2 positions for any given generated lombok node - where the code would have appeared if you typed it by hand, and the source annotation that caused it to be generated in the first place.
Then, we should patch 'jump to declaration' and friends to use the generating node, but set the position on the node itself to where it would have appeared. Right now we don't do this, so if we fix this, then 'go to declaration' would be broken and vice versa.
I still can reproduce this with Eclipse Indigo SR 1 and Lombok 0.10.4.
Create this class:
Right-click on parameter1 and choose "Assign paramter to new field". The field is created above the @ Data annotation which is incorrect.
Sorry, I should have provided the download link to clarify which edge-release I meant. https://projectlombok.org/download-edge.html
However I do see that the parameter has a generic type, maybe that causes the problem.
I'm working with Eclipse Indigo SR 1 as well.