Posts Tagged ‘Code Generation’

Maven Generate actions for pom.xml editor

Wednesday, March 3rd, 2010

Try the last EAP of IntelliJ IDEA 9.0.2 to test new ‘Generate’ actions for Maven pom.xml editor.  Type “Alt+Insert” to invoke the “Generate…” popup menu and select an action to run.

IntelliJ IDEA actually runs live template inside to complete the code generation

Generate action for pom.xml

Let us know what you think about.

More intelligence for web.xml editor

Wednesday, March 3rd, 2010

With IntelliJ IDEA 9.0.2 you can enjoy editing web.xml with the new initial parameters support. IntelliJ IDEA now collects parameter names and is also aware of parameter values types. This allows the IDE to generate (with Alt-Insert), complete, highlight and validate them appropriately.

web.xml context-param completion

Grab the latest EAP of IntelliJ IDEA 9.0.2 to try it today.

If you are a plugin writer, you can provide your specific context parameters through the special com.intellij.javaee.model.xml.converters.ContextParamsProvider extention point.

Generate Persistence Mappings by Database Schema

Monday, April 27th, 2009

The upcoming IntelliJ IDEA 8.1.1 includes a new option to generate separate XML mapping per entity.

Generating Bean Properties in Spring Contexts

Wednesday, April 8th, 2009

With IntelliJ IDEA you can easily generate multiple properties in your Spring application contexts. Just invoke Generate action by pressing Alt+Insert inside of a bean tag and select properties you want to generate.



IntelliJ IDEA analyzes property types and invokes an appropriate Live Template for each of the properties you selected.

Generating Persistence Mappings from Database Schema

Wednesday, March 18th, 2009

With IntelliJ IDEA you can quickly generate persistence mappings from any database schema. This feature is not so easy to find, so here’s the tip:

HQL Console with Pure JPA Facets

Wednesday, March 18th, 2009

In IntelliJ IDEA HQL console can be used with pure JPA facets (as well as with Hibernate facets) to run JPAQL and HQL queries. All you need is Hibernate libraries and JDBC driver in a module classpath. If persistence.xml contains no Hibernate-specific database connection options, it should be mapped to an existing data source via JPA facet settings.

Tip: HQL console can also be used to generate DDL statements for JPA and Hibernate mappings via its Generate DDL command.

Update: If a Persistence Unit or Session Factory is mapped to a valid local Data Source there is no need to specify JDBC driver jars in a module classpath (Since 8.1.1).

Generating Spring Bean Dependencies

Friday, March 13th, 2009

You can easily generate setter or constructor dependency to any Spring Bean from your application contexts. Just press Alt+Insert or select Generate from the Code menu, then select appropriate dependency type, and then select a bean.



IntelliJ IDEA will correctly update your application context file and, if needed, invoke a Live Template to generate a proper constructor or setter method in your class file.