Right-Click on HeadlineConfiguration and create a new Child of type EAttribute

Name: size

EType: EInt

Lower Bound: 1 (required field)

Your model editor should look as follows:

Create the GenModel

Here, too, things can go wrong. Pay particular attention to how the referred Models are handled.

Create a new "EMF Generator Model"

Call it Headline.genmodel and put it into the same folder model where Headline.ecore is stored

Select the "Ecore Model" importer

Select the Model URI for Headline.ecore model (it it isn't preloaded already). You may have to hit the "Load" button before you can proceed.

Pay attention now as the references must be selected correctly. You should be in the "Package Selection". This Dialog has two panes. In the upper pane you should see the headline, configuration and several reqif packages.

Use the "Add" button to add the Genmodels for reqif. Therefore, select the reqif.genmodel file from the org.eclipse.rmf.reqif10.pror plugin. They should now be visible in the lower pane.

Check the checkboxes for Configuration and XMLNamespace in the lower pane. As you do this, the packages should disappear from the upper pane.

Here is what happened: In the Ecore, we were referencing two models. When we created the Genmodel for Headline, the default would have been to create Genmodels for all three packages. But we only want a Genmodel for Headline. Thus, we have to provide references to existing Genmodels.

Last, check the checkbox for Headline in the upper pane. This should enable the "Finish" button

Click Finish: The new Genmodel should be open. It should show several package entries. For instance, the entries to Configuration and ReqIF10 should have little arrows, indicating that they are references.

We only need to generate the Model and Edit code. By default, the Edit code ends up in a new Plugin Project. This is overkill for such a small project. We will change the configuration to generate the Edit code in the Model Plugin (the one we're currently in).

Select the Top-Level element "Headline".

Expand the "Edit" section in the Property View. Change the Properties as follows:

org.eclipse.rmf.reqif10.pror.presentation.headline.provider (the ItemProviders, from the Edit generation)

org.eclipse.rmf.reqif10.pror.presentation.headline.util (helper code)

Congratulations! You're done with this step.

Implementing PresentationEditInterface

You will get a number of compile errors, as the interfaces from PresentationEditInterface are not implemented. This interface is inherited by the (abstract) ConfigurationItemProvider. The interface has been written carefully to provide information on how to implement it. So implement it, and refer to the interface documentation if you are stuck.

Next, make the ConfigurationItemProvider stateful by editing the genmodel again, and by regenerating the ItemProviders. this way, you have one instance per configuration element:

Go to your genmodel

Open the tree and select HeadlineConfiguration

In the properties view, open "Edit" and set "Provider Type" to "Stateful".