Posts Tagged ‘Code Generation’
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.
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.
The upcoming IntelliJ IDEA 8.1.1 includes a new option to generate separate XML mapping per entity.
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.
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:
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).
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.