blob: 49962b4035eb2043d5466035be8dafdf91446141 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta name="copyright" content="Copyright (c) THALES, 2007. All rights reserved." >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
<title>Pattern Editor Specification Page</title>
<h1>Specification Page</h1>
The specification page defines the pattern parameters and the applicable condition for pattern matching.
A pattern with parameters act as the following piece of code at runtime :
<div class="code-block">
<pre>for every tuple T of possible <a href="#parameters">parameters</a> values {
if (<a href="#condition">condition(T)</a>) {
<a name="parameters">
<h2>The All Parameters section</h2>
This is the list of ordered parameters.<br/>
The following actions are available :
<li><b>Add</b> is adding a new parameter to the pattern with a default name and type.</li>
<li><b>Remove</b> is removing the selected parameter.</li>
<li><b>Up</b> is swapping currently selected parameter with the previous one (higher in the list).</li>
<li><b>Down</b> is swapping the currently selected parameter with the next one (lower in the list).</li>
This order is used in the condition class implementation, and at runtime for computation of the current tuple.<br/>
Thus inverting the elements may result in different runtime execution speed, depending on the condition content.
<h3>The Parameter properties section</h3>
The parameter properties are accessible through a details section.
<table border="1" cellspacing="0" cellpadding="5">
<th>Default value</th>
<td align="left" valign="top">Name</td>
<td align="left" valign="top">
The parameter name. Used in the condition class and in the pattern templates.<br/>
This name should be unique in the whole pattern execution chain.
<td align="left" valign="top">Yes</td>
<td align="left" valign="top">newParameter<i>XXX</i></td>
<td align="left" valign="top">Type</td>
<td align="left" valign="top">
The parameter type. Used in the condition class and in the pattern templates.<br/>
Each parameter can take a different type from a different metamodel, as long as it makes sense with the model
used when executing the pattern.
<td align="left" valign="top">Yes, through the <b>Browse...</b> button</td>
<td align="left" valign="top">EClass, from Ecore metamodel</i></td>
The following action is available :
<b>Browse...</b> is opening a new type selection window.
<p align="center">
<img src="../images/specification/TypeSelection.png" alt="Parameter type selection window"/><br/>
It is displaying the available types for currently selected model (by default, Ecore metamodel). One can change the selected model by pressing the <b>Choose model...</b>
button. The EMF default load resource window is then displayed.<br/>
<p align="center">
<img src="../images/specification/ChooseModel.png" alt="Load Resource window"/><br/>
Although this window allows the user to select a resource from the file system or from the workspace, the user should always browse registered packages.
Once <b>Browse Registered Packages...</b> is hit, the Package Selection window is displayed. The user can now select a new model based on its base package URI.
Back to the type selection window, the new available types are displayed.
<a name="condition">
<h2>The Edit condition class section</h2>
It is just made of a single link to the condition class.<br/>
By clicking this link, the corresponding Java class is opened for edition.<br/>
For synchronization purpose, the content of this class is recomputed if the parameters list has changed.
It is also recomputed each time a Save command happens for the current editor.
<h3>The Condition class current content section</h3>
It is a text component showing the currently known content of the condition class.<br/>
Since there is no Java edition feature attach to this widget, it might only be helpful in consultation mode (that is when the content can not be changed).
This mode is activated only for deployed factory components.
<img border="0" src="../../../../org.eclipse.egf.engine.doc/html/images/ngrelr.png" alt="Related Reference">
<a href="../editor.html">Pattern editor</a>