roaster icon indicating copy to clipboard operation
roaster copied to clipboard

ROASTER-1: Java Statement Fluent Model

Open sotty opened this issue 10 years ago • 22 comments

Update Copyright

sotty avatar Sep 08 '14 03:09 sotty

The changes in MethodImpl are not updated to the last commit, could you fix that? Thanks.

gastaldi avatar Sep 08 '14 04:09 gastaldi

oops something went wrong with the rebase.. should be fixed now

sotty avatar Sep 08 '14 04:09 sotty

It looks like it is not using the Forge formatter. Could you apply the formatter and rebase with the latest master?

Thanks!

gastaldi avatar Nov 12 '14 15:11 gastaldi

This is the formatter used in Eclipse: https://raw.githubusercontent.com/forge/core/master/eclipse-code-formatter-profile.xml

gastaldi avatar Nov 12 '14 15:11 gastaldi

What about having a method MethodSource<O> setBody( Statement... blocks ); ? This would allow something like :

    method.setBody(
            newDeclare().setVariable(Integer.class, "y"),
            newDeclare().setVariable(String.class, "x")
    );

WDYT ?

agoncal avatar Apr 17 '15 16:04 agoncal

Agreed. Actually it's already in the next version of this PR, which I haven't committed yet :)

sotty avatar Apr 18 '15 00:04 sotty

Cool. Commit it and I'll give it a try

agoncal avatar Apr 18 '15 13:04 agoncal

Next item is checking the consistency of the internal "origin"/"parent" tree

sotty avatar Jul 26 '15 15:07 sotty

I like this, excellent job!

gastaldi avatar Jul 27 '15 19:07 gastaldi

How is parsing of statements work in this proposal? Suppose you want to change some statement in an existing class (change the for loop condition, add another statement), how will this be possible?

gastaldi avatar Jul 28 '15 20:07 gastaldi

This is the new feature I (and Mario) started adding in the latest iteration. It needs more testing and some more work, but see the test case here: mpl/src/test/java/org/jboss/forge/test/roaster/model/statements/ModifyMethodBodyTest.java

On Tue, Jul 28, 2015 at 3:21 PM, George Gastaldi [email protected] wrote:

How is parsing of statements work in this proposal? Suppose you want to change some statement in an existing class (change the for loop condition, add another statement), how will this be possible?

— Reply to this email directly or view it on GitHub https://github.com/forge/roaster/pull/27#issuecomment-125743320.

sotty avatar Jul 28 '15 21:07 sotty

Oops broken paste :) https://github.com/sotty/roaster/blob/master/impl/src/test/java/org/jboss/forge/test/roaster/model/statements/ModifyMethodBodyTest.java

On Tue, Jul 28, 2015 at 4:39 PM, Davide Sottara [email protected] wrote:

This is the new feature I (and Mario) started adding in the latest iteration. It needs more testing and some more work, but see the test case here:

mpl/src/test/java/org/jboss/forge/test/roaster/model/statements/ModifyMethodBodyTest.java

On Tue, Jul 28, 2015 at 3:21 PM, George Gastaldi <[email protected]

wrote:

How is parsing of statements work in this proposal? Suppose you want to change some statement in an existing class (change the for loop condition, add another statement), how will this be possible?

— Reply to this email directly or view it on GitHub https://github.com/forge/roaster/pull/27#issuecomment-125743320.

sotty avatar Jul 28 '15 21:07 sotty

Any update on this?

jamestyrrell avatar Jul 05 '16 06:07 jamestyrrell

Can one of the admins verify this patch?

forge-bot avatar Jul 05 '16 06:07 forge-bot

@sotty, are you still working on this PR?

gastaldi avatar Jul 06 '16 15:07 gastaldi

I am, and I have just come back to development this week after a long period working on other things. So expect to hear back from me very soon

On Wed, Jul 6, 2016 at 10:16 AM, George Gastaldi [email protected] wrote:

@sotty https://github.com/sotty, are you still working on this PR?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/forge/roaster/pull/27#issuecomment-230804330, or mute the thread https://github.com/notifications/unsubscribe/AAf0Olz4-yQGhfH4n_jwRkNDcGFT18uFks5qS8bDgaJpZM4CfcnO .

sotty avatar Jul 06 '16 15:07 sotty

Awesome, thank you. Haven't fully checked yet, but it would be nice if it supported Lambdas too.

gastaldi avatar Jul 06 '16 15:07 gastaldi

@sotty That is great to hear as I just started to get my hands dirty and hit a wall when VariableDeclarator.getInit() gives me back a String.

jamestyrrell avatar Jul 06 '16 15:07 jamestyrrell

Perhaps this project may give some ideas: https://github.com/square/javapoet

gastaldi avatar Jul 06 '16 15:07 gastaldi

@sotty Hi is there any update on this project? Thanks

prksean avatar Feb 12 '18 21:02 prksean

@sotty I really love this idea. Do you think you are able to finish it in the next time or is there any update on this?

kasium avatar Jan 26 '19 16:01 kasium

Unfortunately I do not have the bandwidth these days, but I may have time to get back to this project in late around mid May

On Sat, Jan 26, 2019 at 10:07 AM Kai Müller [email protected] wrote:

@sotty https://github.com/sotty I really love this idea. Do you think you are able to finish it in the next time or is there any update on this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/forge/roaster/pull/27#issuecomment-457842989, or mute the thread https://github.com/notifications/unsubscribe-auth/AAf0OgSmM5Pj4cpJ6dx29rNeh4WjiJHKks5vHH0ngaJpZM4CfcnO .

sotty avatar Jan 28 '19 12:01 sotty