Skip to content

ROASTER-1: Java Statement Fluent Model#27

Open
sotty wants to merge 1 commit into
forge:masterfrom
sotty:stats_exprs
Open

ROASTER-1: Java Statement Fluent Model#27
sotty wants to merge 1 commit into
forge:masterfrom
sotty:stats_exprs

Conversation

@sotty

@sotty sotty commented Sep 8, 2014

Copy link
Copy Markdown
Contributor

Update Copyright

@gastaldi

gastaldi commented Sep 8, 2014

Copy link
Copy Markdown
Member

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

@sotty

sotty commented Sep 8, 2014

Copy link
Copy Markdown
Contributor Author

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

@gastaldi gastaldi changed the title Java Statement Fluent Model ROASTER-1: Java Statement Fluent Model Sep 11, 2014
@gastaldi gastaldi force-pushed the master branch 2 times, most recently from 7badf29 to 70f87e1 Compare September 11, 2014 19:18
@lincolnthree lincolnthree force-pushed the master branch 2 times, most recently from d9e5f2c to ff28cd6 Compare September 22, 2014 21:13
@gastaldi

Copy link
Copy Markdown
Member

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

Thanks!

@gastaldi

Copy link
Copy Markdown
Member

@sotty sotty force-pushed the stats_exprs branch 2 times, most recently from c5386ab to 5955b08 Compare December 30, 2014 15:41
@agoncal

agoncal commented Apr 17, 2015

Copy link
Copy Markdown

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 ?

@sotty

sotty commented Apr 18, 2015

Copy link
Copy Markdown
Contributor Author

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

@agoncal

agoncal commented Apr 18, 2015

Copy link
Copy Markdown

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

@sotty sotty force-pushed the stats_exprs branch 4 times, most recently from 72450f4 to 247be3b Compare July 26, 2015 02:49

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this method needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover, removed

On Sat, Jul 25, 2015 at 11:46 PM, George Gastaldi notifications@github.com
wrote:

In api/src/main/java/org/jboss/forge/roaster/model/JavaClass.java
#27 (comment):

@@ -33,4 +34,5 @@
*/
public boolean isLocalClass();

  • public JavaClassSource asJavaClassSource();

Why is this method needed?


Reply to this email directly or view it on GitHub
https://github.com/forge/roaster/pull/27/files#r35489315.

Update Copyright

Conflicts:
	api/src/main/java/org/jboss/forge/roaster/model/source/MethodSource.java
	impl/src/main/java/org/jboss/forge/roaster/model/impl/AnnotationImpl.java
	impl/src/main/java/org/jboss/forge/roaster/model/impl/MethodImpl.java

Conflicts:
	impl/src/main/java/org/jboss/forge/roaster/model/impl/MethodImpl.java
@sotty

sotty commented Jul 26, 2015

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import

@gastaldi

Copy link
Copy Markdown
Member

I like this, excellent job!

@gastaldi

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have more meaningful names for these generics?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but for uniformity that would need to happen across all the codebase

@sotty

sotty commented Jul 28, 2015

Copy link
Copy Markdown
Contributor Author

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 notifications@github.com
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
#27 (comment).

@sotty

sotty commented Jul 28, 2015

Copy link
Copy Markdown
Contributor Author

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 dsotty@gmail.com 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 <notifications@github.com

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
#27 (comment).

@jamestyrrell

Copy link
Copy Markdown

Any update on this?

@forge-bot

Copy link
Copy Markdown
Contributor

Can one of the admins verify this patch?

@gastaldi

gastaldi commented Jul 6, 2016

Copy link
Copy Markdown
Member

@sotty, are you still working on this PR?

@sotty

sotty commented Jul 6, 2016

Copy link
Copy Markdown
Contributor Author

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 notifications@github.com
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
#27 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAf0Olz4-yQGhfH4n_jwRkNDcGFT18uFks5qS8bDgaJpZM4CfcnO
.

@gastaldi

gastaldi commented Jul 6, 2016

Copy link
Copy Markdown
Member

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

@jamestyrrell

Copy link
Copy Markdown

@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.

@gastaldi

gastaldi commented Jul 6, 2016

Copy link
Copy Markdown
Member

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

@prksean

prksean commented Feb 12, 2018

Copy link
Copy Markdown

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

@kasium

kasium commented Jan 26, 2019

Copy link
Copy Markdown
Contributor

@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?

@sotty

sotty commented Jan 28, 2019 via email

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants