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 "RMF/Contributor Guide/Presentations"

< RMF
Line 18: Line 18:
  
 
* Create a new "Empty EMF 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.
+
* 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:
 +
** Name: headline
 +
** Ns Prefix: headline
 +
** Ns URI: http://pror.org/presentation/headline
 +
* 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)
 +
 
 +
[[Image:rmf_dev_pres1.png]]
  
 
[[Category:RMF]]
 
[[Category:RMF]]

Revision as of 03:15, 13 June 2012

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)

Rmf dev pres1.png

Back to the top