These are chat archives for Arasthel/SwissKnife

23rd
Apr 2015
Eugene Kamenev
@eugene-kamenev
Apr 23 2015 03:47
does it make sense if we can write smthing like this:
activity + fragment, or anything like this
we can overload default operators for android specific tasks
http://groovy-lang.org/operators.html#Operator-Overloading
Maciej Górski
@mg6maciej
Apr 23 2015 07:17
Nooooo. Don't overload operators ;)
Thomas Girard
@tgirard12
Apr 23 2015 07:32
I don't think there is a sense to do this with Activity and Fragment too
Jorge Martin Espinosa
@Arasthel
Apr 23 2015 08:01
I thought about that some time ago and ended adding the fragments DSLs, keep in mind that there are 2 options, add and replace and both con go by "+", and also, you would need to specify an id
Thomas Girard
@tgirard12
Apr 23 2015 08:11
A cool feature would be to create AST to retreive an object or object list from a Cursor and on the other side to put this object in a ContentValue.
It would be great to do that with a simple AST and not a huge ORM lib ?
Eugene Kamenev
@eugene-kamenev
Apr 23 2015 08:21
Just pushed https://github.com/Arasthel/SwissKnife/tree/profile branch, with new @Profile AST transform, anyone interested can test it. Feedback really appreciated.
It works like I described @Arasthel before
Eugene Kamenev
@eugene-kamenev
Apr 23 2015 08:30
But there is a moment i cant resolve, maybe @melix can help here. I described it a little at comment: https://github.com/Arasthel/SwissKnife/blob/profile/SwissKnife/src/main/groovy/com/arasthel/swissknife/annotations/ProfileTransformation.groovy#L107
It seems I cant find a way to handle try-catch-finallly blocks for profiling return method result.
If developer will not explicitly define return statement, then in transformation I am getting ExpressionStatement instead of ReturnStatement, also there is the situation where there can be couple return statements.
Andrew Reitz
@pieces029
Apr 23 2015 14:58
what's the wearable project?
Andrew Reitz
@pieces029
Apr 23 2015 16:17
is there a way to see the output of an AST?
Eugene Kamenev
@eugene-kamenev
Apr 23 2015 16:18
Decompiler
Use decompiler
Andrew Reitz
@pieces029
Apr 23 2015 16:26
ok thanks
I thought there was a way to use the GroovyConsole to view them, or there was an intellij plugin.
Andrew Reitz
@pieces029
Apr 23 2015 16:40
anyone know where the source for the groovy docs are in github http://docs.groovy-lang.org/latest/html/documentation/index.html
Andrew Reitz
@pieces029
Apr 23 2015 17:15
ty
Here's why I asked :) groovy/groovy-core#662
Jorge Martin Espinosa
@Arasthel
Apr 23 2015 17:17
If there are docs, there will be typos
It is law