Skip to content

Commit 915780e

Browse files
committed
README
1 parent 9010590 commit 915780e

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

‎README.markdown‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
# What is it
3+
4+
code2code is an eclipse plugin to allow Rails generators like functionality on java (or other) projects. Its main goal is to allow anyone to create very easily custom generators.
5+
6+
# A Generator Example
7+
8+
Structure:
9+
10+
generators/
11+
GerenatorName.generator/
12+
templates/
13+
SomeTeplate.txt.ftl
14+
...
15+
templates.ftl
16+
params.ftl
17+
18+
19+
SomeTemplate.txt.ftl:
20+
21+
Hello ${name}!!!
22+
23+
24+
templates.ftl:
25+
26+
templates/SomeTemplate.txt.ftl=src/DestinationFile.txt
27+
...
28+
29+
params.ftl:
30+
31+
name=some default value
32+
...
33+
34+
35+
# Usage
36+
37+
code2code adds a “Generate…” option to your project context menu. When clicked, it will let you choose one of your generators (on the generator folder of your project), ask you the params you’ve specified (on the params file from your generator), and then generate the result to the places you’ve told it (on the templates file of your generator).
38+
39+
# Template engines
40+
41+
code2code will process each file through a template engine, indicated by its extension (.groovy = Groovy, .ftl = Freemarker and .vm = Velocity)
42+
43+
44+
45+

0 commit comments

Comments
 (0)