blob: 4f365b97be1e9f3635d5571616fe08c43c0b8571 [file] [log] [blame]
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><h1 id="InteractionsModelerUserGuide">Interactions Modeler User Guide</h1><p>Ecore provides only a static, structural view of a model. If your metamodel also defines behaviors, for example through EOperations, or if you want to specify and document usage scenarios of you metamodel&#8217;s concepts, Ecore itself does not provides the necessary concepts. The <code>org.eclipse.sirius.sample.interactions</code> plugins provides a simple metamodel extending Ecore which can describe how EObject can interact over time by sending messages (reading or writing features, invoking EOperations), creating and destroying objects, etc. Here is an overview of that metamodel:</p><p><img border="0" src="images/mm-overview.png"/></p><p>The <i>Interactions</i> viewpoint (defined in <code>org.eclipse.sirius.sample.interactions.design</code>) provides a sequence diagram modeler on this metamodel, with which you can describe the dynamic behavior of your model elements. To use if, follow these steps:</p><p>First, you need to create an <i>Interactions</i> model. Launch the Eclipse creation wizard (<i>File &gt; New &gt; Other...</i>), and in the <i>Example EMF Model Creation Wizards</i> section, select <i>Interaction Model</i>:</p><p><img border="0" src="images/00-new-interaction-model-1.png"/></p><p>Choose the location and name of the new file to create, and on the next page, choose the <i>Interaction</i> class as the <i>Model Object</i>:</p><p><img border="0" src="images/01-new-interaction-model-2.png"/></p><p>Create a new session on the <code>.interactions</code> file, and enable the <i>Interactions</i> viewpoint:</p><p><img border="0" src="images/02-open-session-select-interactions-vp.png"/></p><p>Next, add the Ecore model for which you want to specify the behavior. You should have both the <code>.ecore</code> and the <code>.interactions</code> model in the same session, with the <i>Interactions</i> viewpoint enabled.</p><p><img border="0" src="images/03-add-ecore-to-session.png"/></p><p>You can then create a new sequence diagram on the Interaction element which was created as root of the <code>.interactions</code> resource. In the diagram, you can add participants, create messages and executions between them, group these in combined fragments, etc. Use the <i>Properties</i> view to indicate which elements in the Ecore model correspond to these interactions. Here is an example of a resulting diagram:</p><p><img border="0" src="images/04-sequence.png"/></p></body></html>