RSS

Search Engine

Thursday, July 22, 2010

Create EMF Editor plugins

EMF can generate plugins which provide wizards for creating new model instances and also an editor for you which allows you to maintain your model information. For more information about Eclipse plugin development please see Eclipse Plugin Development Tutorials.

5.1. Generating edit / editor code

Eclipse EMF allow you to create a editor for your model. Select your genmodel, right click on it and select "Create Edit Code" and then "Create Editor Code".

Two Eclipse Plugin projects have been created, "sawan.modi.emf.webpage.model.edit" and "sawan.modi.emf.webpage.model.editor".

5.2. Run your plugins

Select the *.editor project and run the new plugin. Selecting the "plugin.xml", select the "Overview" tab and press then "Launch an Eclipse application". See Eclipse Plugin Tutorials for details.

This should start a new Eclipse runtime instance.

5.3. Create your model

In new Eclipse instance create a new project "testing" and a new folder "website" ( Select this folder, right click on it, select New-> Other-> Example EMF Model Creation Wizards -> Webpage Model.

Name it "My.webpage".

Select as the Model Object "My Web" and press finish.

5.4. Edit your model

You should now see a editor for your website.model.

Right click on "My Web" and create a new elements. To edit the elements use the "Properties View" which can be found under Window -> Show View -> Properties.

Save your created model.

0 comments:

Post a Comment