Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "MoDisco/JavaGeneration"

(Install)
Line 1: Line 1:
The goal of Java Generation plugin is to allow Java code generation from a [[MoDisco/Java|Java model]].
+
The goal of the Java Generation plug-in is to allow Java code generation from a [[MoDisco/Java|Java model]].
Such a generation will fullfill some of the requirements for Legacy refactoring & migration.
+
Such a generation will fulfill some of the requirements for Legacy refactoring & migration.
  
 
== Description ==
 
== Description ==
Line 6: Line 6:
 
[[Image:JavaM2T.PNG|frame|center|]]
 
[[Image:JavaM2T.PNG|frame|center|]]
  
This plugin proposes [[Acceleo|Acceleo MTL]] modules for generating Java files conforming to Java models.
+
This plug-in proposes [[Acceleo|Acceleo MTL]] modules for generating Java files conforming to Java models.
 
Templates are contained in two modules :
 
Templates are contained in two modules :
 
* Structures modules : top level templates for generating classes/method/field declarations
 
* Structures modules : top level templates for generating classes/method/field declarations
Line 23: Line 23:
 
To use the plug-in you need:
 
To use the plug-in you need:
 
* JDK 1.5 or above
 
* JDK 1.5 or above
* a version of Eclipse 3.5 or above with the following set of plugins installed
+
* a version of Eclipse 3.5 or above with the following set of plug-ins installed
 
:* [[EMF|EMF]] 2.5.0 or higher
 
:* [[EMF|EMF]] 2.5.0 or higher
 
:* [[Acceleo|Acceleo]] 0.8.0 or higher
 
:* [[Acceleo|Acceleo]] 0.8.0 or higher
Line 38: Line 38:
  
  
The bundle is also available from MoDisco update site (only nightly update site at the moment).
+
The bundle is also available from the MoDisco update site (only nightly update site at the moment).
  
 
== User manual ==
 
== User manual ==
Line 46: Line 46:
 
To launch Java generation :
 
To launch Java generation :
  
* Create a Accelo launch configuration pointing to ''Generate_JavaStructures'' java class, and specify the input model and target folder (require a checkout or import of the ''org.eclipse.gmt.modisco.java.generation'' into the workspace).
+
* Create an Accelo launch configuration pointing to ''Generate_JavaStructures'' java class, and specify the input model and target folder (require a checkout or import of the ''org.eclipse.gmt.modisco.java.generation'' into the workspace).
  
 
Or
 
Or
  
 
* Add ''org.eclipse.gmt.modisco.java.generation'' in your plugin dependencies and use the ''Generate_JavaStructures'' main method with input model and target folder as parameters.
 
* Add ''org.eclipse.gmt.modisco.java.generation'' in your plugin dependencies and use the ''Generate_JavaStructures'' main method with input model and target folder as parameters.
 +
 +
[[Category:MoDisco]]

Revision as of 06:21, 13 January 2010

The goal of the Java Generation plug-in is to allow Java code generation from a Java model. Such a generation will fulfill some of the requirements for Legacy refactoring & migration.

Description

JavaM2T.PNG

This plug-in proposes Acceleo MTL modules for generating Java files conforming to Java models. Templates are contained in two modules :

  • Structures modules : top level templates for generating classes/method/field declarations
  • Statements modules

Java models are obtained with Java Discoverer component.

Considering a Java legacy, a minimal migration/refactoring chain will involve :

  • A Java model discovery step
  • A m2m transformation step
  • A Java generation code step with the current component

Requirements

To use the plug-in you need:

  • JDK 1.5 or above
  • a version of Eclipse 3.5 or above with the following set of plug-ins installed

Team

Fabien Giquel (Mia-Software)

Install

All of the source code is stored in a public source repository, which you can access at:

https://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.modisco/plugins/trunk/org.eclipse.gmt.modisco.java.generation/


The bundle is also available from the MoDisco update site (only nightly update site at the moment).

User manual

A prerequisite is a Java model. Please refer to Java Discoverer user manual.

To launch Java generation :

  • Create an Accelo launch configuration pointing to Generate_JavaStructures java class, and specify the input model and target folder (require a checkout or import of the org.eclipse.gmt.modisco.java.generation into the workspace).

Or

  • Add org.eclipse.gmt.modisco.java.generation in your plugin dependencies and use the Generate_JavaStructures main method with input model and target folder as parameters.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.