# Sirius – Deploy a Modeler description file

This document describes how to deploy a modeler description file as an Eclipse plug-in through the available APIs.

## Create a new Eclipse plug-in

- Select File -> New -> Plug-in project
- Choose a name; for instance `com.yourcompany.yourproject.mymodeler`
- Select Generate an activator and uncheck the checkbox labelled This plug-in will make contributions to the UI
- Create a new folder named "description" in the created project’s root
- Activate to true the option "Activate this plug-in when one of its classes is loaded" of your plugin.xml

## Import your modeler

- Select File -> Import... -> File System
- Select the directory where your modeler description file is located.
- Check that the modeler description file is checked as file to import.
- import it in the previously created project

## Contribute to `org.eclipse.sirius.componentization`

- Open the META-INF/MANIFEST.MF file.
- In the Extensions tab, add a new extensions based on the `org.eclipse.sirius.componentization` extension point
- Fill the properties with the following values :
  - id: an identifier string
  - name: a name string
  - class: the activator of the previously created plug-in

Here is an example :

     id="com.mycompany.yourproject.mymodeler.modeler"
     name="com.mycompany.yourproject.mymodeler.modeler"
     class="com.mycompany.yourproject.mymodeler.modeler.MyActivator"

## Register your viewpoints at the start of your plug-in

- Add your viewpoints in the function start of the activator of your plug-in:

    viewpoints = new HashSet&lt;Viewpoint&gt;();
    viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN&#95;ID+&quot;/&lt;path&#95;from&#95;the&#95;plugin&#95;project&gt;/&lt;myModeler&gt;.odesign&quot;));

- Suppress your viewpoints in the function stop of the activator of your plug-in

    if (viewpoints != null) {
      for (Viewpoint viewpoint : viewpoints) {
        ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint);
      }
      viewpoints.clear();
    }