Skip to content

nnn-dev/code2code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What it is

code2code is an eclipse plugin to generate code from templates. It allows Rails generators like functionality on java (or whatever) projects. Its main goal is easy generator creation by using known template engines, such as Freemarker, Velocity and Groovy Template Engine, and very few configuration. See it in action here.

A hello world Generator

The files:

HelloWorld.generator
  |-- templates
      |-- HelloWorldTemplate.txt.ftl
  |-- templates.ftl
  |-- params.ftl

Contents of HelloWorldTemplate.txt.ftl:

Hello ${name}!!!

Contents of params.ftl:

name=World

Contents of templates.ftl:

templates/HelloWorldTemplate.txt.ftl=src/HelloWorld.txt

Usage

code2code adds a “Generate…” option to your project context menu. When clicked, it will let you choose one of your generators (from the "generators" folder of your project), ask you the params you’ve specified (the params file), and then generate the result to the places you’ve told it (at the templates file).

See it in action here.

Installation

Current version is 0.9.1.1 beta, tested against Eclipse Ganymede 3.4.2.

You can install it from the Update Site

Documentation

http://wiki.github.com/srizzo/code2code

About

An Eclipse plugin to generate source code files using popular template engines

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%