-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@SneakyThrows prevents some Eclipse refactorings #668
Comments
👤 jorn86 🕗 Jan 30, 2014 at 09:39 UTC What steps will reproduce the problem?
Also reproducible with @ Synchronized, I guess this is related to inserting code at the start and end of the method. 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. Stack trace from error log: |
👤 reinierz 🕗 Feb 07, 2014 at 02:19 UTC I added a commit to master branch that adds a new build target called 'eclipseForDebugging'. It's like 'eclipse', except it adds the eclipse deps straight from your eclipse install instead of the default (fairly ancient) eclipse, and adds a couple of non-deps which are nevertheless useful (to set breakpoints and such). It's step one to fixing this and a couple of other places where eclipse integration is less than perfect. |
👤 r.spilker 🕗 Feb 18, 2014 at 22:28 UTC During debugging we noticed that ASTRewrite﹟internalRewriteAST gets passed a Block in normal cases and a LocalVariableDeclaration when it fails. It might make sense that it's always supposed to get a Block since it needs to generate a local variable in some scope. Therefore it looks like this bug can more specifically be stated as: "Why is an LVD passed to internalRewriteAST instead of a Block?" |
👤 r.spilker 🕗 Feb 18, 2014 at 22:53 UTC Refactors run on the org.eclipse.dom variant of the AST, and not the one lombok primarily works with (the internal). The dom variant has a flag called 'ORIGINAL', set on almost every node (in the 'typeAndFlags' field). The refactor scripts won't consider non-ORIGINAL nodes as places to generate code for / into. The relevant block when using @ SneakyThrows is the (generated) braces that go with the generated 'try' statement. This block IS in the org.eclipse.dom variant, but does NOT have the ORIGINAL flag set. That seems to be the problem (it's possible that further problems will ensue when we fix this). This bug has now been reduced to: Why is that ORIGINAL flag not set? Should we use patches to force-set it, or is there something simpler we can do to set this flag? Should we even set this flag (in many ways, it is enticing to treat generated code as not original), in which case we should patch org.eclipse.jdt.internal.core.dom.RewriteEventStore﹟isNewNode(ASTNode node) to always return 'false' is ASTNode is generated. That is a dom-style ASTNode, which has a generated $isGenerated field). |
👤 r.spilker 🕗 Feb 20, 2014 at 20:25 UTC Fixed in c72e2a2 The fix was reverting a change from 2010. We've created an edge release so you can try it out: https://projectlombok.org/download-edge.html |
👤 r.spilker 🕗 Feb 20, 2014 at 20:34 UTC This fix also fixes issue #511. |
End of migration |
Migrated from Google Code (issue 633)
The text was updated successfully, but these errors were encountered: