Skip to main content
Jump to: navigation, search

Difference between revisions of "Dawn Codegen"

(Dawn Codegen)
(Generate the GMF fragment with Dawn)
Line 6: Line 6:
 
*Dawn
 
*Dawn
 
*GMF
 
*GMF
 +
 +
==Preparation==
  
 
We will examine the Dawn Codegen by using the Acore example from the Dawn SDK. In the beginning we need to get all necessary model files. Open the Plug-ins View (Window-->Show View-->Others) as shown in the picture below.
 
We will examine the Dawn Codegen by using the Acore example from the Dawn SDK. In the beginning we need to get all necessary model files. Open the Plug-ins View (Window-->Show View-->Others) as shown in the picture below.
Line 39: Line 41:
 
**************************************************-->
 
**************************************************-->
  
 +
==Generate the EMF model code==
  
 
Now we will generate the code as you would do it for a normal project. This means the model code, the edit plug-in and GMF diagram plug-in.
 
Now we will generate the code as you would do it for a normal project. This means the model code, the edit plug-in and GMF diagram plug-in.
Line 46: Line 49:
  
 
[[Image:GenerateDiagramCode.png]]
 
[[Image:GenerateDiagramCode.png]]
 +
 +
==Dawn Genmodel==
  
 
Now your workspace contains the plug-ins: the one containing the model code, the edit plug-in and the diagram plug-in. Now right click the the gmf gen model an examine the context menu. You will see an additional entry called "Generate Dawn Genmodel"
 
Now your workspace contains the plug-ins: the one containing the model code, the edit plug-in and the diagram plug-in. Now right click the the gmf gen model an examine the context menu. You will see an additional entry called "Generate Dawn Genmodel"
Line 59: Line 64:
  
 
[[Image:Dawngenmodel2.png]]
 
[[Image:Dawngenmodel2.png]]
 +
 +
==Generate the fragment==
  
 
In a final step now right click the Dawn genmodel and choose "Generate Dawn GMF Fragment" from the context menu.  
 
In a final step now right click the Dawn genmodel and choose "Generate Dawn GMF Fragment" from the context menu.  

Revision as of 06:14, 17 September 2010

Generate the GMF fragment with Dawn

Before you start make sure that you have the following components installes:

  • EMF
  • CDO
  • Dawn
  • GMF

Preparation

We will examine the Dawn Codegen by using the Acore example from the Dawn SDK. In the beginning we need to get all necessary model files. Open the Plug-ins View (Window-->Show View-->Others) as shown in the picture below.

Dawn openpluginsView.png

Now select the plug-in org.eclipse.emf.cdo.dawn.examples.acore and import it as soure plug-in

Dawn PluginsView2.png


Generate the EMF model code

Now we will generate the code as you would do it for a normal project. This means the model code, the edit plug-in and GMF diagram plug-in.


GenerateModelCode.png

GenerateDiagramCode.png

Dawn Genmodel

Now your workspace contains the plug-ins: the one containing the model code, the edit plug-in and the diagram plug-in. Now right click the the gmf gen model an examine the context menu. You will see an additional entry called "Generate Dawn Genmodel"

Dawncodegen1.png

Running this will create a new file called acore.dawngenmodel. This model contains specific information for the Dawn generator.

Dawngenmodel.png


For example it allows to configure the names of the extension classes generated by dawn.

Dawngenmodel2.png

Generate the fragment

In a final step now right click the Dawn genmodel and choose "Generate Dawn GMF Fragment" from the context menu.

Dawncodegen2.png

Now a fragment will be created containing all the specific extensions for your diagram.

Dawnfinish.png

Back to the top