[Sculptor 3] Which approach / tools to migrate Sculptor2 code?

8 views
Skip to first unread message

Torsten Juergeleit

unread,
Aug 21, 2013, 5:36:06 AM8/21/13
to fornax-...@googlegroups.com
I'm currently working on the Maven archetypes and the corresponding tutorial. For the tutorial I need a workaround for the missing CRUD GUI. Here I'm leaning towards using Sculptors REST support instead.

While migrating the missing RestTransformation.ext and the corresponding RestTransformationTest.java I'm wondering which approach and tools (awk, sed, ..) did you use for the stuff which is already migrated.
My current approach (single steps of manual search/replace in Eclipse editor) took me too long for the 2 aforementioned classes. Unluckily I'm not used to "The Force" (awk, sed, ...).

/Torsten

Pavel Tavoda

unread,
Aug 22, 2013, 8:41:12 AM8/22/13
to fornax-...@googlegroups.com
I used sed, here is one sed script, maybe I can find more at home machine:
s/^\([A-Za-z].*\):[     ]*/     }\n\n   def static \1 {/
s/\[/</
s/\]/>/
s/select(\(.*\))/filter[\1]/
s/sortBy(\(.*\))/sortBy[\1]/
s/reject(\(.*\))/filter[!(\1)]/

Put it to file a run like 'sed -i.bak -fMySedScript.sed file1 file2 file3'

Pavel
Reply all
Reply to author
Forward
0 new messages