Skip to main content
Jump to: navigation, search

RMF/Contributor Guide/Presentations

Tutorial

This is a brief Howto that describes the creation of a new Presentation Plug-In for ProR.

Headline Presentation Plugin: The Requirements

The requirements are:

  • The Presentation shows the configured attribute in a bigger font.
  • The Presentation does not support automatic line wrapping.
  • The font size can be configured.

Implementation

Step by step instructions.

Create a new Plug-In Project

  • Create a new "Empty EMF Project".
  • As a convention, start its name org.eclipse.rmf.pror.reqif10.presentation.xxx. We call it org.eclipse.rmf.pror.reqif10.presentation.headline.

Create the EMF Model Extension

Every Presenation must extend the ReqIF Model. This is fairly important to get right.

  • Create a new "Ecore Model"
  • Store it in the folder model (should already exist) and call it Headline.ecore.
  • Leave all the other Defaults and create the model. It should consist of a top-level element (starting with "platform:/...") and an empty package.
  • Select the package and configure it in the Properties-View as follows:
  • We need to refer to the ProR UI Model to extend it.
    • Make sure that the Project org.eclipse.rmf.pror.reqif10 is in your workspace and open.
    • In your model editor for Headline.ecore, right-click and select "Load Resource..."
    • Select configuration.ecore (platform:/resource/org.eclipse.rmf.pror.reqif10/model/configuration.ecore)
  • Now we create the required new Configuration Class
    • Right-Click on the "headline" package
    • Create a new Child of type "EClass"
    • Configure it in the Properties as follows:
      • ESuperTypes: ProRPresentationConfiguration
      • Name: HeadlineConfiguration
  • We may as well add the Attribute for Font Size at this time:
    • 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:

Rmf dev pres1.png

Back to the top