Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorrgronback2007-03-12 23:16:26 -0400
committerrgronback2007-03-12 23:16:26 -0400
commit044777203791621e8d3cd397307ef5d4750b0aeb (patch)
treeda457e85a3b1c96c2d1d4458535094822f3d52fe /doc
parentb6610399ee78db8437a515579b18a058ede92cb3 (diff)
downloadorg.eclipse.gmf-tooling-044777203791621e8d3cd397307ef5d4750b0aeb.tar.gz
org.eclipse.gmf-tooling-044777203791621e8d3cd397307ef5d4750b0aeb.tar.xz
org.eclipse.gmf-tooling-044777203791621e8d3cd397307ef5d4750b0aeb.zip
[134492] Converted HTML to XHTML. Several HTML pages were a mess due to Microsoft Word HTML formatting. Used HTML Tidy and http://ethilien.net/websoft/wordcleaner/cleaner.htm
Some format cleanup may be required, but at least it's all valid XHTML now.
Diffstat (limited to 'doc')
-rw-r--r--doc/org.eclipse.gmf.doc/examples-guide/common/serviceExample.html207
-rw-r--r--doc/org.eclipse.gmf.doc/examples-guide/diagram/geometricShapesExample.html95
-rw-r--r--doc/org.eclipse.gmf.doc/examples-guide/diagram/layoutServiceExample.html282
-rw-r--r--doc/org.eclipse.gmf.doc/examples-guide/diagram/logicExample.html124
-rw-r--r--doc/org.eclipse.gmf.doc/examples-guide/index.html80
-rw-r--r--doc/org.eclipse.gmf.doc/examples-guide/msl/clipboardExample.html94
-rw-r--r--doc/org.eclipse.gmf.doc/examples-guide/samples.html63
-rw-r--r--doc/org.eclipse.gmf.doc/hglegal.htm12
-rw-r--r--doc/org.eclipse.gmf.doc/howto/diagram/howto.html5560
-rw-r--r--doc/org.eclipse.gmf.doc/howto/diagram/index.html40
-rw-r--r--doc/org.eclipse.gmf.doc/howto/index.html44
-rw-r--r--doc/org.eclipse.gmf.doc/plugin.xml12
-rw-r--r--doc/org.eclipse.gmf.doc/prog-guide/index.html25
-rw-r--r--doc/org.eclipse.gmf.doc/prog-guide/runtime/Developer Guide to Global Actions.html6
-rw-r--r--doc/org.eclipse.gmf.doc/prog-guide/runtime/Developers Guide to the Extensible Type Registry/Developers Guide to the Extensible Type Registry.html576
-rw-r--r--doc/org.eclipse.gmf.doc/prog-guide/runtime/index.html48
-rw-r--r--doc/org.eclipse.gmf.doc/reference/extension-points/index.html180
-rw-r--r--doc/org.eclipse.gmf.doc/toc.xml4
-rw-r--r--doc/org.eclipse.gmf.doc/tutorials/Service and Provider Tutorial.html2086
-rw-r--r--doc/org.eclipse.gmf.doc/tutorials/common/Extensible Type Registry/extensibleTypeRegistryTutorial.html502
-rw-r--r--doc/org.eclipse.gmf.doc/tutorials/diagram/automaticLayout.html673
-rw-r--r--doc/org.eclipse.gmf.doc/tutorials/diagram/connectionCreationAssistantTutorial.html1114
-rw-r--r--doc/org.eclipse.gmf.doc/tutorials/diagram/containmentOfShapes.html932
-rw-r--r--doc/org.eclipse.gmf.doc/tutorials/diagram/createConnection.html899
-rw-r--r--doc/org.eclipse.gmf.doc/tutorials/diagram/createShape.html1706
-rw-r--r--doc/org.eclipse.gmf.doc/tutorials/diagram/diagramPreferencesTutorial.html677
-rw-r--r--doc/org.eclipse.gmf.doc/tutorials/diagram/paletteConfigurationTutorial.html1156
-rw-r--r--doc/org.eclipse.gmf.doc/tutorials/index.html112
-rw-r--r--doc/org.eclipse.gmf.doc/tutorials/msl/clipboardTutorial.html873
-rw-r--r--doc/org.eclipse.gmf.doc/whatsnew/index.html79
30 files changed, 6932 insertions, 11329 deletions
diff --git a/doc/org.eclipse.gmf.doc/examples-guide/common/serviceExample.html b/doc/org.eclipse.gmf.doc/examples-guide/common/serviceExample.html
index cecd04a93..f5e004d3d 100644
--- a/doc/org.eclipse.gmf.doc/examples-guide/common/serviceExample.html
+++ b/doc/org.eclipse.gmf.doc/examples-guide/common/serviceExample.html
@@ -1,17 +1,19 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
+xmlns="http://www.w3.org/1999/xhtml">
<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 10">
-<meta name=Originator content="Microsoft Word 10">
-<link rel=File-List href="servceExample_files/filelist.xml">
-<link rel=Edit-Time-Data href="servceExample_files/editdata.mso">
-<!--[if !mso]>
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<meta http-equiv="Content-Type"
+content="text/html; charset=iso-8859-1" />
+<meta name="ProgId" content="Word.Document" />
+<meta name="Generator" content="Microsoft Word 10" />
+<meta name="Originator" content="Microsoft Word 10" />
+<link rel="File-List" href="servceExample_files/filelist.xml" />
+<link rel="Edit-Time-Data"
+href="servceExample_files/editdata.mso" /><!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
@@ -44,133 +46,144 @@ w\:* {behavior:url(#default#VML);}
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
-<style>
+<style type="text/css">
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
h2
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:2;
- font-size:18.0pt;
- font-family:"Times New Roman";
- font-weight:bold;}
+ {mso-margin-top-alt:auto;
+ margin-right:0in;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ mso-outline-level:2;
+ font-size:18.0pt;
+ font-family:"Times New Roman";
+ font-weight:bold;}
h3
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:3;
- font-size:13.5pt;
- font-family:"Times New Roman";
- font-weight:bold;}
+ {mso-margin-top-alt:auto;
+ margin-right:0in;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ mso-outline-level:3;
+ font-size:13.5pt;
+ font-family:"Times New Roman";
+ font-weight:bold;}
p
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
+ {mso-margin-top-alt:auto;
+ margin-right:0in;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:35.4pt;
- mso-footer-margin:35.4pt;
- mso-paper-source:0;}
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:35.4pt;
+ mso-footer-margin:35.4pt;
+ mso-paper-source:0;}
div.Section1
- {page:Section1;}
+ {page:Section1;}
/* List Definitions */
@list l0
- {mso-list-id:1949502611;
- mso-list-template-ids:1036548840;}
+ {mso-list-id:1949502611;
+ mso-list-template-ids:1036548840;}
ol
- {margin-bottom:0in;}
+ {margin-bottom:0in;}
ul
- {margin-bottom:0in;}
+ {margin-bottom:0in;}
-->
</style>
+
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
- {mso-style-name:"Table Normal";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-noshow:yes;
- mso-style-parent:"";
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Times New Roman";}
+ {mso-style-name:"Table Normal";
+ mso-tstyle-rowband-size:0;
+ mso-tstyle-colband-size:0;
+ mso-style-noshow:yes;
+ mso-style-parent:"";
+ mso-padding-alt:0in 5.4pt 0in 5.4pt;
+ mso-para-margin:0in;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
-
-<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
-
-<div class=Section1>
-
+<body lang="EN-US" link="blue" vlink="blue"
+style="tab-interval:.5in">
+<div class="Section1">
<h2>Service Example</h2>
<h3>Introduction</h3>
-<p>This example describes the usage of the Service framework within the SDK. It
-demonstrates how to create a Service and define Providers for that service as
-well as giving clients access to the Service.</p>
+<p>This example describes the usage of the Service framework within
+the SDK. It demonstrates how to create a Service and define
+Providers for that service as well as giving clients access to the
+Service.</p>
<h3>References</h3>
-<p>Refer to the on-line Java documentation for the package org.eclipse.gmf.runtime.common.core.service
-for more information on general use and API specifics.</p>
+<p>Refer to the on-line Java documentation for the package
+org.eclipse.gmf.runtime.common.core.service for more information on
+general use and API specifics.</p>
<h3>Description</h3>
-<p>This example plug-in, called org.eclipse.gmf.examples.runtime.common.service, creates
-a Widget Service and defines two Widget Providers. This plug-in also
-contributes an action which request Widgets from the Widget Service.</p>
+<p>This example plug-in, called
+org.eclipse.gmf.examples.runtime.common.service, creates a Widget
+Service and defines two Widget Providers. This plug-in also
+contributes an action which request Widgets from the Widget
+Service.</p>
<p>Please refer to the tutorial <a
-href="../../tutorials/Service%20and%20Provider%20Tutorial.html">Service and
-Provider Tutorial</a> for viewing the code samples within this example</p>
+href="../../tutorials/Service%20and%20Provider%20Tutorial.html">Service
+and Provider Tutorial</a> for viewing the code samples within this
+example</p>
<h3>Usage</h3>
<p>Refer to this example if you need to:</p>
-<ol start=1 type=1>
- <li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
- mso-list:l0 level1 lfo1;tab-stops:list .5in'>To create a Service which Providers
- to contribute to the Service via the Service extension point.</li>
- <li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
- mso-list:l0 level1 lfo1;tab-stops:list .5in'>Allow Providers to prioritize
- themselves so that results from the Service are deterministic.</li>
- <li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
- mso-list:l0 level1 lfo1;tab-stops:list .5in'>Allow one or more Providers
- to service a client request.</li>
+<ol start="1" type="1">
+<li class="MsoNormal"
+style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1;tab-stops:list .5in">
+To create a Service which Providers to contribute to the Service
+via the Service extension point.</li>
+
+<li class="MsoNormal"
+style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1;tab-stops:list .5in">
+Allow Providers to prioritize themselves so that results from the
+Service are deterministic.</li>
+
+<li class="MsoNormal"
+style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1;tab-stops:list .5in">
+Allow one or more Providers to service a client request.</li>
</ol>
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
-</div>
+<br />
+<br />
+<hr />
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright
+(c) 2000,2005 IBM Corporation and others. All Rights
+Reserved.</a></p>
+<br />
+<br />
+</div>
</body>
+</html>
-</html> \ No newline at end of file
diff --git a/doc/org.eclipse.gmf.doc/examples-guide/diagram/geometricShapesExample.html b/doc/org.eclipse.gmf.doc/examples-guide/diagram/geometricShapesExample.html
index 8e0214b04..ecd6713bf 100644
--- a/doc/org.eclipse.gmf.doc/examples-guide/diagram/geometricShapesExample.html
+++ b/doc/org.eclipse.gmf.doc/examples-guide/diagram/geometricShapesExample.html
@@ -1,54 +1,69 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
+<!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=iso-8859-1">
- <title>Geometric Shapes Example</title>
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<meta http-equiv="Content-Type"
+content="text/html; charset=iso-8859-1" />
+<title>Geometric Shapes Example</title>
</head>
<body>
-
<h2>Geometric Shapes Example</h2>
<h3>Introduction</h3>
-<p>
-<SPAN style="font-size:12.0pt">This guide describes the geometric
-shapes example in the SDK.<SPAN style="mso-spacerun:yes">  </SPAN>This
-example demonstrates a very simple editor for creating geometric shapes
-and some basic capability for editing and rendering them.</SPAN>.
-</p>
+
+<p><span style="font-size:12.0pt">This guide describes the
+geometric shapes example in the SDK.<span
+style="mso-spacerun:yes">&nbsp;</span> This example demonstrates a
+very simple editor for creating geometric shapes and some basic
+capability for editing and rendering them.</span>.</p>
<h3>References</h3>
-<p>
-n/a</p>
+
+<p>n/a</p>
<h3>Description</h3>
-<p>
-This example plug-in is named <SPAN class="SpellE">org.eclipse.gmf.examples.runtime.diagram.geoshapes</SPAN>.
-<SPAN style="mso-spacerun:yes"> </SPAN>It allows creation of a simple editor
-based on a resource file with extension *.geo.<SPAN
- style="mso-spacerun:yes">  </SPAN>The editor is actually a container for the
-geometric shape capability defined in the plug-in <SPAN class="SpellE">org.eclipse.gmf.runtime.diagram.ui.geoshapes</SPAN>.
-<SPAN style="mso-spacerun:yes"> </SPAN>There is no extended contribution in the
-examples plug-in except for the providers for creating the diagram views and <SPAN
- class="SpellE">EditPart</SPAN> for the diagram editor. <SPAN
- style="mso-spacerun:yes"> </SPAN>The geometric shapes functionality is actually
-contributed by the <SPAN class="SpellE">org.eclipse.gmf.runtime.diagram.ui.geoshapes</SPAN>
+
+<p>This example plug-in is named <span
+class="SpellE">org.eclipse.gmf.examples.runtime.diagram.geoshapes</span>.
+<span style="mso-spacerun:yes">&nbsp;</span>It allows creation of a
+simple editor based on a resource file with extension *.geo.<span
+style="mso-spacerun:yes">&nbsp;</span> The editor is actually a
+container for the geometric shape capability defined in the plug-in
+<span
+class="SpellE">org.eclipse.gmf.runtime.diagram.ui.geoshapes</span>.
+<span style="mso-spacerun:yes">&nbsp;</span>There is no extended
+contribution in the examples plug-in except for the providers for
+creating the diagram views and <span class="SpellE">EditPart</span>
+for the diagram editor. <span
+style="mso-spacerun:yes">&nbsp;</span>The geometric shapes
+functionality is actually contributed by the <span
+class="SpellE">org.eclipse.gmf.runtime.diagram.ui.geoshapes</span>
plug-in.</p>
<h3>Usage</h3>
-<P>Refer to this example if you need:</P>
-<OL>
- <LI>How to set-up a
- resource based GMF diagram layer editor based on a specific extension.</LI>
- <LI>How to inherit
- notation based functionality that is provided for by the diagram layer.</LI>
- <LI>How to integrate
- the property view into your editor.</LI></OL>
-
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
-
+
+<p>Refer to this example if you need:</p>
+
+<ol>
+<li>How to set-up a resource based GMF diagram layer editor based
+on a specific extension.</li>
+
+<li>How to inherit notation based functionality that is provided
+for by the diagram layer.</li>
+
+<li>How to integrate the property view into your editor.</li>
+</ol>
+
+<br />
+<br />
+<hr />
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright
+(c) 2000,2005 IBM Corporation and others. All Rights
+Reserved.</a></p>
+
+<br />
+<br />
</body>
-</html> \ No newline at end of file
+</html>
+
diff --git a/doc/org.eclipse.gmf.doc/examples-guide/diagram/layoutServiceExample.html b/doc/org.eclipse.gmf.doc/examples-guide/diagram/layoutServiceExample.html
index 1c625e4f5..b559e852f 100644
--- a/doc/org.eclipse.gmf.doc/examples-guide/diagram/layoutServiceExample.html
+++ b/doc/org.eclipse.gmf.doc/examples-guide/diagram/layoutServiceExample.html
@@ -1,152 +1,152 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
+<!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=iso-8859-1">
- <title>Layout Service Example</title>
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<meta http-equiv="Content-Type"
+content="text/html; charset=iso-8859-1" />
+<title>Layout Service Example</title>
</head>
<body>
-
<h2>Layout Service Example</h2>
<h3>Introduction</h3>
-<p>
-This guide describes the Layout Service example in the SDK.<SPAN style="mso-spacerun:yes">  </SPAN>This
-example demonstrates a how to create a custom provider for the Layout Service
-which can be invoked from with-in a diagram editor.</p>
+
+<p>This guide describes the Layout Service example in the SDK.<span
+style="mso-spacerun:yes">&nbsp;</span> This example demonstrates a
+how to create a custom provider for the Layout Service which can be
+invoked from with-in a diagram editor.</p>
<h3>Description</h3>
-<P>This plug-in is named <SPAN class="SpellE">org.eclipse.gmf.examples.runtime.diagram.layout</SPAN>.
- <SPAN style="mso-spacerun:yes"> </SPAN>The purpose of the plug-in is <SPAN
- class="GramE">provide</SPAN> an action that invokes a custom layout.<SPAN
- style="mso-spacerun:yes">  </SPAN>In this case the custom layout is
- called a 'Square' layout which will calculate a square area based on
- the number of shapes and arrange the shapes in a grid with-in the
- calculated square.<BR>
-<BR>The algorithm for this custom layout is defined
- inside a provider called '<SPAN class="SpellE">SquareLayoutProvider</SPAN>'.<SPAN
- style="mso-spacerun:yes">  </SPAN>To register this provider, an
- extension for the <SPAN class="SpellE">org.eclipse.gmf.runtime.diagram.ui.layoutProviders</SPAN>
- extension point must be added to the <SPAN class="SpellE">plugin.xml</SPAN>
- file.</P>
-<P class="MsoNormal"><SPAN class="GramE">i.e.</SPAN></P>
-<P class="MsoNormal"
- style="line-height:normal;mso-pagination:widow-orphan;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">   </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;extension</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'></SPAN><BR>
-<SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN class="GramE"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>point</SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;<SPAN
- class="SpellE">org.eclipse.gmf.runtime.diagram.ui.layoutProviders</SPAN>&quot;</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'></SPAN><BR>
-<SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">      </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;<SPAN
- class="SpellE">layoutProvider</SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New"'></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">            </SPAN></SPAN><SPAN class="GramE"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>class</SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;org.eclipse.gmf.examples.runtime.diagram.layout.provider.SquareLayoutProvider&quot;</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes"><BR>
-         </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;Priority</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'></SPAN><BR>
-<SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">               </SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>name</SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;Medium&quot;</SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'></SPAN><BR>
-<SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;/Priority&gt;</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'></SPAN><BR>
-<SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">      </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;/<SPAN
- class="SpellE">layoutProvider</SPAN>&gt;</SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:black;background:white;mso-highlight:white'>
-</SPAN><SPAN style='font-size:10.0pt;font-family:"Courier New"'></SPAN><BR>
-<SPAN
- style='font-size:10.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">   </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;/extension&gt;</SPAN><BR>
-<BR>If we examine the '<SPAN class="SpellE">SquareLayoutProvider</SPAN>'
-java class, in the provides() routine, it is merely checking to see if the
-nodes on the diagram can be laid-out according to the algorithm and also
-verifying that the layout type being passed through the <SPAN
- class="SpellE">ILayoutNodesOperation</SPAN>
-is of type 'SQUARE_LAYOUT'.<SPAN style="mso-spacerun:yes">  </SPAN>This check
-is necessary because we only want to invoke this layout when our specific
-action is called, not when a default arrange action is invoked.<SPAN
- style="mso-spacerun:yes"></SPAN><BR>
-<BR>The <SPAN class="SpellE"><SPAN class="GramE">layoutNodes</SPAN></SPAN><SPAN
- class="GramE">(</SPAN>?) routine is where the actual computation takes
-place.<SPAN style="mso-spacerun:yes">  </SPAN>It returns a '<SPAN
- class="SpellE">Runnable</SPAN>'
-that performs the execution of the layout.<BR>
-<BR><IMG border="0" src="image004.gif" width="852"
- height="466">
-</P>
-<H3>Usage</H3>
-<P>Refer to this example if you need:</P>
-<OL>
- <LI>How to create a
-manipulate shapes positions programmatically</LI>
- <LI>How to create a
- custom layout provider that can be invoked through a specific action</LI>
-</OL>
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
+<p>This plug-in is named <span
+class="SpellE">org.eclipse.gmf.examples.runtime.diagram.layout</span>.
+<span style="mso-spacerun:yes">&nbsp;</span>The purpose of the
+plug-in is <span class="GramE">provide</span> an action that
+invokes a custom layout.<span
+style="mso-spacerun:yes">&nbsp;</span> In this case the custom
+layout is called a 'Square' layout which will calculate a square
+area based on the number of shapes and arrange the shapes in a grid
+with-in the calculated square.<br />
+<br />
+The algorithm for this custom layout is defined inside a provider
+called '<span class="SpellE">SquareLayoutProvider</span>'.<span
+style="mso-spacerun:yes">&nbsp;</span> To register this provider,
+an extension for the <span
+class="SpellE">org.eclipse.gmf.runtime.diagram.ui.layoutProviders</span>
+extension point must be added to the <span
+class="SpellE">plugin.xml</span> file.</p>
+
+<p class="MsoNormal"><span class="GramE">i.e.</span></p>
+
+<p class="MsoNormal"
+style="line-height:normal;mso-pagination:widow-orphan; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:10.0pt; font-family:"
+courier="courier"><span
+style="mso-spacerun:yes">&nbsp;&nbsp;</span></span> <span
+style="font-size:10.0pt; font-family:"
+courier="courier">&lt;extension</span><br />
+<span style="font-size:10.0pt; font-family:"
+courier="courier"><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:10.0pt;font-family:"
+courier="courier">point</span></span><span
+style="font-size:10.0pt; font-family:"
+courier="courier">=</span><span
+style="font-size:10.0pt;font-family:" courier="courier">"<span
+class="SpellE">org.eclipse.gmf.runtime.diagram.ui.layoutProviders</span>"</span><span
+ style="font-size:10.0pt;font-family:"
+courier="courier">&gt;</span><br />
+<span style="font-size:10.0pt; font-family:"
+courier="courier"><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:"
+courier="courier">&lt;<span
+class="SpellE">layoutProvider</span></span><span
+style="font-size:10.0pt; font-family:" courier="courier"><span
+style="mso-spacerun:yes">&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span
+ class="GramE"><span style="font-size:10.0pt;font-family:"
+courier="courier">class</span></span><span
+style="font-size:10.0pt; font-family:"
+courier="courier">=</span><span
+style="font-size:10.0pt;font-family:"
+courier="courier">"org.eclipse.gmf.examples.runtime.diagram.layout.provider.SquareLayoutProvider"</span><span
+ style="font-size:10.0pt;font-family:"
+courier="courier">&gt;</span><span
+style="font-size:10.0pt; font-family:" courier="courier"><span
+style="mso-spacerun:yes"><br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:"
+courier="courier">&lt;Priority</span><br />
+<span style="font-size:10.0pt; font-family:"
+courier="courier"><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:10.0pt;font-family:"
+courier="courier">name</span></span><span
+style="font-size:10.0pt; font-family:"
+courier="courier">=</span><span
+style="font-size:10.0pt;font-family:"
+courier="courier">"Medium"</span><span
+style="font-size:10.0pt; font-family:"
+courier="courier">&gt;</span><br />
+<span style="font-size:10.0pt; font-family:"
+courier="courier"><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:"
+courier="courier">&lt;/Priority&gt;</span><br />
+<span style="font-size:10.0pt; font-family:"
+courier="courier"><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:"
+courier="courier">&lt;/<span
+class="SpellE">layoutProvider</span>&gt;</span><br />
+<span style="font-size:10.0pt;font-family:" courier="courier"><span
+style="mso-spacerun:yes">&nbsp;&nbsp;</span></span> <span
+style="font-size:10.0pt; font-family:"
+courier="courier">&lt;/extension&gt;</span><br />
+<br />
+If we examine the '<span
+class="SpellE">SquareLayoutProvider</span>' java class, in the
+provides() routine, it is merely checking to see if the nodes on
+the diagram can be laid-out according to the algorithm and also
+verifying that the layout type being passed through the <span
+class="SpellE">ILayoutNodesOperation</span> is of type
+'SQUARE_LAYOUT'.<span style="mso-spacerun:yes">&nbsp;</span> This
+check is necessary because we only want to invoke this layout when
+our specific action is called, not when a default arrange action is
+invoked.<br />
+<br />
+The <span class="SpellE"><span
+class="GramE">layoutNodes</span></span><span
+class="GramE">(</span>?) routine is where the actual computation
+takes place.<span style="mso-spacerun:yes">&nbsp;</span> It returns
+a '<span class="SpellE">Runnable</span>' that performs the
+execution of the layout.<br />
+<br />
+<img border="0" src="image004.gif" width="852" height="466" /></p>
+
+<h3>Usage</h3>
+
+<p>Refer to this example if you need:</p>
+
+<ol>
+<li>How to create a manipulate shapes positions
+programmatically</li>
+
+<li>How to create a custom layout provider that can be invoked
+through a specific action</li>
+</ol>
+
+<br />
+<br />
+<hr />
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright
+(c) 2000,2005 IBM Corporation and others. All Rights
+Reserved.</a></p>
+
+<br />
+ <br />
</body>
</html>
+
diff --git a/doc/org.eclipse.gmf.doc/examples-guide/diagram/logicExample.html b/doc/org.eclipse.gmf.doc/examples-guide/diagram/logicExample.html
index 2781adb7e..31a8509ac 100644
--- a/doc/org.eclipse.gmf.doc/examples-guide/diagram/logicExample.html
+++ b/doc/org.eclipse.gmf.doc/examples-guide/diagram/logicExample.html
@@ -1,62 +1,90 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
+<!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=iso-8859-1">
- <title>Logic Example</title>
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<meta http-equiv="Content-Type"
+content="text/html; charset=iso-8859-1" />
+<title>Logic Example</title>
</head>
<body>
-
<h2>Logic Example</h2>
<h3>Introduction</h3>
-<p>
-<SPAN style="font-size:12.0pt">This plug-in is named
-org.eclipse.gmf.examples.runtime.diagram.logic.<SPAN style="mso-spacerun:yes"> 
-</SPAN>It allows creation of a simple circuit board editor persisted in
-a resource file with extension *.logic2.<SPAN style="mso-spacerun:yes"> 
-</SPAN>The editor demonstrates how a semantic model can be visualized
-using the diagram core components.<SPAN style="mso-spacerun:yes">  </SPAN>In
-this case the semantic model is an EMF model that defines
-(hypothetically) how a circuit board could be represented in a
-meta-model.<SPAN style="mso-spacerun:yes">  </SPAN>The notation
-meta-model, which is part of the diagram core is then mapped to this
-semantic meta-model and displayed in the editor so that the user can
-subsequently manipulate the semantic model. </SPAN></p>
+
+<p><span style="font-size:12.0pt">This plug-in is named
+org.eclipse.gmf.examples.runtime.diagram.logic.<span
+style="mso-spacerun:yes">&nbsp;</span> It allows creation of a
+simple circuit board editor persisted in a resource file with
+extension *.logic2.<span style="mso-spacerun:yes">&nbsp;</span> The
+editor demonstrates how a semantic model can be visualized using
+the diagram core components.<span
+style="mso-spacerun:yes">&nbsp;</span> In this case the semantic
+model is an EMF model that defines (hypothetically) how a circuit
+board could be represented in a meta-model.<span
+style="mso-spacerun:yes">&nbsp;</span> The notation meta-model,
+which is part of the diagram core is then mapped to this semantic
+meta-model and displayed in the editor so that the user can
+subsequently manipulate the semantic model.</span></p>
<h3>References</h3>
+
<p>n/a</p>
<h3>Description</h3>
-<p>This plug-in contributes a wizard to the &quot;New Example&quot; <b></b> menu.<BR>
-<BR>
-<IMG border="0" src="examplesdlg.gif" width="502" height="502"><BR>
-<BR>Selecting the &quot;Logic Diagram&quot; entry will create a new editor for editing logic models.<p>Please refer to the following tutorials for reviewing the code samples within this example:<BR>
-<A href="../../tutorials/diagram/createShape.html">Creating a shape</A><A
- href="../../tutorials/diagram/createConnection.html"><BR>
-Creating a connection</A><BR>
-<A href="../../tutorials/diagram/diagramPreferencesTutorial.html">Supporting
-Diagram Preferences</A>
-<A href="../../tutorials/diagram/paletteConfigurationTutorial.html">Configuring and Extending the Diagram Palette</A>
-<A href="../../tutorials/diagram/containmentOfShapes.html"><BR>
-Supporting containment of shapes</A><BR>
-<A href="../../tutorials/diagram/automaticLayout.html">Modifying a
-container to support automatic layout</A></p>
+
+<p>This plug-in contributes a wizard to the "New Example"
+menu.<br />
+<br />
+<img border="0" src="examplesdlg.gif" width="502"
+height="502" /><br />
+<br />
+Selecting the "Logic Diagram" entry will create a new editor for
+editing logic models.</p>
+
+<p>Please refer to the following tutorials for reviewing the code
+samples within this example:<br />
+<a href="../../tutorials/diagram/createShape.html">Creating a
+shape</a><a
+href="../../tutorials/diagram/createConnection.html"><br />
+Creating a connection</a><br />
+<a
+href="../../tutorials/diagram/diagramPreferencesTutorial.html">Supporting
+Diagram Preferences</a> <a
+href="../../tutorials/diagram/paletteConfigurationTutorial.html">Configuring
+and Extending the Diagram Palette</a> <a
+href="../../tutorials/diagram/containmentOfShapes.html"><br />
+Supporting containment of shapes</a><br />
+<a href="../../tutorials/diagram/automaticLayout.html">Modifying a
+container to support automatic layout</a></p>
<h3>Usage</h3>
-<P>Refer to this example if you need:</P>
-<OL>
- <LI>How to create an
- editor for <SPAN class="GramE">a</SPAN> existing EMF semantic model.</LI>
- <LI>How to inherit
- notation based functionality that is provided for by the diagram layer.</LI>
- <LI>How to use some of
- the advanced features of the diagram layer such as shape containment,
- canonical synchronization and border shapes.</LI>
-</OL>
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
+
+<p>Refer to this example if you need:</p>
+
+<ol>
+<li>How to create an editor for <span class="GramE">a</span>
+existing EMF semantic model.</li>
+
+<li>How to inherit notation based functionality that is provided
+for by the diagram layer.</li>
+
+<li>How to use some of the advanced features of the diagram layer
+such as shape containment, canonical synchronization and border
+shapes.</li>
+</ol>
+
+<br />
+<br />
+<hr />
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright
+(c) 2000,2005 IBM Corporation and others. All Rights
+Reserved.</a></p>
+
+<br />
+<br />
+<br />
+<br />
</body>
-</html> \ No newline at end of file
+</html>
+
diff --git a/doc/org.eclipse.gmf.doc/examples-guide/index.html b/doc/org.eclipse.gmf.doc/examples-guide/index.html
index c8c40285d..d15b20e9a 100644
--- a/doc/org.eclipse.gmf.doc/examples-guide/index.html
+++ b/doc/org.eclipse.gmf.doc/examples-guide/index.html
@@ -1,31 +1,49 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML>
-<HEAD>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<META name="GENERATOR" content="IBM Software Development Platform">
-<META http-equiv="Content-Style-Type" content="text/css">
-<LINK href="../../book.css"
- rel="stylesheet" type="text/css">
-<TITLE>GMF Runtime Examples Guide</TITLE>
-</HEAD>
-<BODY>
-<H1>GMF Runtime Examples Guide</H1>
-<P>This guide presents the examples for the GMF Runtime.</P>
-
-<UL>
- <LI><A href="common/serviceExample.html">Service Example</A></LI>
- <LI><A href="msl/clipboardExample.html">Clipboard Example</A></LI>
- <LI><A href="diagram/geometricShapesExample.html">Geoshape Diagram Example</A></LI>
- <LI><A href="diagram/logicExample.html">Logic Diagram Example</A></LI>
- <LI><A href="diagram/layoutServiceExample.html">Layout Service Example</A></LI>
- <LI><A href="diagram/logicExample.html"></A><A
- href="diagram/decoratorServiceExample.html">Decorator Service Example</A></LI>
-</UL>
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
-
-</BODY>
-</HTML>
+<!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 name="generator" content="HTML Tidy, see www.w3.org" />
+<meta http-equiv="Content-Type"
+content="text/html; charset=ISO-8859-1" />
+<meta name="GENERATOR"
+content="IBM Software Development Platform" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<link href="../../book.css" rel="stylesheet" type="text/css" />
+<title>GMF Runtime Examples Guide</title>
+</head>
+<body>
+<h1>GMF Runtime Examples Guide</h1>
+
+<p>This guide presents the examples for the GMF Runtime.</p>
+
+<ul>
+<li><a href="common/serviceExample.html">Service Example</a></li>
+
+<li><a href="msl/clipboardExample.html">Clipboard Example</a></li>
+
+<li><a href="diagram/geometricShapesExample.html">Geoshape Diagram
+Example</a></li>
+
+<li><a href="diagram/logicExample.html">Logic Diagram
+Example</a></li>
+
+<li><a href="diagram/layoutServiceExample.html">Layout Service
+Example</a></li>
+
+<li><a href="diagram/logicExample.html"></a><a
+href="diagram/decoratorServiceExample.html">Decorator Service
+Example</a></li>
+</ul>
+
+<br />
+<br />
+<hr />
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright
+(c) 2000,2005 IBM Corporation and others. All Rights
+Reserved.</a></p>
+
+<br />
+ <br />
+</body>
+</html>
+
diff --git a/doc/org.eclipse.gmf.doc/examples-guide/msl/clipboardExample.html b/doc/org.eclipse.gmf.doc/examples-guide/msl/clipboardExample.html
index 44644de54..bdb40e8b4 100644
--- a/doc/org.eclipse.gmf.doc/examples-guide/msl/clipboardExample.html
+++ b/doc/org.eclipse.gmf.doc/examples-guide/msl/clipboardExample.html
@@ -1,49 +1,71 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
+<!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=iso-8859-1">
- <title>Clipboard Example</title>
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<meta http-equiv="Content-Type"
+content="text/html; charset=iso-8859-1" />
+<title>Clipboard Example</title>
</head>
<body>
-
<h2>Clipboard Example</h2>
<h3>Introduction</h3>
-<p>
-This example describes the usage of the clipboard framework within the SDK.
-It demonstrates how to copy and paste library model elements to and from the system clipboard respectively.
-</p>
+
+<p>This example describes the usage of the clipboard framework
+within the SDK. It demonstrates how to copy and paste library model
+elements to and from the system clipboard respectively.</p>
<h3>Description</h3>
-<p>
-This example plug-in is named <code>org.eclipse.gmf.examples.runtime.emf.clipboard</code>.
-This plug-in contributes the <b>Clipboard</b> menu to the library
-editor's main menu and context menu. The menu has two actions:
-<ol><li><b>Copy:</b>
-Supports rich copy support for books and writers. A writer's books are always copied when the writer is copied</li>
-<li><b>Paste:</b> Pasting a writer into a library that already has a writer of the same name merges the pasted
-writer into the existing one (most notably, adding to its books). <b>Undo/Redo</b> support for the paste operation uses
-the EMF <code>ChangeRecorder</code> API</li></ol>
-</p>
-
-<p>Please refer to the tutorial <a href="../../tutorials/msl/clipboardTutorial.html">Clipboard Tutorial</a>
-for reviewing the code samples within this example</p>
-
-<img src="./clipboard.GIF" alt="Clipboard Example Contributions"/>
+
+<p>This example plug-in is named
+<code>org.eclipse.gmf.examples.runtime.emf.clipboard</code>. This
+plug-in contributes the <b>Clipboard</b> menu to the library
+editor's main menu and context menu. The menu has two actions:</p>
+
+<ol>
+<li><b>Copy:</b> Supports rich copy support for books and writers.
+A writer's books are always copied when the writer is copied</li>
+
+<li><b>Paste:</b> Pasting a writer into a library that already has
+a writer of the same name merges the pasted writer into the
+existing one (most notably, adding to its books). <b>Undo/Redo</b>
+support for the paste operation uses the EMF
+<code>ChangeRecorder</code> API</li>
+</ol>
+
+<br />
+<br />
+
+
+<p>Please refer to the tutorial <a
+href="../../tutorials/msl/clipboardTutorial.html">Clipboard
+Tutorial</a> for reviewing the code samples within this example</p>
+
+<img src="./clipboard.GIF" alt="Clipboard Example Contributions" />
+
<h3>Usage</h3>
-<p>
-Refer to this example if you need:
+
+<p>Refer to this example if you need:</p>
+
<ol>
-<li>
-To implement fairly complex meta-model specific semantics for copy/paste operations,
-where some relationships between model elements need special treatment</li>
+<li>To implement fairly complex meta-model specific semantics for
+copy/paste operations, where some relationships between model
+elements need special treatment</li>
</ol>
-</p>
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
+
+<br />
+<br />
+ <br />
+<br />
+<hr />
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright
+(c) 2000,2005 IBM Corporation and others. All Rights
+Reserved.</a></p>
+
+<br />
+<br />
</body>
-</html> \ No newline at end of file
+</html>
+
diff --git a/doc/org.eclipse.gmf.doc/examples-guide/samples.html b/doc/org.eclipse.gmf.doc/examples-guide/samples.html
index 7eaf4b578..134a41232 100644
--- a/doc/org.eclipse.gmf.doc/examples-guide/samples.html
+++ b/doc/org.eclipse.gmf.doc/examples-guide/samples.html
@@ -1,30 +1,45 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
+<!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=iso-8859-1">
- <title>Installation of Examples</title>
- <LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<meta http-equiv="Content-Type"
+content="text/html; charset=iso-8859-1" />
+<title>Installation of Examples</title>
+<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1"
+type="text/css" />
</head>
<body>
-
-<h1>
-<b>Installing the GMF Examples</b></h1>
+<h1><b>Installing the GMF Examples</b></h1>
<h3>Installing examples manually</h3>
-To install the examples without the Update Manager, download the GMF Examples zip file from the
-Eclipse download site at <a href="http://download.eclipse.org/modeling/gmf/downloads/index.php">http://download.eclipse.org/modeling/gmf/downloads/index.php</a>.
-<p>The workbench should not be running while the examples are being installed. Extract the contents of the zip file to the root directory
-of your Eclipse installation.</p>
-<p>For example, if you installed the Eclipse
-SDK at <b> d:\eclipse\</b>, then extract the contents of the examples
-zip file to <b>d:\</b> (the
-subdirectories named <b>eclipse</b> will line up).</p>
-<p>Start the workbench. The examples are now installed in the workbench.</p>
-
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
+
+To install the examples without the Update Manager, download the
+GMF Examples zip file from the Eclipse download site at <a
+href="http://download.eclipse.org/modeling/gmf/downloads/index.php">
+http://download.eclipse.org/modeling/gmf/downloads/index.php</a>.
+
+<p>The workbench should not be running while the examples are being
+installed. Extract the contents of the zip file to the root
+directory of your Eclipse installation.</p>
+
+<p>For example, if you installed the Eclipse SDK at
+<b>d:\eclipse\</b>, then extract the contents of the examples zip
+file to <b>d:\</b> (the subdirectories named <b>eclipse</b> will
+line up).</p>
+
+<p>Start the workbench. The examples are now installed in the
+workbench.</p>
+
+<br />
+<br />
+<hr />
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright
+(c) 2000,2005 IBM Corporation and others. All Rights
+Reserved.</a></p>
+
+<br />
+<br />
</body>
-</html> \ No newline at end of file
+</html>
+
diff --git a/doc/org.eclipse.gmf.doc/hglegal.htm b/doc/org.eclipse.gmf.doc/hglegal.htm
index d6f8dd590..c78f96ae9 100644
--- a/doc/org.eclipse.gmf.doc/hglegal.htm
+++ b/doc/org.eclipse.gmf.doc/hglegal.htm
@@ -1,17 +1,17 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
+<!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 name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <LINK REL="STYLESHEET" HREF="book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="STYLESHEET" href="book.css" charset="ISO-8859-1" type="text/css" />
<title>Legal Notices</title>
</head>
<body>
<h3>
-<a NAME="Notices"></a>Notices</h3>
+<a name="Notices"></a>Notices</h3>
<p>
The material in this guide is Copyright (c) IBM Corporation and others 2000, 2005.
</p>
diff --git a/doc/org.eclipse.gmf.doc/howto/diagram/howto.html b/doc/org.eclipse.gmf.doc/howto/diagram/howto.html
index d7efb3a87..00424e7ec 100644
--- a/doc/org.eclipse.gmf.doc/howto/diagram/howto.html
+++ b/doc/org.eclipse.gmf.doc/howto/diagram/howto.html
@@ -1,2949 +1,2659 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-
+<!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=iso-8859-1">
-<link rel="Stylesheet" type="text/css" href="technote.css">
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<meta http-equiv="Content-Type"
+content="text/html; charset=iso-8859-1" />
+<link rel="Stylesheet" type="text/css" href="technote.css" />
<title>Diagram Services Layer - How-to Guide</title>
</head>
-
<body lang="EN-US" link="blue" vlink="blue">
-
-<a name=top></a><img src="../../logo.gif" border="0">
+<a id="top" name="top"></a><img src="../../logo.gif" border="0" />
<h1 align="center">Diagram Services Layer - How-to Guide</h1>
-<table border="0" cellspacing="8" cellpadding="0">
- <tr>
- <td>Version: 0.1</td>
- <td>Date: August 11, 2005</td>
- </tr>
+<table border="0" cellspacing="8" cellpadding="0">
+<tr>
+<td>Version: 0.1</td>
+<td>Date: August 11, 2005</td>
+</tr>
</table>
<h2>Contents</h2>
<ul>
- <li><a href="#introduction">Introduction</a></li>
- <li><a href="#refs">References</a></li>
- <li><A href="#notationStyles">How to add new notation styles to an
- existing shape</A></li>
- <li><a href="#clipboardFramework"></a><A href="#overrideShapeLook">How
- to override an existing shapes look</A></li>
- <li><a href="#validationFramework"><A
- name="preferenceChange0" href="#preferenceChange">How to change shape appearances based on a
- global preference change</A></a></li>
- <li><A href="#overrideConnectionLook"
- name="overrideConnectionLook0">How to override the look of a connection</A></a></li>
- <li><a href="#readOnlyViews"><SPAN class="GramE"><SPAN
- style="mso-bookmark:
-_Toc105513761"><A name="readOnlyViews0"
- href="#readOnlyViews">How to open multiple read-only views on a
- diagram</A></SPAN></SPAN></a></li>
- <LI><A name="changeColor0" href="#changeColor">How to </A><A
- href="#changeColor"><SPAN style="mso-bookmark:_Toc105513763">change
- the color of a shape dynamically</SPAN></A></LI>
- <LI><A name="shapeResizable0" href="#shapeResizable">How to make a shape resizable vs.
- non-resizable</A></LI>
+<li><a href="#introduction">Introduction</a></li>
+
+<li><a href="#refs">References</a></li>
+
+<li><a href="#notationStyles">How to add new notation styles to an
+existing shape</a></li>
+
+<li><a href="#clipboardFramework"></a><a
+href="#overrideShapeLook">How to override an existing shapes
+look</a></li>
+
+<li><a href="#validationFramework"><a id="preferenceChange0"
+name="preferenceChange0" href="#preferenceChange">How to change
+shape appearances based on a global preference change</a></a></li>
+
+<li><a id="overrideConnectionLook0" href="#overrideConnectionLook"
+name="overrideConnectionLook0">How to override the look of a
+connection</a></li>
</ul>
-<hr/>
+<ul class="noindent">
+<li><a href="#readOnlyViews"><span class="GramE"><span
+style="mso-bookmark: _Toc105513761"><a id="readOnlyViews0"
+name="readOnlyViews0" href="#readOnlyViews">How to open multiple
+read-only views on a diagram</a></span></span></a></li>
-<h2><a name="introduction"></a></a>Introduction</h2>
-<p class="backto"><font size="-1">[<a href="#top">back to top</a>]</font></p>
+<li><a id="changeColor0" name="changeColor0"
+href="#changeColor">How to</a> <a href="#changeColor"><span
+style="mso-bookmark:_Toc105513763">change the color of a shape
+dynamically</span></a></li>
-<p>
-This guide is a repository for questions on how to accomplish specific tasks within
-the diagram services layer.
-</p>
+<li><a id="shapeResizable0" name="shapeResizable0"
+href="#shapeResizable">How to make a shape resizable vs.
+non-resizable</a></li>
+</ul>
+
+<hr />
+<h2><a id="introduction" name="introduction"></a></h2>
+
+Introduction
+
+<p class="backto"><font size="-1">[<a href="#top">back to
+top</a>]</font></p>
-<h2><a name="refs"></a>References</h2>
-<p class="backto"><font size="-1">[<a href="#top">back to top</a>]</font></p><p></p>
+<p>This guide is a repository for questions on how to accomplish
+specific tasks within the diagram services layer.</p>
-<h2><SPAN
- style="mso-bookmark:_Toc105513756"><A name="notationStyles">How to add notation styles to an existing shape</A></SPAN></h2>
-<p class="backto"><font size="-1">[<a href="#top">back to top</a>]</font></p>
+<h2><a id="refs" name="refs"></a>References</h2>
-<P style="text-indent:0in;mso-list:none">Each shape node view class
+<p class="backto"><font size="-1">[<a href="#top">back to
+top</a>]</font></p>
+
+<h2><span style="mso-bookmark:_Toc105513756"><a id="notationStyles"
+name="notationStyles">How to add notation styles to an existing
+shape</a></span></h2>
+
+<p class="backto"><font size="-1">[<a href="#top">back to
+top</a>]</font></p>
+
+<p style="text-indent:0in;mso-list:none">Each shape node view class
(Node) will typically need to install a set of styles that allow a
-certain look of the notation to be persisted.<SPAN
- style="mso-spacerun:yes">  </SPAN>Usually the default style <SPAN
- class="SpellE">ShapeStyle</SPAN> will be adequate since this covers
-colors, text, etc.<SPAN style="mso-spacerun:yes">  </SPAN>However, it
-may be useful to add additional styles and/or have custom styles not
-accounted for in the notation meta-model (<SPAN class="SpellE">org.eclipse.gmf.runtime.notation</SPAN>).<SPAN
- style="mso-spacerun:yes">  </SPAN>For instance, a domain editor may
-wish to toggle the display of a particular shape to have different
-looks.<SPAN style="mso-spacerun:yes">  </SPAN>The property to store this
-is notational and consequently should be part of the notation
-meta-model.<SPAN style="mso-spacerun:yes">  </SPAN></P>
-
-<P>Create
-a new notation meta-model sub-class.<SPAN style="mso-spacerun:yes">  </SPAN>Since
-the property is typically an attribute of a node, this can be
-represented in a Style subclass.</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Open Rational Rose</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Select &quot;File Import&quot; using type Category Files (*.cat)</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Navigate to the <SPAN class="SpellE">org.eclipse.gmf.runtime.notation</SPAN>
-plug-in and fine in the source directories the cat file \<SPAN
- class="SpellE">src\rosemodel\org.eclipse.gmf.runtime.notation.Notation.cat</SPAN>
-and the <SPAN class="SpellE">org.eclipse.emf.Ecore.cat</SPAN> files.</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Create a new package under your <SPAN class="SpellE">LogicalView</SPAN>
-describing your notation meta-model (i.e. <SPAN class="SpellE">mynotation</SPAN>)</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Drag the style you wish to extend from the notation
-meta-model imported package onto the main diagram of the package you
-just created.</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Create your new style class with the appropriate
-attributes and draw a generalization to the style you wish to extend
-from.</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Right click on the package and select &quot;control <SPAN
- class="SpellE">mynotation&quot;</SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Save model</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Go to Eclipse, choose &quot;New Project / Eclipse Modeling
-Framework / EMF Project&quot;</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Name the project com.*.<SPAN class="SpellE">mynotation</SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Select &quot;Load from a Rose class model&quot;</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Navigate to the rose model you just created.<SPAN
- style="mso-spacerun:yes">  </SPAN>Hit &quot;Next&quot; until you get to the
-&quot;Package Selection&quot; page.</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Click &quot;Browse&quot;</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Navigate to notation meta-model directory (<SPAN
- class="SpellE">org.eclipse.gmf.runtime.notation/src/model</SPAN>) and in the
-right hand pane select <SPAN class="SpellE">notation.genmodel</SPAN>.</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>In the bottom pane select the Notation and <SPAN
- class="SpellE">Ecore</SPAN> check-boxes under the notation root.</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Select the <SPAN class="SpellE">mynotation</SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Click &quot;Finish&quot;</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Open the <SPAN class="SpellE">mynotation.genmodel</SPAN>.<SPAN
- style="mso-spacerun:yes">  </SPAN>Right click on the root in the editor
-and choose &quot;Generate Model Code&quot; and the &quot;Generate Edit Code&quot; menu
-items.</P>
-
-<H4 class="MsoNormal"><SPAN class="GramE">Modifying an already existing
-and generated notation meta-model.</SPAN></H4>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l1 level1 lfo6;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Make the changes in the Rose model and save.<SPAN
- style="mso-spacerun:yes">  </SPAN>In the directory/<SPAN class="SpellE">src</SPAN>/model,
-right click on the <SPAN class="SpellE">mynotation.genmodel</SPAN> file
-and choose &quot;reload&quot; to reflect the changes.<SPAN
- style="mso-spacerun:yes">  </SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l1 level1 lfo6;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Hit &quot;Next&quot; in the wizard until &quot;Finish&quot; appears and the
-click that.</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Open the <SPAN class="SpellE">mynotation.genmodel</SPAN>.<SPAN
- style="mso-spacerun:yes">  </SPAN>Right click on the root in the editor
-and choose &quot;Generate Model Code&quot; and the &quot;Generate Edit Code&quot; menu
-items.</P>
-
-<H4><A name="_Toc105513757">Reflect the changes of the new style value
-on the diagram editor</A></H4>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Instrument the new style in the &quot;<SPAN class="SpellE">createStyles</SPAN>&quot;
-function of View Factory subclass that creates the top level view you
-wish to store the style on.</P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4;
-tab-stops:list .75in"><!><SPAN
- style="mso-list:Ignore">-<SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</SPAN></SPAN><!>Overwrite &quot;<SPAN class="SpellE">refreshVisuals</SPAN>&quot;
-and &quot;<SPAN class="SpellE">handlePropertyChangeEvent</SPAN>&quot; functions in
-the <SPAN class="SpellE">EditPart</SPAN> class associated with the
-notation view and create new function &quot;<SPAN class="SpellE">refreshValue&quot;</SPAN>
-called within the &quot;refreshVisuals&quot; override which will perform the update of the figures based on the style change.<BR>
-</P>
-
-<DIV
- style="border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:48.0pt;margin-right:24.0pt">Code Snippet:
-<BR>
-<BR>
-<FONT face="Courier New" size="-1">protected void handlePropertyChangeEvent(
-PropertyChangeEvent evt) {<BR>
+certain look of the notation to be persisted.<span
+style="mso-spacerun:yes">&nbsp;</span> Usually the default style
+<span class="SpellE">ShapeStyle</span> will be adequate since this
+covers colors, text, etc.<span
+style="mso-spacerun:yes">&nbsp;</span> However, it may be useful to
+add additional styles and/or have custom styles not accounted for
+in the notation meta-model (<span
+class="SpellE">org.eclipse.gmf.runtime.notation</span>).<span
+style="mso-spacerun:yes">&nbsp;</span> For instance, a domain
+editor may wish to toggle the display of a particular shape to have
+different looks.<span style="mso-spacerun:yes">&nbsp;</span> The
+property to store this is notational and consequently should be
+part of the notation meta-model.<span
+style="mso-spacerun:yes">&nbsp;</span></p>
+
+<p>Create a new notation meta-model sub-class.<span
+style="mso-spacerun:yes">&nbsp;</span> Since the property is
+typically an attribute of a node, this can be represented in a
+Style subclass.</p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+org.eclipse.gmf.runtime.notation plug-in and fine in the source
+directories the cat file \<span
+class="SpellE">src\rosemodel\org.eclipse.gmf.runtime.notation.Notation.cat</span>
+and the <span class="SpellE">org.eclipse.emf.Ecore.cat</span>
+files.</p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+LogicalView describing your notation meta-model (i.e. <span
+class="SpellE">mynotation</span>)</p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+mynotation"</p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+mynotation</p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+&nbsp; Hit "Next" until you get to the "Package Selection"
+page.</p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+org.eclipse.gmf.runtime.notation/src/model) and in the right hand
+pane select <span class="SpellE">notation.genmodel</span>.</p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+Ecore check-boxes under the notation root.</p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+mynotation</p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+mynotation.genmodel.<span style="mso-spacerun:yes">&nbsp;</span>
+Right click on the root in the editor and choose "Generate Model
+Code" and the "Generate Edit Code" menu items.</p>
+
+<h4 class="MsoNormal"><span class="GramE">Modifying an already
+existing and generated notation meta-model.</span></h4>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l1 level1 lfo6; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+&nbsp; In the directory/<span class="SpellE">src</span>/model,
+right click on the <span class="SpellE">mynotation.genmodel</span>
+file and choose "reload" to reflect the changes.<span
+style="mso-spacerun:yes">&nbsp;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l1 level1 lfo6; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+mynotation.genmodel.<span style="mso-spacerun:yes">&nbsp;</span>
+Right click on the root in the editor and choose "Generate Model
+Code" and the "Generate Edit Code" menu items.</p>
+
+<h4><a id="_Toc105513757" name="_Toc105513757">Reflect the changes
+of the new style value on the diagram editor</a></h4>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+createStyles" function of View Factory subclass that creates the
+top level view you wish to store the style on.</p>
+
+<p class="MsoNormal"
+style="margin-left:.75in;text-indent:-.25in;mso-list:l2 level1 lfo4; tab-stops:list .75in">
+-<span style="font:7.0pt " times=""
+new="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+refreshVisuals" and "<span
+class="SpellE">handlePropertyChangeEvent</span>" functions in the
+<span class="SpellE">EditPart</span> class associated with the
+notation view and create new function "<span
+class="SpellE">refreshValue"</span> called within the
+"refreshVisuals" override which will perform the update of the
+figures based on the style change.<br />
+</p>
+
+<div
+style="border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt; padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:48.0pt;margin-right:24.0pt">
+Code Snippet:<br />
+<br />
+<font face="Courier New" size="-1">protected void
+handlePropertyChangeEvent( PropertyChangeEvent evt) {<br />
&nbsp;&nbsp;&nbsp;if
-(evt.getPropertyName().equals(MetaModelUtil.getID(MyNotationPackage.eINSTANCE.getMyStyle_Value())))<BR>
-&nbsp;&nbsp;&nbsp;refreshValue();<BR>
-else<BR>
-&nbsp;&nbsp;&nbsp;super.handlePropertyChangeEvent(evt);<BR>
-} </FONT><BR>
-<BR>
-<FONT face="Courier New" size="-2">/**<BR>
-<SPAN style="mso-spacerun:yes"> </SPAN>* Apart from the usual visual
-update, it also<BR>
-<SPAN style="mso-spacerun:yes"> </SPAN><SPAN class="GramE">* updates any
-necessary values in the figure world<BR>
-</SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*/<BR>
-<SPAN class="GramE">protected</SPAN>
-void <SPAN class="SpellE">refreshVisuals</SPAN>() {<BR>
-<SPAN style="mso-tab-count:1">            </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">super.refreshVisuals</SPAN></SPAN><SPAN class="GramE">(</SPAN>);<BR>
-<SPAN style="mso-tab-count:1">            </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">refreshValue</SPAN></SPAN><SPAN class="GramE">(</SPAN>);<BR>
-}</FONT><BR>
-<BR>
-
-<FONT face="Courier New" size="-2">/**<BR><SPAN
- style="mso-spacerun:yes"> </SPAN>* Refreshes the style value property<SPAN
- style="mso-spacerun:yes"> </SPAN><BR>
- &nbsp;*/<BR>
-<SPAN class="GramE">protected</SPAN> void <SPAN class="SpellE">refreshValue</SPAN>(){<BR>
-<SPAN class="SpellE"> MyStyle</SPAN> style =<SPAN
- style="mso-spacerun:yes">      </SPAN>(<SPAN class="SpellE">MyStyle</SPAN><SPAN
- class="GramE">)<SPAN class="SpellE">getView</SPAN></SPAN>().<SPAN
- class="SpellE">getStyle</SPAN>(<SPAN class="SpellE">mynotationPackage.eINSTANCE.getMyStyle</SPAN>());<BR>
-<SPAN style="mso-tab-count:1">            </SPAN><SPAN class="GramE">if(</SPAN>style
-!= null)<BR>
-<SPAN style="mso-tab-count:2">                        </SPAN><SPAN
- class="SpellE"><SPAN class="GramE">getMyFigure</SPAN></SPAN><SPAN
- class="GramE">(</SPAN>).<SPAN class="SpellE">setValue</SPAN>(<SPAN
- class="SpellE">style.getValue</SPAN>());<BR>
-}</FONT>
-
-<P class="MsoNormal" style="margin-left:.5in"><FONT face="Courier New"
- size="-2"></FONT></P>
-</DIV>
-<H2><A name="overrideShapeLook">How to override an existing shapes look?</A></H2>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><FONT size="-1">[<A
- href="#top">back to top</A>]</FONT><BR>
-</P>
-
-<OL style="margin-top:0in" start="1" type="1">
- <LI class="MsoNormal"
- style="color:black;mso-list:l6 level1 lfo9;tab-stops:list .5in;
- mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:
- 10.0pt;font-family:Helv;mso-bidi-font-family:Helv">First
- you'll need to determine the <SPAN class="SpellE">AbstractViewFactory</SPAN>
- subclass that represents the shape that you are creating.<SPAN
- style="mso-spacerun:yes">  </SPAN>This hierarchy is responsible for
- the construction and initialization of the notation that <SPAN
- class="GramE">persists</SPAN> the shape.<SPAN style="mso-spacerun:yes"> 
- </SPAN>To determine this, find the <SPAN class="SpellE">ViewProvider</SPAN>
- that provides the notation for the View and the class should be in a
- map with the semantic hint as a key.<SPAN style="mso-spacerun:yes">  </SPAN>Alternatively
- you could set a breakpoint in the <SPAN class="SpellE">AbstractViewFactory#createStyles</SPAN>
- method and see what type of View factory &quot;this&quot; is after a palette
- creation or drag/drop operation.<SPAN style="mso-spacerun:yes">  </SPAN>This
- will be the View factory class that you will need to inherit from in
- your provider.<o:p></o:p></SPAN></LI>
-</OL>
-
-<P class="MsoNormal"
- style="margin-left:.25in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:
-Helv;color:black"><o:p>&nbsp;</o:p></SPAN></P>
-
-<OL style="margin-top:0in" start="2" type="1">
- <LI class="MsoNormal"
- style="color:black;mso-list:l6 level1 lfo9;tab-stops:list .5in;
- mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:
- 10.0pt;font-family:Helv;mso-bidi-font-family:Helv">If
- you don't already have a custom view provider for your shape the
- following steps are necessary.<SPAN style="mso-spacerun:yes">  </SPAN>If
- you do, then proceed to step (3).<o:p></o:p></SPAN></LI>
- <OL style="margin-top:0in" start="1" type="a">
- <LI class="MsoNormal"
- style="color:black;mso-list:l6 level2 lfo9;tab-stops:
- list 1.0in;mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv">Create
- a new subclass of <SPAN class="SpellE">AbstractViewProvider</SPAN> to
- provide for your shape.<SPAN style="mso-spacerun:yes">  </SPAN>This is
- necessary because you wish to customize the initialization of the
- shape for your semantic domain.<o:p></o:p></SPAN></LI>
- <LI class="MsoNormal"
- style="color:black;mso-list:l6 level2 lfo9;tab-stops:
- list 1.0in;mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv">Add
- xml code in your plug-<SPAN class="SpellE">in.xml</SPAN> to allow your
- new provider to provide for the semantic element.<SPAN
- style="mso-spacerun:yes">  </SPAN>To provide for a semantic type some
- condition about the element the view is for, there is a &quot;method&quot; tag
- that allows qualification of the provider (see below).<SPAN
- style="mso-spacerun:yes">  </SPAN>The xml descriptor is a first line
- of defense to avoid loading your plug-in.<SPAN
- style="mso-spacerun:yes">  </SPAN><o:p></o:p></SPAN></LI>
- </OL>
-</OL>
-
-<P class="MsoNormal"
- style="margin-left:.75in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:
-Helv;color:black"><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="text-indent:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- class="GramE"><SPAN
- style="font-size:10.0pt;
-font-family:Helv;mso-bidi-font-family:Helv;color:black">Ex
-1.</SPAN></SPAN><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black"><SPAN
- style="mso-spacerun:yes">  </SPAN><SPAN class="GramE">Using the
-semantic element as the element type to provide against.</SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;extension</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>point</SPAN></SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;<SPAN
- class="SpellE">org.eclipse.gmf.runtime.diagram.ui.viewProviders</SPAN>&quot;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">      </SPAN></SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;<SPAN
- class="SpellE">viewProvider</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:
-"Courier New"'><SPAN
- style="mso-tab-count:1">  </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>class</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'>&quot;&lt;<SPAN
- class="SpellE">YourFullyQualfiedClass</SPAN>&quot;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN><SPAN style="mso-tab-count:1">    
-</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&lt;Priority</SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">               </SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>name</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:
-"Courier New";color:navy;background:white;mso-highlight:white'>=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;Highest&quot;</SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN><SPAN style="mso-tab-count:1">    
-</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&lt;/Priority&gt;</SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;object</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black;background:white;
-mso-highlight:white'>
-</SPAN><SPAN style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>class</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'>&quot;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:green'>&lt;<SPAN
- class="SpellE">YourFullyQualfiedSemanticClassToProvideFor</SPAN>&gt;<SPAN
- style="background:white;mso-highlight:white">&quot;</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN><SPAN style="mso-tab-count:1">    
-</SPAN><SPAN style="mso-spacerun:yes">   </SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>id</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:
-"Courier New";color:navy;background:white;mso-highlight:white'>=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;Nodes&quot;</SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;/object&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">  </SPAN>&lt;method name=?<SPAN class="SpellE"><SPAN
- class="GramE">getSomeMethodCallValue</SPAN></SPAN><SPAN class="GramE">(</SPAN>?)?
-<SPAN class="SpellE">notValue</SPAN>=?null?&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">   </SPAN>&lt;<SPAN class="GramE">context</SPAN>&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black;background:white;
-mso-highlight:white'><SPAN
- style="mso-tab-count:1">  </SPAN></SPAN><SPAN class="SpellE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;
-background:white;mso-highlight:white'>viewClass</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'>&quot;<SPAN
- class="SpellE">org.eclipse.gmf.runtime.notation.Node</SPAN>&quot;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN><SPAN style="mso-tab-count:1">    
-</SPAN></SPAN><SPAN lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:
-white;mso-highlight:white;mso-ansi-language:FR'>semanticHints=</SPAN><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";color:green;
-background:white;mso-highlight:white;mso-ansi-language:FR'>&quot;&quot;</SPAN><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";mso-ansi-language:
-FR'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white;mso-ansi-language:FR'><SPAN
- style="mso-spacerun:yes">         </SPAN><SPAN style="mso-tab-count:1">    
-</SPAN></SPAN><SPAN lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:
-white;mso-highlight:white;mso-ansi-language:FR'>elements=</SPAN><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white;mso-ansi-language:FR'>&quot;Nodes&quot;</SPAN><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:
-white;mso-highlight:white;mso-ansi-language:FR'>&gt;</SPAN><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";mso-ansi-language:FR'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white;mso-ansi-language:FR'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN lang="FR"
- style='font-size:
-9.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white;
-mso-ansi-language:FR'>&lt;/context&gt;</SPAN><SPAN
- lang="FR"
- style='font-size:
-9.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:
-white;mso-ansi-language:FR'><SPAN
- style="mso-spacerun:yes">       </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:
-"Courier New";color:navy;background:white;mso-highlight:white;mso-ansi-language:
-FR'>&lt;/viewProvider&gt;</SPAN><SPAN
- lang="FR"
- style='font-size:9.0pt;
-font-family:"Courier New";mso-ansi-language:FR'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white;mso-ansi-language:FR'><SPAN
- style="mso-spacerun:yes">   </SPAN></SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;/extension&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN class="GramE">Ex 2.</SPAN>
-Alternative is to check against the proxy interface and retrieve the
-type ID.<SPAN style="mso-spacerun:yes">  </SPAN>This is useful if you
-wish to provide your view against unresolved elements.<SPAN
- style="mso-spacerun:yes">  </SPAN>When an element is a proxy you
-wouldn't be able to make a conditional check against some semantic
-property because it wouldn't be accessible in the case of an unresolved
-reference.<SPAN style="mso-spacerun:yes">  </SPAN>If the element were
-unresolved the other overridden provider would kick-in instead.</P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;extension</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>point</SPAN></SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;<SPAN
- class="SpellE">org.eclipse.gmf.runtime.diagram.ui.viewProviders</SPAN>&quot;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">      </SPAN></SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;<SPAN
- class="SpellE">viewProvider</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:
-"Courier New"'><SPAN
- style="mso-tab-count:1">  </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>class</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'>&quot;&lt;<SPAN
- class="SpellE">YourFullyQualfiedClass</SPAN>&quot;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN><SPAN style="mso-tab-count:1">    
-</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&lt;Priority</SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">               </SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>name</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:
-"Courier New";color:navy;background:white;mso-highlight:white'>=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;Highest&quot;</SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN><SPAN style="mso-tab-count:1">    
-</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&lt;/Priority&gt;</SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;object</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black;background:white;
-mso-highlight:white'>
-</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>class=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;<SPAN
- class="SpellE"><SPAN class="GramE">org.eclipse.gmf.runtime.emf.core.util.IProxyEObject</SPAN></SPAN><SPAN
- class="GramE">(</SPAN><SPAN class="SpellE">org.eclipse.gmf.runtime.emf.core</SPAN>)&quot;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black;background:white;
-mso-highlight:white'>
-</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>id=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;<SPAN
- class="SpellE">YourSemanticType</SPAN>&quot;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;method</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black;background:white;
-mso-highlight:white'>
-</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>name=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;<SPAN
- class="SpellE"><SPAN class="GramE">getProxyClassID</SPAN></SPAN><SPAN
- class="GramE">(</SPAN>)&quot;</SPAN><SPAN
- style='font-size:9.0pt;font-family:
-"Courier New";color:black;background:white;mso-highlight:white'>
-</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>value=</SPAN><SPAN
- style='font-size:9.0pt;font-family:
-"Courier New";color:green;background:white;mso-highlight:white'>&quot;&lt;<SPAN
- class="SpellE">YourSemanticType</SPAN>&gt;&quot;</SPAN><SPAN
- style='font-size:
-9.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">            </SPAN></SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;/method&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;/object&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">   </SPAN>&lt;<SPAN class="GramE">context</SPAN>&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black;background:white;
-mso-highlight:white'><SPAN
- style="mso-tab-count:1">  </SPAN></SPAN><SPAN class="SpellE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;
-background:white;mso-highlight:white'>viewClass</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>=</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'>&quot;<SPAN
- class="SpellE">org.eclipse.gmf.runtime.notation.Node</SPAN>&quot;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes">         </SPAN><SPAN style="mso-tab-count:1">    
-</SPAN></SPAN><SPAN lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:
-white;mso-highlight:white;mso-ansi-language:FR'>semanticHints=</SPAN><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";color:green;
-background:white;mso-highlight:white;mso-ansi-language:FR'>&quot;&quot;</SPAN><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";mso-ansi-language:
-FR'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white;mso-ansi-language:FR'><SPAN
- style="mso-spacerun:yes">         </SPAN><SPAN style="mso-tab-count:1">    
-</SPAN></SPAN><SPAN lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:
-white;mso-highlight:white;mso-ansi-language:FR'>elements=</SPAN><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white;mso-ansi-language:FR'>&quot;Nodes&quot;</SPAN><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";color:navy;background:
-white;mso-highlight:white;mso-ansi-language:FR'>&gt;</SPAN><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";mso-ansi-language:FR'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white;mso-ansi-language:FR'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN lang="FR"
- style='font-size:
-9.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white;
-mso-ansi-language:FR'>&lt;/context&gt;</SPAN><SPAN
- lang="FR"
- style='font-size:
-9.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:
-white;mso-ansi-language:FR'><SPAN
- style="mso-spacerun:yes">       </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:
-"Courier New";color:navy;background:white;mso-highlight:white;mso-ansi-language:
-FR'>&lt;/viewProvider&gt;</SPAN><SPAN
- lang="FR"
- style='font-size:9.0pt;
-font-family:"Courier New";mso-ansi-language:FR'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- lang="FR"
- style='font-size:9.0pt;font-family:"Courier New";
-color:black;background:white;mso-highlight:white;mso-ansi-language:FR'><SPAN
- style="mso-spacerun:yes">   </SPAN></SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;/extension&gt;</SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.75in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:
-Helv;color:black"><o:p>&nbsp;</o:p></SPAN></P>
-
-<OL style="margin-top:0in" start="3" type="1">
- <LI class="MsoNormal"
- style="color:black;mso-list:l6 level1 lfo9;tab-stops:list .5in;
- mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:
- 10.0pt;font-family:Helv;mso-bidi-font-family:Helv">In
- your new <SPAN class="SpellE">ViewProvider</SPAN> class, override the
- method <SPAN class="SpellE">getNodeViewClass</SPAN> to provide based on
- semantic element type.<SPAN style="mso-spacerun:yes">  </SPAN>I'm
- assuming there's something specific about your semantic model that
- would allow you to do this in a mutually exclusive manner.<SPAN
- style="mso-spacerun:yes">  </SPAN>Consequently you should make the
- same </SPAN><SPAN style="color:windowtext">conditional check against
- the semantic property that was in the xml </SPAN><SPAN
- style="font-size:10.0pt;font-family:Helv;
- mso-bidi-font-family:Helv">to
- avoid the other provider from kicking in.<o:p></o:p></SPAN></LI>
-</OL>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;font-family:
-"Courier New";color:black'>i.e.</SPAN></SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'> <o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="GramE">protected</SPAN>
-Class <SPAN class="SpellE">getNodeViewClass</SPAN>(<SPAN class="SpellE">IAdaptable</SPAN>
-<SPAN class="SpellE">semanticAdapter</SPAN>,<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><SPAN
- style="mso-tab-count:2">              </SPAN>View <SPAN class="SpellE">containerView</SPAN>,
-String <SPAN class="SpellE">semanticHint</SPAN>) {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><SPAN
- style="mso-tab-count:2">              </SPAN>Element el = <SPAN
- class="SpellE"><SPAN class="GramE">getSemanticElement</SPAN></SPAN><SPAN
- class="GramE">(</SPAN><SPAN class="SpellE">semanticAdapter</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><SPAN
- style="mso-tab-count:2">              </SPAN>If (<SPAN class="GramE">el
-!</SPAN>= null) {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><SPAN
- style="mso-tab-count:3">                     </SPAN>...<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><SPAN
- style="mso-tab-count:3">                     </SPAN>If (? /* check
-condition)<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><SPAN
- style="mso-tab-count:4">                           </SPAN>Return &lt;<SPAN
- class="SpellE">YourNewViewClass.class</SPAN>&gt;<SPAN
- style="mso-tab-count:
-1">   </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><SPAN
- style="mso-tab-count:2">              </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><SPAN
- style="mso-tab-count:2">              </SPAN><SPAN class="GramE">return</SPAN>
-null;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>}<SPAN style="mso-tab-count:1">     
-</SPAN></SPAN><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Helv;color:black"><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:
-Helv;color:black"><o:p>&nbsp;</o:p></SPAN></P>
-
-<OL style="margin-top:0in" start="4" type="1">
- <LI class="MsoNormal"
- style="color:black;mso-list:l6 level1 lfo9;tab-stops:list .5in;
- mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:
- 10.0pt;font-family:Helv;mso-bidi-font-family:Helv">Finally,
- you need to create a new View notation class of the class you
- discovered in (1.).<SPAN style="mso-spacerun:yes">  </SPAN>Override <SPAN
- class="SpellE">AbstractNodeViewFactory#decorateView</SPAN> in order to
- change the default settings on the shape.<SPAN style="mso-spacerun:yes"> 
- </SPAN>For instance if you want to change the default visibility of
- certain compartments, you would do the following<o:p></o:p></SPAN></LI>
-</OL>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;font-family:
-"Courier New";color:black'>protected</SPAN></SPAN><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'> void <SPAN
- class="SpellE">decorateView</SPAN>(View <SPAN class="SpellE">containerView</SPAN>,
-View <SPAN class="SpellE">view</SPAN>, <o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- class="SpellE"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'>IAdaptable</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'> <SPAN
- class="SpellE">semanticElement</SPAN>, String <SPAN class="SpellE">semanticHint</SPAN>,
-<SPAN class="SpellE">int</SPAN> index, <o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- class="SpellE"><SPAN class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>boolean</SPAN></SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>
-persisted) {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- class="SpellE"><SPAN class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>super.decorateView</SPAN></SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>(</SPAN></SPAN><SPAN
- class="SpellE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>containerView</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>, <SPAN
- class="SpellE">semanticAdapter</SPAN>, <SPAN class="SpellE">semanticHint</SPAN>,
-index, persisted);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'>View <SPAN
- class="SpellE">subView</SPAN> = <o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:2.0in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- class="SpellE"><SPAN class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>ViewUtil.getChildBySemanticHint</SPAN></SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>(</SPAN></SPAN><SPAN
- class="SpellE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>containerView</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>, &lt;<SPAN
- class="SpellE">MySemanticHintString</SPAN>&gt;);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'>if</SPAN></SPAN><SPAN
- style='font-size:
-9.0pt;font-family:"Courier New";color:black'> (<SPAN
- class="SpellE">subView</SPAN>!= null) {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:2.0in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- class="SpellE"><SPAN class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>subView.setVisible</SPAN></SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>(</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:black'>false);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'>}<SPAN
- style="mso-tab-count:2">             </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Helv;mso-bidi-font-family:Helv;color:black"><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Helv;mso-bidi-font-family:Helv;color:black">Alternatively
-you could override the method <SPAN class="SpellE">initializeFromPreferences</SPAN>
-to retrieve values from the users preference store and then initialize
-settings accordingly.<SPAN style="mso-spacerun:yes">  </SPAN>However,
-this will get called before population of the contained views, so it can
-only be used to initialize top level view settings. <SPAN class="GramE">i.e</SPAN>.
-fill / outline color.</SPAN><BR>
-<BR>
-<BR>
-</P>
-
-<H2><A name="preferenceChange">How to change shape appearances based on
-a global preference change</A></H2>
-
-<P class="MsoNormal"><FONT size="-1">[<A href="#top">back to top</A>]</FONT></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:
-Helv;color:black">Often
-in a domain application it is useful to control shape appearances at a
-global level.<SPAN style="mso-spacerun:yes">  </SPAN>This alleviates
-user management of the individual shapes appearance and avoids
-persistence issues.<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:
-Helv;color:black">The
-way to accomplish this is to have a global workspace preference that
-your <SPAN class="SpellE">EditPart</SPAN> listens to and responds
-accordingly.<B><SPAN style="mso-spacerun:yes">  </SPAN></B><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:
-Helv;color:black">1.<SPAN
- style="mso-spacerun:yes">  </SPAN>First you need to add a listener on
-your <SPAN class="SpellE">EditPart</SPAN> controller (please refer to
-Eclipse on-line help for adding an application specific preference
-store).<SPAN style="mso-spacerun:yes">  </SPAN>To do <SPAN class="GramE">this
-add</SPAN> a nested class in your <SPAN class="SpellE">EditPart</SPAN>
-that implements the <SPAN class="SpellE">IPropertyChangeListener</SPAN>
-interface for listening to the Preference store.<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">   </SPAN><SPAN style="mso-tab-count:1">    </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>/**<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>* Listener for the <SPAN
- class="SpellE">PreferenceStore</SPAN>.<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>* Listen and respond for changes
-to the <o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>* <SPAN class="GramE">preference</SPAN>
-store value.<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>* <o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>*/<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="GramE">protected</SPAN>
-class <SPAN class="SpellE">PreferencePropertyChangeListener</SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN><SPAN class="GramE">implements</SPAN>
-<SPAN class="SpellE">IPropertyChangeListener</SPAN> {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN><SPAN class="GramE">public</SPAN>
-void <SPAN class="SpellE">propertyChange</SPAN>(<SPAN class="SpellE">PropertyChangeEvent</SPAN>
-event) {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:3">                     </SPAN>// if the property
-is not the event we're interested in then <o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN style="mso-tab-count:2">             
-</SPAN>// do nothing, return <SPAN style="mso-tab-count:3">               
-</SPAN><SPAN style="mso-spacerun:yes">           </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:3">                     </SPAN><SPAN class="GramE">if</SPAN>
-(event<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:4">                           </SPAN>.<SPAN
- class="SpellE"><SPAN class="GramE">getProperty</SPAN></SPAN><SPAN
- class="GramE">()</SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:4">                           </SPAN>.<SPAN
- class="GramE">equals(</SPAN>&lt;<SPAN class="SpellE">MyPreferenceIdentifier</SPAN>&gt;))
-{<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:4">                           </SPAN>/* call
-appropriate refresh method */<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:4">                           </SPAN><SPAN
- class="SpellE"><SPAN class="GramE">refreshGlobalPreferenceAttribute</SPAN></SPAN><SPAN
- class="GramE">(</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:4">                           </SPAN><SPAN
- class="SpellE"><SPAN class="GramE">getFigure</SPAN></SPAN><SPAN
- class="GramE">(</SPAN>).repaint();<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:3">                     </SPAN>}<SPAN
- style="mso-tab-count:3">                    </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:
-Helv;color:black">2.<SPAN
- style="mso-spacerun:yes">  </SPAN>Next you need to add this new class
-as a listener to the property store.<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>/**<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*
-Initializes the <SPAN class="SpellE">preferenceStore</SPAN> property
-change<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*
-<SPAN class="GramE">listener</SPAN>.<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*/<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="GramE">private</SPAN>
-void <SPAN class="SpellE">initPreferenceStoreListener</SPAN>() {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">preferenceListener</SPAN></SPAN> = new <SPAN
- class="SpellE">PreferencePropertyChangeListener</SPAN>();<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:3">              </SPAN>IPreferenceStore
+(evt.getPropertyName().equals(MetaModelUtil.getID(MyNotationPackage.eINSTANCE.getMyStyle_Value())))<br />
+&nbsp;&nbsp;&nbsp;refreshValue();<br />
+else<br />
+&nbsp;&nbsp;&nbsp;super.handlePropertyChangeEvent(evt);<br />
+}</font><br />
+<br />
+<font face="Courier New" size="-2">/**<br />
+<span style="mso-spacerun:yes">&nbsp;</span>* Apart from the usual
+visual update, it also<br />
+<span style="mso-spacerun:yes">&nbsp;</span><span class="GramE">*
+updates any necessary values in the figure world<br />
+</span><span style="mso-spacerun:yes">&nbsp;</span>*/<br />
+<span class="GramE">protected</span> void <span
+class="SpellE">refreshVisuals</span>() {<br />
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">super.refreshVisuals</span></span><span
+class="GramE">(</span>);<br />
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">refreshValue</span></span><span
+class="GramE">(</span>);<br />
+}</font><br />
+<br />
+ <font face="Courier New" size="-2">/**<br />
+<span style="mso-spacerun:yes">&nbsp;</span>* Refreshes the style
+value property<span style="mso-spacerun:yes">&nbsp;</span><br />
+ &nbsp;*/<br />
+<span class="GramE">protected</span> void <span
+class="SpellE">refreshValue</span>(){<br />
+ <span class="SpellE">MyStyle</span> style =<span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+(<span class="SpellE">MyStyle</span><span class="GramE">)<span
+class="SpellE">getView</span></span>().<span
+class="SpellE">getStyle</span>(<span
+class="SpellE">mynotationPackage.eINSTANCE.getMyStyle</span>());<br />
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">if(</span>style != null)<br />
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">getMyFigure</span></span><span
+class="GramE">(</span>).<span class="SpellE">setValue</span>(<span
+class="SpellE">style.getValue</span>());<br />
+}</font></div>
+
+<h2><a id="overrideShapeLook" name="overrideShapeLook">How to
+override an existing shapes look?</a></h2>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><font
+size="-1">[<a href="#top">back to top</a>]</font><br />
+</p>
+
+<ol style="margin-top:0in" start="1" type="1">
+<li class="MsoNormal"
+style="color:black;mso-list:l6 level1 lfo9;tab-stops:list .5in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size: 10.0pt;font-family:Helv;mso-bidi-font-family:Helv">
+First you'll need to determine the <span
+class="SpellE">AbstractViewFactory</span> subclass that represents
+the shape that you are creating.<span
+style="mso-spacerun:yes">&nbsp;</span> This hierarchy is
+responsible for the construction and initialization of the notation
+that <span class="GramE">persists</span> the shape.<span
+style="mso-spacerun:yes">&nbsp;</span> To determine this, find the
+<span class="SpellE">ViewProvider</span> that provides the notation
+for the View and the class should be in a map with the semantic
+hint as a key.<span style="mso-spacerun:yes">&nbsp;</span>
+Alternatively you could set a breakpoint in the <span
+class="SpellE">AbstractViewFactory#createStyles</span> method and
+see what type of View factory "this" is after a palette creation or
+drag/drop operation.<span style="mso-spacerun:yes">&nbsp;</span>
+This will be the View factory class that you will need to inherit
+from in your provider.</span></li>
+</ol>
+
+<ol style="margin-top:0in" start="2" type="1">
+<li class="MsoNormal"
+style="color:black;mso-list:l6 level1 lfo9;tab-stops:list .5in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size: 10.0pt;font-family:Helv;mso-bidi-font-family:Helv">
+If you don't already have a custom view provider for your shape the
+following steps are necessary.<span
+style="mso-spacerun:yes">&nbsp;</span> If you do, then proceed to
+step (3).</span></li>
+
+<li style="list-style: none">
+<ol style="margin-top:0in" start="1" type="a">
+<li class="MsoNormal"
+style="color:black;mso-list:l6 level2 lfo9;tab-stops: list 1.0in;mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv">
+Create a new subclass of <span
+class="SpellE">AbstractViewProvider</span> to provide for your
+shape.<span style="mso-spacerun:yes">&nbsp;</span> This is
+necessary because you wish to customize the initialization of the
+shape for your semantic domain.</span></li>
+
+<li class="MsoNormal"
+style="color:black;mso-list:l6 level2 lfo9;tab-stops: list 1.0in;mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv">
+Add xml code in your plug-<span class="SpellE">in.xml</span> to
+allow your new provider to provide for the semantic element.<span
+style="mso-spacerun:yes">&nbsp;</span> To provide for a semantic
+type some condition about the element the view is for, there is a
+"method" tag that allows qualification of the provider (see
+below).<span style="mso-spacerun:yes">&nbsp;</span> The xml
+descriptor is a first line of defense to avoid loading your
+plug-in.<span style="mso-spacerun:yes">&nbsp;</span></span></li>
+</ol>
+</li>
+</ol>
+
+<p class="MsoNormal"
+style="text-indent:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span class="GramE"><span
+style="font-size:10.0pt; font-family:Helv;mso-bidi-font-family:Helv;color:black">
+Ex 1.</span></span><span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black">
+<span style="mso-spacerun:yes">&nbsp;</span> <span
+class="GramE">Using the semantic element as the element type to
+provide against.</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:"
+courier="">&lt;extension</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:9.0pt;font-family:"
+courier="">point</span></span><span
+style="font-size:9.0pt; font-family:" courier="">=</span><span
+style="font-size:9.0pt;font-family:" courier="">"<span
+class="SpellE">org.eclipse.gmf.runtime.diagram.ui.viewProviders</span>"</span><span
+ style="font-size:9.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:9.0pt; font-family:" courier="">&lt;<span
+class="SpellE">viewProvider</span></span><span
+style="font-size:9.0pt;font-family: " courier=""><span
+style="mso-tab-count:1">&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span class="GramE"><span style="font-size:9.0pt; font-family:"
+courier="">class</span></span><span
+style="font-size:9.0pt;font-family:" courier="">=</span><span
+style="font-size:9.0pt;font-family:" courier="">"&lt;<span
+class="SpellE">YourFullyQualfiedClass</span>"</span><span
+style="font-size:9.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:9.0pt;font-family:"
+courier="">&lt;Priority</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:9.0pt;font-family:"
+courier="">name</span></span><span
+style="font-size:9.0pt;font-family: " courier="">=</span><span
+style="font-size:9.0pt;font-family:"
+courier="">"Highest"</span><span
+style="font-size:9.0pt; font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:9.0pt;font-family:"
+courier="">&lt;/Priority&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:9.0pt; font-family:"
+courier="">&lt;object</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span class="GramE"><span style="font-size:9.0pt; font-family:"
+courier="">class</span></span><span
+style="font-size:9.0pt;font-family:" courier="">=</span><span
+style="font-size:9.0pt;font-family:" courier="">"</span><span
+style="font-size:9.0pt;font-family:" courier="">&lt;<span
+class="SpellE">YourFullyQualfiedSemanticClassToProvideFor</span>&gt;<span
+ style="background:white;mso-highlight:white">"</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;</span></span><span
+class="GramE"><span style="font-size:9.0pt;font-family:"
+courier="">id</span></span><span
+style="font-size:9.0pt;font-family: " courier="">=</span><span
+style="font-size:9.0pt;font-family:" courier="">"Nodes"</span><span
+style="font-size:9.0pt; font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:9.0pt; font-family:"
+courier="">&lt;/object&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;</span> &lt;method name=?<span
+class="SpellE"><span
+class="GramE">getSomeMethodCallValue</span></span><span
+class="GramE">(</span>?)? <span
+class="SpellE">notValue</span>=?null?&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;</span> &lt;<span
+class="GramE">context</span>&gt;</span><span
+style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;</span></span> <span
+class="SpellE"><span style="font-size:9.0pt;font-family:"
+courier="">viewClass</span></span><span
+style="font-size:9.0pt;font-family:" courier="">=</span><span
+style="font-size:9.0pt;font-family:" courier="">"<span
+class="SpellE">org.eclipse.gmf.runtime.notation.Node</span>"</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span lang="FR" style="font-size:9.0pt;font-family:"
+courier="">semanticHints=</span><span lang="FR"
+style="font-size:9.0pt;font-family:" courier="">""</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span lang="FR" style="font-size:9.0pt;font-family:"
+courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span lang="FR" style="font-size:9.0pt;font-family:"
+courier="">elements=</span><span lang="FR"
+style="font-size:9.0pt;font-family:" courier="">"Nodes"</span><span
+lang="FR" style="font-size:9.0pt;font-family:"
+courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span lang="FR" style="font-size:9.0pt;font-family:"
+courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span lang="FR" style="font-size: 9.0pt;font-family:"
+courier="">&lt;/context&gt;</span><span lang="FR"
+style="font-size: 9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span lang="FR" style="font-size:9.0pt;font-family: "
+courier="">&lt;/viewProvider&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span lang="FR" style="font-size:9.0pt;font-family:"
+courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;</span></span> <span
+style="font-size:9.0pt; font-family:"
+courier="">&lt;/extension&gt;</span></p>
+
+<p class="MsoNormal" style="margin-left:.5in"><span
+class="GramE">Ex 2.</span> Alternative is to check against the
+proxy interface and retrieve the type ID.<span
+style="mso-spacerun:yes">&nbsp;</span> This is useful if you wish
+to provide your view against unresolved elements.<span
+style="mso-spacerun:yes">&nbsp;</span> When an element is a proxy
+you wouldn't be able to make a conditional check against some
+semantic property because it wouldn't be accessible in the case of
+an unresolved reference.<span
+style="mso-spacerun:yes">&nbsp;</span> If the element were
+unresolved the other overridden provider would kick-in instead.</p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:"
+courier="">&lt;extension</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:9.0pt;font-family:"
+courier="">point</span></span><span
+style="font-size:9.0pt; font-family:" courier="">=</span><span
+style="font-size:9.0pt;font-family:" courier="">"<span
+class="SpellE">org.eclipse.gmf.runtime.diagram.ui.viewProviders</span>"</span><span
+ style="font-size:9.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:9.0pt; font-family:" courier="">&lt;<span
+class="SpellE">viewProvider</span></span><span
+style="font-size:9.0pt;font-family: " courier=""><span
+style="mso-tab-count:1">&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span class="GramE"><span style="font-size:9.0pt; font-family:"
+courier="">class</span></span><span
+style="font-size:9.0pt;font-family:" courier="">=</span><span
+style="font-size:9.0pt;font-family:" courier="">"&lt;<span
+class="SpellE">YourFullyQualfiedClass</span>"</span><span
+style="font-size:9.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:9.0pt;font-family:"
+courier="">&lt;Priority</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:9.0pt;font-family:"
+courier="">name</span></span><span
+style="font-size:9.0pt;font-family: " courier="">=</span><span
+style="font-size:9.0pt;font-family:"
+courier="">"Highest"</span><span
+style="font-size:9.0pt; font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:9.0pt;font-family:"
+courier="">&lt;/Priority&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:"
+courier="">&lt;object</span><span
+style="font-size:9.0pt;font-family:" courier="">class=</span><span
+style="font-size:9.0pt;font-family:" courier="">"<span
+class="SpellE"><span
+class="GramE">org.eclipse.gmf.runtime.emf.core.util.IProxyEObject</span></span><span
+ class="GramE">(</span><span
+class="SpellE">org.eclipse.gmf.runtime.emf.core</span>)"</span><span
+ style="font-size:9.0pt;font-family:" courier="">id=</span><span
+style="font-size:9.0pt;font-family:" courier="">"<span
+class="SpellE">YourSemanticType</span>"</span><span
+style="font-size:9.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span style="font-size:9.0pt;font-family:"
+courier="">&lt;method</span><span
+style="font-size:9.0pt;font-family:" courier="">name=</span><span
+style="font-size:9.0pt;font-family:" courier="">"<span
+class="SpellE"><span
+class="GramE">getProxyClassID</span></span><span
+class="GramE">(</span>)"</span><span
+style="font-size:9.0pt;font-family:" courier="">value=</span><span
+style="font-size:9.0pt;font-family: " courier="">"&lt;<span
+class="SpellE">YourSemanticType</span>&gt;"</span><span
+style="font-size: 9.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:9.0pt; font-family:"
+courier="">&lt;/method&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:9.0pt; font-family:"
+courier="">&lt;/object&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;</span> &lt;<span
+class="GramE">context</span>&gt;</span><span
+style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;</span></span> <span
+class="SpellE"><span style="font-size:9.0pt;font-family:"
+courier="">viewClass</span></span><span
+style="font-size:9.0pt;font-family:" courier="">=</span><span
+style="font-size:9.0pt;font-family:" courier="">"<span
+class="SpellE">org.eclipse.gmf.runtime.notation.Node</span>"</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span lang="FR" style="font-size:9.0pt;font-family:"
+courier="">semanticHints=</span><span lang="FR"
+style="font-size:9.0pt;font-family:" courier="">""</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span lang="FR" style="font-size:9.0pt;font-family:"
+courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span lang="FR" style="font-size:9.0pt;font-family:"
+courier="">elements=</span><span lang="FR"
+style="font-size:9.0pt;font-family:" courier="">"Nodes"</span><span
+lang="FR" style="font-size:9.0pt;font-family:"
+courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span lang="FR" style="font-size:9.0pt;font-family:"
+courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span lang="FR" style="font-size: 9.0pt;font-family:"
+courier="">&lt;/context&gt;</span><span lang="FR"
+style="font-size: 9.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span lang="FR" style="font-size:9.0pt;font-family: "
+courier="">&lt;/viewProvider&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span lang="FR" style="font-size:9.0pt;font-family:"
+courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;</span></span> <span
+style="font-size:9.0pt; font-family:"
+courier="">&lt;/extension&gt;</span></p>
+
+<ol style="margin-top:0in" start="3" type="1">
+<li class="MsoNormal"
+style="color:black;mso-list:l6 level1 lfo9;tab-stops:list .5in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size: 10.0pt;font-family:Helv;mso-bidi-font-family:Helv">
+In your new <span class="SpellE">ViewProvider</span> class,
+override the method <span class="SpellE">getNodeViewClass</span> to
+provide based on semantic element type.<span
+style="mso-spacerun:yes">&nbsp;</span> I'm assuming there's
+something specific about your semantic model that would allow you
+to do this in a mutually exclusive manner.<span
+style="mso-spacerun:yes">&nbsp;</span> Consequently you should make
+the same</span> <span style="color:windowtext">conditional check
+against the semantic property that was in the xml</span> <span
+style="font-size:10.0pt;font-family:Helv; mso-bidi-font-family:Helv">
+to avoid the other provider from kicking in.</span></li>
+</ol>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span class="GramE"><span style="font-size:9.0pt;font-family: "
+courier="">i.e.</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">protected</span> Class <span
+class="SpellE">getNodeViewClass</span>(<span
+class="SpellE">IAdaptable</span> <span
+class="SpellE">semanticAdapter</span>,</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+View <span class="SpellE">containerView</span>, String <span
+class="SpellE">semanticHint</span>) {</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+Element el = <span class="SpellE"><span
+class="GramE">getSemanticElement</span></span><span
+class="GramE">(</span><span
+class="SpellE">semanticAdapter</span>);</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+If (<span class="GramE">el !</span>= null) {</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+...</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+If (? /* check condition)</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-tab-count:4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+Return &lt;<span
+class="SpellE">YourNewViewClass.class</span>&gt;<span
+style="mso-tab-count: 1">&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier="">}</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">return</span> null;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<ol style="margin-top:0in" start="4" type="1">
+<li class="MsoNormal"
+style="color:black;mso-list:l6 level1 lfo9;tab-stops:list .5in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size: 10.0pt;font-family:Helv;mso-bidi-font-family:Helv">
+Finally, you need to create a new View notation class of the class
+you discovered in (1.).<span style="mso-spacerun:yes">&nbsp;</span>
+Override <span
+class="SpellE">AbstractNodeViewFactory#decorateView</span> in order
+to change the default settings on the shape.<span
+style="mso-spacerun:yes">&nbsp;</span> For instance if you want to
+change the default visibility of certain compartments, you would do
+the following</span></li>
+</ol>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;mso-layout-grid-align:none; text-autospace:none">
+<span class="GramE"><span style="font-size:9.0pt;font-family: "
+courier="">protected</span></span> <span
+style="font-size:9.0pt; font-family:" courier="">void <span
+class="SpellE">decorateView</span>(View <span
+class="SpellE">containerView</span>, View <span
+class="SpellE">view</span>,</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span class="SpellE"><span style="font-size:9.0pt; font-family:"
+courier="">IAdaptable</span></span> <span
+style="font-size:9.0pt;font-family:" courier=""><span
+class="SpellE">semanticElement</span>, String <span
+class="SpellE">semanticHint</span>, <span class="SpellE">int</span>
+index,</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span class="SpellE"><span class="GramE"><span
+style="font-size:9.0pt;font-family:"
+courier="">boolean</span></span></span><span
+style="font-size:9.0pt;font-family:" courier="">persisted)
+{</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.5in;mso-layout-grid-align:none; text-autospace:none">
+<span class="SpellE"><span class="GramE"><span
+style="font-size:9.0pt;font-family:"
+courier="">super.decorateView</span></span></span><span
+class="GramE"><span style="font-size:9.0pt;font-family:"
+courier="">(</span></span><span class="SpellE"><span
+style="font-size:9.0pt;font-family:"
+courier="">containerView</span></span><span
+style="font-size:9.0pt;font-family:" courier="">, <span
+class="SpellE">semanticAdapter</span>, <span
+class="SpellE">semanticHint</span>, index, persisted);</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier="">View <span
+class="SpellE">subView</span> =</span></p>
+
+<p class="MsoNormal"
+style="margin-left:2.0in;mso-layout-grid-align:none; text-autospace:none">
+<span class="SpellE"><span class="GramE"><span
+style="font-size:9.0pt;font-family:"
+courier="">ViewUtil.getChildBySemanticHint</span></span></span><span
+ class="GramE"><span style="font-size:9.0pt;font-family:"
+courier="">(</span></span><span class="SpellE"><span
+style="font-size:9.0pt;font-family:"
+courier="">containerView</span></span><span
+style="font-size:9.0pt;font-family:" courier="">, &lt;<span
+class="SpellE">MySemanticHintString</span>&gt;);</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span class="GramE"><span style="font-size:9.0pt; font-family:"
+courier="">if</span></span> <span
+style="font-size: 9.0pt;font-family:" courier="">(<span
+class="SpellE">subView</span>!= null) {</span></p>
+
+<p class="MsoNormal"
+style="margin-left:2.0in;mso-layout-grid-align:none; text-autospace:none">
+<span class="SpellE"><span class="GramE"><span
+style="font-size:9.0pt;font-family:"
+courier="">subView.setVisible</span></span></span><span
+class="GramE"><span style="font-size:9.0pt;font-family:"
+courier="">(</span></span><span
+style="font-size:9.0pt;font-family:" courier="">false);</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier="">}</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span style="font-size:9.0pt;font-family:" courier="">}<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Helv;mso-bidi-font-family:Helv;color:black">
+Alternatively you could override the method <span
+class="SpellE">initializeFromPreferences</span> to retrieve values
+from the users preference store and then initialize settings
+accordingly.<span style="mso-spacerun:yes">&nbsp;</span> However,
+this will get called before population of the contained views, so
+it can only be used to initialize top level view settings. <span
+class="GramE">i.e</span>. fill / outline color.</span><br />
+<br />
+<br />
+</p>
+
+<h2><a id="preferenceChange" name="preferenceChange">How to change
+shape appearances based on a global preference change</a></h2>
+
+<p class="MsoNormal"><font size="-1">[<a href="#top">back to
+top</a>]</font></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;mso-layout-grid-align:none; text-autospace:none">
+<span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family: Helv;color:black">
+Often in a domain application it is useful to control shape
+appearances at a global level.<span
+style="mso-spacerun:yes">&nbsp;</span> This alleviates user
+management of the individual shapes appearance and avoids
+persistence issues.</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;mso-layout-grid-align:none; text-autospace:none">
+<span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family: Helv;color:black">
+The way to accomplish this is to have a global workspace preference
+that your <span class="SpellE">EditPart</span> listens to and
+responds accordingly.<b><span
+style="mso-spacerun:yes">&nbsp;</span></b></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;mso-layout-grid-align:none; text-autospace:none">
+<span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family: Helv;color:black">
+1.<span style="mso-spacerun:yes">&nbsp;</span> First you need to
+add a listener on your <span class="SpellE">EditPart</span>
+controller (please refer to Eclipse on-line help for adding an
+application specific preference store).<span
+style="mso-spacerun:yes">&nbsp;</span> To do <span
+class="GramE">this add</span> a nested class in your <span
+class="SpellE">EditPart</span> that implements the <span
+class="SpellE">IPropertyChangeListener</span> interface for
+listening to the Preference store.</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;</span> <span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+/**</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+* Listener for the <span
+class="SpellE">PreferenceStore</span>.</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+* Listen and respond for changes to the</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+* <span class="GramE">preference</span> store value.</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+*</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+*/</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">protected</span> class <span
+class="SpellE">PreferencePropertyChangeListener</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">implements</span> <span
+class="SpellE">IPropertyChangeListener</span> {</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">public</span> void <span
+class="SpellE">propertyChange</span>(<span
+class="SpellE">PropertyChangeEvent</span> event) {</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+// if the property is not the event we're interested in
+then</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+// do nothing, return <span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">if</span> (event</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+.<span class="SpellE"><span
+class="GramE">getProperty</span></span><span
+class="GramE">()</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+.<span class="GramE">equals(</span>&lt;<span
+class="SpellE">MyPreferenceIdentifier</span>&gt;)) {</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+/* call appropriate refresh method */</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">refreshGlobalPreferenceAttribute</span></span><span
+class="GramE">(</span>);</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">getFigure</span></span><span
+class="GramE">(</span>).repaint();</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}<span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;mso-layout-grid-align:none; text-autospace:none">
+<span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family: Helv;color:black">
+2.<span style="mso-spacerun:yes">&nbsp;</span> Next you need to add
+this new class as a listener to the property store.</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+/**</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>* Initializes the <span
+class="SpellE">preferenceStore</span> property change</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>* <span
+class="GramE">listener</span>.</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>*/</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">private</span> void <span
+class="SpellE">initPreferenceStoreListener</span>() {</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">preferenceListener</span></span> = new <span
+class="SpellE">PreferencePropertyChangeListener</span>();</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>IPreferenceStore
preferenceStore = (IPreferenceStore)
-getDiagramPreferencesHint().getPreferenceStore();</SPAN></P><P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">preferenceStore.addPropertyChangeListener</SPAN></SPAN><SPAN
- class="GramE">(</SPAN><SPAN class="SpellE">preferenceListener</SPAN>);<o:p></o:p></SPAN></P><P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="GramE">protected</SPAN>
-void <SPAN class="SpellE">addNotationalListeners</SPAN>() {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">super.addNotationalListeners</SPAN></SPAN><SPAN
- class="GramE">(</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN></SPAN><SPAN
- class="SpellE"><SPAN class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:red'>initPreferenceStoreListener</SPAN></SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:red'>(</SPAN></SPAN><SPAN
- style='font-size:9.0pt;font-family:"Courier New";color:red'>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:9.0pt;font-family:"Courier New";
-color:black'><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:
-Helv;color:black">3.<SPAN
- style="mso-spacerun:yes">  </SPAN>Then you need to handle the property
-change event in a method.<SPAN style="mso-spacerun:yes">  </SPAN>This
-requires retrieving the preference global value from the store and then
-making the appropriate changes to the figure to reflect the global
-value.<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:
-Helv;color:black"><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>/**<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*
-Refreshes this classifier node figure's gradient fill to reflect <o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*
-<SPAN class="GramE">the</SPAN> preference store value for gradient fill.<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*/<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="GramE">protected</SPAN>
-void <SPAN class="SpellE">refreshGlobalPreferenceAttribute</SPAN>() {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">             </SPAN><SPAN
- style="mso-tab-count:3"></SPAN>IPreferenceStore preferenceStore =
-(IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();</SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN>//refresh gradient<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">boolean</SPAN></SPAN> <SPAN class="SpellE">myGlobalPreference</SPAN>
-= true;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">myGlobalPreference</SPAN></SPAN> = <SPAN class="SpellE">preferenceStore.getBoolean</SPAN>(
-&lt;<SPAN class="SpellE">MyPreferenceIdentifier</SPAN>&gt;);<SPAN
- style="mso-tab-count:2">           </SPAN><SPAN style="mso-tab-count:1">      
-</SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN>?<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:3">                 </SPAN>/* do figure
-synchronization */<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">getFigure</SPAN></SPAN><SPAN class="GramE">(</SPAN>).repaint();<o:p></o:p></SPAN></P><P class="MsoNormal"
- style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:9.0pt;
-font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>}<o:p></o:p></SPAN></P>
-<P><BR></P><P class="MsoNormal"><o:p>&nbsp;</o:p></P>
-
-<H2><A name="overrideConnectionLook">How to override the look of a connection</A></H2>
-
-<P class="MsoNormal"><FONT size="-1">[<A href="#top">back to top</A>]</FONT></P>
-
-<P class="MsoNormal">To accomplish this you need to hook into the
-controller of the connection which is the <SPAN class="SpellE">EditPart</SPAN>
-which synchronizes the model and figure worlds.<SPAN
- style="mso-spacerun:yes">  </SPAN>You need to create a new <SPAN
- class="SpellE">EditPart</SPAN> provider which is registered against the
-<SPAN class="SpellE">EditPartService</SPAN> that will override the
-existing <SPAN class="SpellE">EditPart</SPAN> provider to provide a new
-<SPAN class="SpellE">EditPart</SPAN> for the connection shape you're
-interested in.</P>
-
-<P class="MsoNormal"><o:p>&nbsp;</o:p></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;color:black">Similar to the View service
-extensions, the <SPAN class="SpellE">EditPart</SPAN> provider consists
-of 3 different components.<SPAN style="mso-spacerun:yes">  </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;color:black"><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;color:black">1. The xml descriptor
-specification of the extension in the plug-<SPAN class="SpellE">in.xml</SPAN>
-file.<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;color:black">2. The provider class which is
-specified by the xml and provides the mapping of the type to your <SPAN
- class="SpellE">EditPart</SPAN> class<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;color:black">3. The actual <SPAN class="SpellE">EditPart</SPAN>
-class that will override the existing behavior.<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;color:black"><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black">First
-the xml:<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>&lt;/extension&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">      </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy'>&lt;extension<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN class="GramE"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>point</SPAN></SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>=</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;<SPAN
- class="SpellE">org.eclipse.gmf.runtime.diagram.ui.editpartProviders</SPAN>&quot;</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">      </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy'>&lt;<SPAN
- class="SpellE">editpartProvider</SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">            </SPAN></SPAN><SPAN class="GramE"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>class</SPAN></SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>=</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;com.&lt;<SPAN
- class="SpellE">myPath</SPAN>&gt;.<SPAN class="SpellE">MyOverrideProvider</SPAN>&quot;</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy'>&lt;Priority<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">               </SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>name</SPAN></SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>=</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;Low&quot;</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy'>&lt;/Priority&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy'>&lt;object<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">               </SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>class</SPAN></SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>=</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;<SPAN
- class="SpellE">org.eclipse.gmf.runtime.notation.Edge</SPAN>&quot;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">               </SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>id</SPAN></SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>=</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;<SPAN
- class="SpellE">MyConnectionOverride</SPAN>&quot;</SPAN><SPAN
- style='font-size:
-10.0pt;font-family:"Courier New";color:navy'>&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">             </SPAN></SPAN><SPAN
- style='font-size:
-10.0pt;font-family:"Courier New";color:navy'>&lt;method<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">                  </SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>name</SPAN></SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>=</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;<SPAN
- class="SpellE">getElement</SPAN>()&quot;</SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy'>&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">            </SPAN><SPAN
- style="mso-tab-count:1">      </SPAN></SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>&lt;value</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'> </SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>class=</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;&lt;class
-path to semantic element&gt;&quot;</SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy'>/&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">            </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy'>&lt;/method&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">         </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy'>&lt;/object&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">      </SPAN><SPAN style="mso-tab-count:1">     
-</SPAN></SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>&lt;context<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">               </SPAN></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>views</SPAN></SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'>=</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;<SPAN
- class="SpellE">MyConnectionOverride</SPAN>&quot;</SPAN><SPAN
- style='font-size:
-10.0pt;font-family:"Courier New";color:navy'>&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">        </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy'>&lt;/context&gt;</SPAN><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">       </SPAN><SPAN style="mso-tab-count:1">    
-</SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">      </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy'>&lt;/<SPAN
- class="SpellE">editpartProvider</SPAN>&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-spacerun:yes">   </SPAN></SPAN><SPAN
- style='font-size:10.0pt;
-font-family:"Courier New";color:navy'>&lt;/extension&gt;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black">In
-this descriptor we are specifying the provider class that and a priority
-level that the provider will be at relative to other providers.<SPAN
- style="mso-spacerun:yes">  </SPAN>In this case, we know that the
-existing provider for the relationship is at the &quot;Lowest&quot;
-priority, so we can provide ours at one level higher - i.e.
-&quot;Low&quot;.<SPAN style="mso-spacerun:yes">  </SPAN>The object tag
-lets us specify the view category we're supplying the <SPAN
- class="SpellE">EditPart</SPAN> for and the criteria under which our
-provider will be loaded.<SPAN style="mso-spacerun:yes">  </SPAN>In this
-case, we chose a broad criteria and our provider will be loaded when the
-connection is of the semantic relationship we expect.<SPAN
- style="mso-spacerun:yes">  </SPAN>In the actual java code of our
-provider class we can restrict the actual criteria to be based <SPAN
- class="GramE">on a more strict criteria</SPAN>, such as some aspect or
-property of the semantic relationship.<SPAN style="mso-spacerun:yes">  </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:10.0pt;font-family:"Courier New";color:navy'><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black">Next
-the provider class is fairly straightforward.<SPAN
- style="mso-spacerun:yes">  </SPAN>It extends from the abstract class <SPAN
- class="SpellE">AbstractEditPartProvider</SPAN> and overrides the method
-for retrieving the connection <SPAN class="SpellE">editpart</SPAN>.<SPAN
- style="mso-spacerun:yes">  </SPAN>In the following example, it's
-providing a custom <SPAN class="SpellE">EditPart</SPAN> when the shape
-has a particular keyword installed.<SPAN style="mso-spacerun:yes">  </SPAN>More
-commonly, you would switch based on the semantic type which is set to
-the value you've defined in your <SPAN class="SpellE">IElementType</SPAN>.<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black"><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- class="GramE"><SPAN
- style="font-size:10.0pt;font-family:Courier;mso-bidi-font-family:Courier;
-color:black">public</SPAN></SPAN><SPAN
- style="font-size:10.0pt;font-family:
-Courier;mso-bidi-font-family:Courier;color:black">
-class <SPAN class="SpellE">MyEditPartProvider</SPAN> extends <SPAN
- class="SpellE">AbstractEditPartProvider</SPAN> {<SPAN
- style="mso-tab-count:1">      </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:1">      </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN class="GramE">protected</SPAN>
-Class <SPAN class="SpellE">getEdgeEditPartClass</SPAN>(View <SPAN
- class="SpellE">view</SPAN>) {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="SpellE">EObject</SPAN>
-el = <SPAN class="SpellE"><SPAN class="GramE">view.getElement</SPAN></SPAN><SPAN
- class="GramE">(</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="GramE">if</SPAN>
-(el != null &amp;&amp; el <SPAN class="SpellE">instanceof</SPAN> &lt;<SPAN
- class="SpellE">MySemanticElement</SPAN> class&gt; ) {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:3">                  </SPAN><SPAN class="GramE">if</SPAN>
-(? &lt;some condition is <SPAN class="SpellE">satisified</SPAN>&gt; )<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:4">                        </SPAN><SPAN
- class="GramE">return</SPAN> <SPAN class="SpellE">MyCustomEditPart.class</SPAN>;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:3">                  </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="GramE">return</SPAN>
-null;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:1">      </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black">}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Courier;mso-bidi-font-family:Courier;
-color:black"><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black">Finally
-we can look at the <SPAN class="SpellE">EditPart</SPAN> class itself.<SPAN
- style="mso-spacerun:yes">  </SPAN>In this case we are only interested
-in overriding the look of the connection.<SPAN style="mso-spacerun:yes"> 
-</SPAN>Consequently, we have to override the method that creates the
-figure in the connection edit part.<SPAN style="mso-spacerun:yes">  </SPAN>This
-method is the <SPAN class="SpellE"><SPAN class="GramE">createConnectionFigure</SPAN></SPAN><SPAN
- class="GramE">(</SPAN>).<SPAN style="mso-spacerun:yes">  </SPAN>Then we
-simply use the appropriate Draw2d API's to instantiate a different <SPAN
- class="SpellE">polyline</SPAN> figure with the look we desire:<o:p></o:p></SPAN></P><P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- class="GramE"><SPAN
- style="font-size:10.0pt;font-family:Courier;mso-bidi-font-family:Courier;
-color:black">public</SPAN></SPAN><SPAN
- style="font-size:10.0pt;font-family:
-Courier;mso-bidi-font-family:Courier;color:black">
-class <SPAN class="SpellE">MyCustomEditPart</SPAN> extends <SPAN
- class="SpellE">OriginalEditPart</SPAN> {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:1">      </SPAN>/**<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*
-@<SPAN class="SpellE">param</SPAN> view<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*/<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN class="GramE">public</SPAN>
-<SPAN class="SpellE">MyCustomEditPart</SPAN> (View <SPAN class="SpellE">view</SPAN>)
-{<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="GramE">super(</SPAN>view);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN>// TODO Auto-generated
-constructor stub<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:1">      </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN class="GramE">protected</SPAN>
-Connection <SPAN class="SpellE">createConnectionFigure</SPAN>() {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="SpellE">PolylineConnectionEx</SPAN>
-<SPAN class="SpellE">conn</SPAN> = new <SPAN class="SpellE"><SPAN
- class="GramE">PolylineConnectionEx</SPAN></SPAN><SPAN class="GramE">(</SPAN>);<o:p></o:p></SPAN></P><P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">conn.setLineStyle</SPAN></SPAN><SPAN class="GramE">(</SPAN><SPAN
- class="SpellE">Graphics.LINE_SOLID</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="SpellE">OpenArrowDecoration</SPAN>
-<SPAN class="SpellE">sourceDecorative</SPAN> = new <SPAN class="SpellE"><SPAN
- class="GramE">OpenArrowDecoration</SPAN></SPAN><SPAN class="GramE">(</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">sourceDecorative.setTemplate</SPAN></SPAN><SPAN
- class="GramE">(</SPAN><SPAN class="SpellE">OpenArrowDecoration.TRIANGLE_TIP</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">sourceDecorative.setScale</SPAN></SPAN><SPAN
- class="GramE">(</SPAN><SPAN class="SpellE">MapMode.DPtoLP</SPAN>(10),<SPAN
- class="SpellE">MapMode.DPtoLP</SPAN>(5));<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">sourceDecorative.setLineStyle</SPAN></SPAN><SPAN
- class="GramE">(</SPAN><SPAN class="SpellE">Graphics.LINE_SOLID</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">conn.setSourceDecoration</SPAN></SPAN><SPAN class="GramE">(</SPAN><SPAN
- class="SpellE">sourceDecorative</SPAN>);<o:p></o:p></SPAN></P><P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="GramE">return</SPAN>
-<SPAN class="SpellE">conn</SPAN>;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black"><SPAN
- style="mso-tab-count:1">      </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in;
-mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;
-font-family:Courier;mso-bidi-font-family:Courier;color:black">}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Courier;mso-bidi-font-family:Courier;
-color:black"><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Arial;color:black">Then when you
-create the relationship which fits the new <SPAN class="SpellE">critera</SPAN>
-of the xml and provider, then it will render using the new figure you
-created in the custom <SPAN class="SpellE">EditPart</SPAN>.<o:p></o:p></SPAN></P>
-<P><BR>
-</P>
-<H2><SPAN class="GramE"><SPAN style="mso-bookmark:
-_Toc105513761"><A name="readOnlyViews">How to open multiple read-only
-views on a diagram</A></SPAN></SPAN><BR>
-<FONT size="-1">[<A href="#top">back to top</A>]</FONT></H2>
-<P class="MsoNormal">It is possible to view the same notation data in 2
-different viewers.<SPAN style="mso-spacerun:yes">  </SPAN>Since GEF /
-GMF implements the MFC design pattern, it is a simple matter to
-view the same data in different viewers.<SPAN style="mso-spacerun:yes"> 
-</SPAN>The &quot;Model&quot; (Notation) is the same in both viewers and
-synchronized with different &quot;View&quot; (Figure) data through unique
-controllers (<SPAN class="SpellE">EditParts</SPAN>) in each viewer.</P>
-
-<P><BR>
-<SPAN style="mso-bookmark:_Toc105513762">Creating a read-only viewer of
-an existing diagram</SPAN>
-</P>
-<P><BR>
-If you wish to have a read-only view of the
-diagram, this is probably well suited to be displayed in an Eclipse View
-instead of a full-fledged editor.</P>
-<P class="MsoNormal">In your implementation of the <SPAN class="SpellE">IViewPart</SPAN>
-the <SPAN class="SpellE">createPartControl</SPAN> would create the
-Viewer to display the diagram.<SPAN style="mso-spacerun:yes">  </SPAN>The
-<SPAN class="SpellE">DiagramEditPart</SPAN> is retrieved and explicitly
-set to disable the <SPAN class="SpellE">EditMode</SPAN> capability.<SPAN
- style="mso-spacerun:yes">  </SPAN>It is a perquisite that a <SPAN
- class="SpellE">DiagramView</SPAN> object is ?in-hand?.<SPAN
- style="mso-spacerun:yes">  </SPAN>This could be retrieved by invoking
-an action from the Diagram element in the Model Explorer.</P>
-
-<P class="MsoNormal">// the assumption of this method is that the <SPAN
- class="SpellE">DiagramView</SPAN> has been pre-loaded</P>
-
-<P class="MsoNormal"><SPAN class="GramE"><SPAN
- style='font-size:8.0pt;font-family:
-"Courier New"'>private</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:
-"Courier New"'> <SPAN
- class="SpellE">GraphicalViewer</SPAN> viewer;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN class="GramE"><SPAN
- style='font-size:8.0pt;font-family:
-"Courier New"'>private</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:
-"Courier New"'> <SPAN
- class="SpellE">GraphicalViewer</SPAN> viewer;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN class="GramE"><SPAN
- style='font-size:8.0pt;font-family:
-"Courier New"'>public</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:
-"Courier New"'> class <SPAN
- class="SpellE">TraceDiagramGraphicalViewer</SPAN> extends <SPAN
- class="SpellE">DiagramGraphicalViewer</SPAN> {<B><I><o:p></o:p></I></B></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New"'>// no implementatio<SPAN
- style="mso-bidi-font-weight:
-bold;mso-bidi-font-style:italic">n.<SPAN
- style="mso-spacerun:yes">  </SPAN>This class is extended from <o:p></o:p></SPAN></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New";mso-bidi-font-weight:bold;mso-bidi-font-style:italic'>//
-</SPAN><SPAN class="SpellE"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'>DiagramGraphicalViewer</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'> for type information
-only.<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN class="GramE"><SPAN
- style='font-size:8.0pt;font-family:
-"Courier New"'>public</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:
-"Courier New"'> void <SPAN
- class="SpellE">createPartControl</SPAN>(Composite comp) {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="GramE">viewer</SPAN>
-= new <SPAN class="SpellE">TraceDiagramGraphicalViewer</SPAN>();<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">viewer.createControl</SPAN></SPAN><SPAN class="GramE">(</SPAN>comp);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">viewer.getControl</SPAN></SPAN><SPAN class="GramE">(</SPAN>).<SPAN
- class="SpellE">setBackground</SPAN>(<SPAN class="SpellE">ColorConstants.listBackground</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="SpellE">DiagramEditDomain</SPAN>
-<SPAN class="SpellE">editDomain</SPAN> = new <SPAN class="SpellE"><SPAN
- class="GramE">DiagramEditDomain</SPAN></SPAN><SPAN class="GramE">(</SPAN>null);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">editDomain.setCommandStack</SPAN></SPAN><SPAN
- class="GramE">(</SPAN>new <SPAN class="SpellE">DiagramCommandStack</SPAN>(<SPAN
- class="SpellE">editDomain</SPAN>));<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">viewer.setEditDomain</SPAN></SPAN><SPAN class="GramE">(</SPAN><SPAN
- class="SpellE">editDomain</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">viewer.setRootEditPart</SPAN></SPAN><SPAN class="GramE">(</SPAN>new
-<SPAN class="SpellE">DiagramRootEditPart</SPAN>());<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">viewer.setEditPartFactory</SPAN></SPAN><SPAN
- class="GramE">(</SPAN><SPAN class="SpellE">EditPartService.getInstance</SPAN>());<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">viewer.setContents</SPAN></SPAN><SPAN
- class="GramE">(<SPAN class="SpellE">GeoDiagramEditor.diagView</SPAN>));<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">viewer.flush</SPAN></SPAN><SPAN class="GramE">(</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><B
- style="mso-bidi-font-weight:normal">// now disable editing<o:p></o:p></B></SPAN></P>
-
-<P class="MsoNormal"><B style="mso-bidi-font-weight:normal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:
-1">       </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">Assert.isTrue</SPAN></SPAN><SPAN class="GramE">(</SPAN><SPAN
- class="SpellE">viewer.getContents</SPAN>() <SPAN class="SpellE">instanceof</SPAN>
-<SPAN class="SpellE">DiagramEditPart</SPAN>);<o:p></o:p></SPAN></B></P>
-
-<P class="MsoNormal"><B style="mso-bidi-font-weight:normal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:
-2">       </SPAN><SPAN class="SpellE">DiagramEditPart</SPAN>
-<SPAN class="SpellE">diagEP</SPAN> = (<SPAN class="SpellE">DiagramEditPart</SPAN>)
-<SPAN class="SpellE"><SPAN class="GramE">viewer.getContents</SPAN></SPAN><SPAN
- class="GramE">(</SPAN>);<o:p></o:p></SPAN></B></P>
-
-<P class="MsoNormal"><B style="mso-bidi-font-weight:normal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:
-1">       </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">diagEP.disableEditMode</SPAN></SPAN><SPAN class="GramE">(</SPAN>);</SPAN></B><BR>
-</P>
-<H3 class="MsoNormal"><BR>
-<FONT face="Courier New"> </FONT><A name="_Toc1055137640">Screen
-snapshot of multiple views of diagram:</A><BR>
-<SPAN style='font-size:10.0pt;font-family:"Courier New"'><IMG border="0"
- width="570" height="499" src="multipleview.jpg" v:shapes="_x0000_i1025"></SPAN>
-<BR>
-<BR>
-<A name="_Toc105513763"><SPAN
- style="mso-fareast-font-family:
-Arial;mso-bidi-font-family:Arial"><SPAN
- style="mso-list:Ignore"></SPAN></SPAN></A></H3>
-<H2 class="MsoNormal"><A name="changeColor">How to </A><SPAN
- style="mso-bookmark:_Toc105513763">change the color of a
-shape dynamically</SPAN><BR><FONT size="-1">[<A href="#top">back to top</A>]</FONT>
-</H2>
-<P class="MsoNormal">In the example <A href="#readOnlyViews0">#<SPAN
- class="GramE">Creating</SPAN> a read-only viewer of an existing diagram</A> it is necessary to create
-a new <SPAN class="SpellE">GraphicalViewer</SPAN> class (<SPAN
- class="SpellE">TraceDiagramGraphicalViewer</SPAN>) for the type
-information to distinguish <SPAN class="SpellE">EditParts</SPAN> hosted
-in a regular editor vs. a custom Viewer to allow for animation.<SPAN
- style="mso-spacerun:yes">  </SPAN>Changing the colors of individual <SPAN
- class="SpellE">EditParts</SPAN> can be achieved dynamically by
-installing an <SPAN class="SpellE">EditPolicy</SPAN> on the <SPAN
- class="SpellE">EditParts</SPAN> condition on them being owned by the
-new Viewer class above.<BR>
-<BR>
-The <SPAN class="SpellE">EditPolicy</SPAN> will then listen to the
-appropriate condition and change the color of the <SPAN class="SpellE">EditPart's</SPAN>
-figures accordingly.<SPAN style="mso-spacerun:yes">  </SPAN><BR>
-<BR>
-First we need to define an <SPAN class="SpellE">EditPolicyProvider</SPAN>
-that will install this new <SPAN class="SpellE">editpolicy</SPAN>.<SPAN
- style="mso-spacerun:yes">  </SPAN>The Extension code in the <SPAN
- class="SpellE">plugin.xml</SPAN> would look something like the
-following: <BR>
-</P>
-
-<DIV
- style="border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:48.0pt;margin-right:24.0pt">
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&lt;extension</SPAN><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New"'><o:p></o:p></SPAN><BR>
-&nbsp;&nbsp;<SPAN class="GramE"><SPAN
- style='font-size:8.0pt;font-family:
-"Courier New";color:navy;background:white;mso-highlight:white'>id</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>=</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'>&quot;<SPAN
- class="SpellE">TraceEditPolicyProvider</SPAN>&quot;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN><BR>
-<SPAN
- class="GramE"><SPAN
- style='font-size:8.0pt;font-family:
-"Courier New";color:navy;background:white;mso-highlight:white'>name</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>=</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'>&quot;<SPAN
- class="SpellE">TraceEditPolicyProvider</SPAN>&quot;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN><BR>
-<SPAN
- class="GramE"><SPAN
- style='font-size:8.0pt;font-family:
-"Courier New";color:navy;background:white;mso-highlight:white'>point</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>=</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'>&quot;<SPAN
- class="SpellE">org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders</SPAN>&quot;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN><BR>
-<SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;<SPAN
- class="SpellE">editpolicyProvider</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN><SPAN
- class="GramE"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'><BR>
-class</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>=</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'>&quot;&lt;package
-namespace&gt;.<SPAN class="SpellE">TraceDiagramEditPolicyProvider</SPAN>&quot;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'><o:p></o:p></SPAN><BR>
-<SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;Priority</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN><BR>
-<SPAN
- class="GramE"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>name</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>=</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'>&quot;Low&quot;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="text-indent:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;/Priority&gt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="text-indent:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;object</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- class="GramE"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>class</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>=</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'>&quot;<SPAN
- class="SpellE">org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart</SPAN>&quot;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- class="GramE"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>id</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>=</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:green;background:white;mso-highlight:white'>&quot;<SPAN
- class="SpellE">TraceEditPart</SPAN>&quot;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;method</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:black;background:white;
-mso-highlight:white'>
-</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>name=</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;<SPAN
- class="SpellE"><SPAN class="GramE">getViewer</SPAN></SPAN><SPAN
- class="GramE">(</SPAN>)&quot;</SPAN><SPAN
- style='font-size:8.0pt;font-family:
-"Courier New";color:navy;background:white;mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:black;background:white;
-mso-highlight:white'><SPAN
- style="mso-spacerun:yes">                 </SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&lt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'>value class<SPAN
- style="color:navy;background:white;mso-highlight:white">=</SPAN><SPAN
- style="color:green;background:white;mso-highlight:white">&quot;</SPAN><SPAN
- style="color:navy;background:white;mso-highlight:white">=</SPAN><SPAN
- style="color:green;background:white;mso-highlight:white">&quot;&lt;package
-namespace&gt;.<SPAN class="SpellE">TraceDiagramGraphicalViewer</SPAN>&quot;</SPAN><SPAN
- style="color:navy;background:white;mso-highlight:white">/&gt;</SPAN><SPAN
- style="color:black;background:blue;mso-highlight:blue"><o:p></o:p></SPAN></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;/method&gt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:black;background:white;
-mso-highlight:white'>
-</SPAN><SPAN style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;/object&gt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;context</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.5in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- class="SpellE"><SPAN class="GramE"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>editparts</SPAN></SPAN></SPAN><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:green;background:white;
-mso-highlight:white'>&quot;<SPAN
- class="SpellE">TraceEditPart</SPAN>&quot;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy;background:white;
-mso-highlight:white'>&gt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align:
-none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;/context&gt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="margin-left:.5in;mso-layout-grid-align:none;
-text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'>&lt;/<SPAN
- class="SpellE">editpolicyProvider</SPAN>&gt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";
-color:navy;background:white;mso-highlight:white'><SPAN
- style="mso-spacerun:yes"> </SPAN>&lt;/extension&gt;</SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:navy'><o:p></o:p></SPAN></P>
-</DIV>
-<DIV class="Section1"><FONT face="Courier New"><BR></FONT><FONT
- face="Times New Roman">Finally, the <SPAN class="SpellE">EditPolicy</SPAN>
-class itself can be defined.<SPAN style="mso-spacerun:yes">  </SPAN>In
-this particular example, we are adding a mouse listener <SPAN
- class="GramE">the allows</SPAN> us to trace mouse movement entering and
-exiting the host <SPAN class="SpellE">EditPart</SPAN>.<SPAN
- style="mso-spacerun:yes">  </SPAN>On entry, we color the figure to red
-and on exit set it back to the original color.</FONT><FONT
- face="Courier New"><BR>
-<BR>
-</FONT>
-
-<DIV
- style="border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:48.0pt;margin-right:24.0pt">
-<P class="MsoNormal"><SPAN class="GramE"><SPAN
- style='font-size:10.0pt;font-family:
-"Courier New"'>public</SPAN></SPAN><SPAN
- style='font-size:10.0pt;font-family:
-"Courier New"'> class <SPAN
- class="SpellE">TraceDiagramEditPolicy</SPAN> extends <SPAN
- class="SpellE">GraphicalEditPolicy</SPAN> {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN class="GramE">private</SPAN>
-class <SPAN class="SpellE">TraceMouseMotionListener</SPAN> extends <SPAN
- class="SpellE">MouseMotionListener.Stub</SPAN> {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="GramE">private</SPAN>
-Color <SPAN class="SpellE">color</SPAN>;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN>/**<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN
- style="mso-spacerun:yes"> </SPAN>* @see
-com.ibm.etools.draw2d.MouseMotionListener#<SPAN class="GramE">mouseEntered(</SPAN><SPAN
- class="SpellE">MouseEvent</SPAN>)<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN
- style="mso-spacerun:yes"> </SPAN>*/<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="GramE">public</SPAN>
-void <SPAN class="SpellE">mouseEntered</SPAN>(<SPAN class="SpellE">MouseEvent</SPAN>
-me) {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:3">                  </SPAN><SPAN class="GramE">color</SPAN>
-= <SPAN class="SpellE">getHostFigure</SPAN>().<SPAN class="SpellE">getForegroundColor</SPAN>();<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:3">                  </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">getHostFigure</SPAN></SPAN><SPAN class="GramE">(</SPAN>).<SPAN
- class="SpellE">setForegroundColor</SPAN>(new Color(null, new RGB(255,
-0, 0)));<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:3">                  </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">getHostFigure</SPAN></SPAN><SPAN class="GramE">(</SPAN>).invalidate();<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN>/**<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN
- style="mso-spacerun:yes"> </SPAN>* @see
-com.ibm.etools.draw2d.MouseMotionListener#<SPAN class="GramE">mouseExited(</SPAN><SPAN
- class="SpellE">MouseEvent</SPAN>)<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN
- style="mso-spacerun:yes"> </SPAN>*/<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="GramE">public</SPAN>
-void <SPAN class="SpellE">mouseExited</SPAN>(<SPAN class="SpellE">MouseEvent</SPAN>
-me) {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:3">                  </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">getHostFigure</SPAN></SPAN><SPAN class="GramE">(</SPAN>).<SPAN
- class="SpellE">setForegroundColor</SPAN>(color);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:3">                  </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">getHostFigure</SPAN></SPAN><SPAN class="GramE">(</SPAN>).invalidate();<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN>/** mouse motion listener for the
-owner shape and handles */<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN class="GramE">private</SPAN>
-<SPAN class="SpellE">TraceMouseMotionListener</SPAN> <SPAN
- class="SpellE">myMouseListener</SPAN> = new <SPAN class="SpellE">TraceMouseMotionListener</SPAN>();<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN>/**<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*
-<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*
-@see <SPAN class="SpellE">org.eclipse.gef.EditPolicy#<SPAN class="GramE">activate</SPAN></SPAN><SPAN
- class="GramE">()</SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*/<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN class="GramE">public</SPAN>
-void activate() {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">super.activate</SPAN></SPAN><SPAN class="GramE">(</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">getHostFigure</SPAN></SPAN><SPAN class="GramE">(</SPAN>).<SPAN
- class="SpellE">addMouseMotionListener</SPAN>(<SPAN class="SpellE">myMouseListener</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN>/**<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*
-<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*
-@see <SPAN class="SpellE">org.eclipse.gef.EditPolicy#<SPAN class="GramE">deactivate</SPAN></SPAN><SPAN
- class="GramE">()</SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*/<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN><SPAN class="GramE">public</SPAN>
-void deactivate() {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">getHostFigure</SPAN></SPAN><SPAN class="GramE">(</SPAN>).<SPAN
- class="SpellE">removeMouseMotionListener</SPAN>(<SPAN class="SpellE">myMouseListener</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:2">            </SPAN><SPAN class="SpellE"><SPAN
- class="GramE">super.deactivate</SPAN></SPAN><SPAN class="GramE">(</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">      </SPAN>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"><SPAN
- style='font-size:10.0pt;font-family:"Courier New"'>} <SPAN
- style="mso-spacerun:yes"></SPAN></SPAN></P></DIV>
-<FONT face="Courier New"><BR></FONT><H2><SPAN class="GramE"><SPAN class="GramE"><SPAN
- style="mso-bookmark:
-_Toc105513761"><A name="shapeResizable">How to make a shape resizable
-vs. non-resizable</A><BR></SPAN></SPAN></SPAN><FONT
- size="-1">[<A href="#top">back to top</A>]</FONT></H2>
-<H4><A name="_Toc1042732470">How do I make a shape resizable?</A></H4>
-Shapes
-subclassed from ShapeEditPart are resizable by default.<SPAN
- style="mso-spacerun:yes">  </SPAN>The resizable editpolicy is a special
-case in that it is installed via the LayoutEditPolicy on the diagram in
-the routine createChildEditPolicy.<SPAN style="mso-spacerun:yes">  </SPAN>The
-GMF diagram layer has <SPAN class="GramE">it's</SPAN> own LayoutEditPolicy called
-XYLayoutEditPolicy which calls inside createChildEditPolicy a public
-method of ShapeEditPart called getPrimaryDragEditPolicy.<SPAN
- style="mso-spacerun:yes">  </SPAN>The default implementation returns a
-ResizableShapeEditPolicy which supports the drag resize handles.<o:p></o:p>
-<BR>
-<BR>
-If
-the shape doesn't appear to be resizable, make sure that you're not
-overriding the getPrimaryDragEditPolicy method in your EditPart and / or
-set a breakpoint there to make sure it's returning the
-ResizableShapeEditPolicy.<o:p></o:p>
-<BR>
-<H4><A name="_Toc1042732480">How do I make a shape non-resizable?</A>
-<BR>
-<BR>
-<SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:
-Helv;color:black">Override the getPrimaryDragEditPolicy in your
-EditPart to return the NonResizableEditPolicyEx</SPAN></H4>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black">Example
-(in LEDEditPart):<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>/**<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*
-@see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart#<SPAN
- class="GramE">getPrimaryDragEditPolicy()</SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN style="mso-spacerun:yes"> </SPAN>*/<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="GramE">public</SPAN>
-EditPolicy getPrimaryDragEditPolicy() {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:2">              </SPAN><SPAN class="GramE">return</SPAN>
-new NonResizableEditPolicyEx();<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal"
- style="mso-layout-grid-align:none;text-autospace:none"><SPAN
- style='font-size:8.0pt;font-family:"Courier New";color:black'><SPAN
- style="mso-tab-count:1">       </SPAN>}<o:p></o:p></SPAN></P><H3 style="margin-left:0in;text-indent:0in;mso-list:none"><SPAN
- style="font-size:10.0pt;mso-bidi-font-family:Arial;
-font-style:normal"></SPAN></H3></DIV>
-
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
-</body>
+getDiagramPreferencesHint().getPreferenceStore();</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">preferenceStore.addPropertyChangeListener</span></span><span
+ class="GramE">(</span><span
+class="SpellE">preferenceListener</span>);</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">protected</span> void <span
+class="SpellE">addNotationalListeners</span>() {</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">super.addNotationalListeners</span></span><span
+class="GramE">(</span>);</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="SpellE"><span class="GramE"><span
+style="font-size:9.0pt;font-family:"
+courier="">initPreferenceStoreListener</span></span></span><span
+class="GramE"><span style="font-size:9.0pt;font-family:"
+courier="">(</span></span><span
+style="font-size:9.0pt;font-family:" courier="">);</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;mso-layout-grid-align:none; text-autospace:none">
+<span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family: Helv;color:black">
+3.<span style="mso-spacerun:yes">&nbsp;</span> Then you need to
+handle the property change event in a method.<span
+style="mso-spacerun:yes">&nbsp;</span> This requires retrieving the
+preference global value from the store and then making the
+appropriate changes to the figure to reflect the global
+value.</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+/**</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>* Refreshes this
+classifier node figure's gradient fill to reflect</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>* <span
+class="GramE">the</span> preference store value for gradient
+fill.</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>*/</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">protected</span> void <span
+class="SpellE">refreshGlobalPreferenceAttribute</span>()
+{</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>IPreferenceStore
+preferenceStore = (IPreferenceStore)
+getDiagramPreferencesHint().getPreferenceStore();</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+//refresh gradient</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span class="GramE">boolean</span></span>
+<span class="SpellE">myGlobalPreference</span> = true;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">myGlobalPreference</span></span> = <span
+class="SpellE">preferenceStore.getBoolean</span>( &lt;<span
+class="SpellE">MyPreferenceIdentifier</span>&gt;);<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+?</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+/* do figure synchronization */</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">getFigure</span></span><span
+class="GramE">(</span>).repaint();</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.25in;tab-stops:0in .25in .75in 1.25in 1.75in 2.25in 2.75in 3.25in; mso-layout-grid-align:none;text-autospace:none">
+<span style="font-size:9.0pt; font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p><br />
+</p>
+<h2><a id="overrideConnectionLook"
+name="overrideConnectionLook">How to override the look of a
+connection</a></h2>
+
+<p class="MsoNormal"><font size="-1">[<a href="#top">back to
+top</a>]</font></p>
+
+<p class="MsoNormal">To accomplish this you need to hook into the
+controller of the connection which is the <span
+class="SpellE">EditPart</span> which synchronizes the model and
+figure worlds.<span style="mso-spacerun:yes">&nbsp;</span> You need
+to create a new <span class="SpellE">EditPart</span> provider which
+is registered against the <span
+class="SpellE">EditPartService</span> that will override the
+existing <span class="SpellE">EditPart</span> provider to provide a
+new <span class="SpellE">EditPart</span> for the connection shape
+you're interested in.</p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;color:black">Similar to the View service
+extensions, the <span class="SpellE">EditPart</span> provider
+consists of 3 different components.<span
+style="mso-spacerun:yes">&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;color:black">1. The xml descriptor
+specification of the extension in the plug-<span
+class="SpellE">in.xml</span> file.</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;color:black">2. The provider class which is
+specified by the xml and provides the mapping of the type to your
+<span class="SpellE">EditPart</span> class</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;color:black">3. The actual <span
+class="SpellE">EditPart</span> class that will override the
+existing behavior.</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black">
+First the xml:</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:"
+courier="">&lt;/extension&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:"
+courier="">&lt;extension</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:10.0pt;font-family:"
+courier="">point</span></span><span
+style="font-size:10.0pt;font-family:" courier="">=</span><span
+style="font-size:10.0pt;font-family:" courier="">"<span
+class="SpellE">org.eclipse.gmf.runtime.diagram.ui.editpartProviders</span>"</span><span
+ style="font-size:10.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:" courier="">&lt;<span
+class="SpellE">editpartProvider</span></span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:10.0pt;font-family:"
+courier="">class</span></span><span
+style="font-size:10.0pt;font-family:" courier="">=</span><span
+style="font-size:10.0pt;font-family:" courier="">"com.&lt;<span
+class="SpellE">myPath</span>&gt;.<span
+class="SpellE">MyOverrideProvider</span>"</span><span
+style="font-size:10.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:"
+courier="">&lt;Priority</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:10.0pt;font-family:"
+courier="">name</span></span><span
+style="font-size:10.0pt;font-family:" courier="">=</span><span
+style="font-size:10.0pt;font-family:" courier="">"Low"</span><span
+style="font-size:10.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:"
+courier="">&lt;/Priority&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:"
+courier="">&lt;object</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:10.0pt;font-family:"
+courier="">class</span></span><span
+style="font-size:10.0pt;font-family:" courier="">=</span><span
+style="font-size:10.0pt;font-family:" courier="">"<span
+class="SpellE">org.eclipse.gmf.runtime.notation.Edge</span>"</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:10.0pt;font-family:"
+courier="">id</span></span><span
+style="font-size:10.0pt;font-family:" courier="">=</span><span
+style="font-size:10.0pt;font-family:" courier="">"<span
+class="SpellE">MyConnectionOverride</span>"</span><span
+style="font-size: 10.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size: 10.0pt;font-family:"
+courier="">&lt;method</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:10.0pt;font-family:"
+courier="">name</span></span><span
+style="font-size:10.0pt;font-family:" courier="">=</span><span
+style="font-size:10.0pt;font-family:" courier="">"<span
+class="SpellE">getElement</span>()"</span><span
+style="font-size:10.0pt; font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt;font-family:"
+courier="">&lt;value</span> <span
+style="font-size:10.0pt;font-family:" courier="">class=</span><span
+style="font-size:10.0pt;font-family:" courier="">"&lt;class path to
+semantic element&gt;"</span><span
+style="font-size:10.0pt; font-family:" courier="">/&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:"
+courier="">&lt;/method&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:"
+courier="">&lt;/object&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt;font-family:"
+courier="">&lt;context</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span class="GramE"><span style="font-size:10.0pt;font-family:"
+courier="">views</span></span><span
+style="font-size:10.0pt;font-family:" courier="">=</span><span
+style="font-size:10.0pt;font-family:" courier="">"<span
+class="SpellE">MyConnectionOverride</span>"</span><span
+style="font-size: 10.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:"
+courier="">&lt;/context&gt;</span><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:10.0pt; font-family:" courier="">&lt;/<span
+class="SpellE">editpartProvider</span>&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;</span></span> <span
+style="font-size:10.0pt; font-family:"
+courier="">&lt;/extension&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black">
+In this descriptor we are specifying the provider class that and a
+priority level that the provider will be at relative to other
+providers.<span style="mso-spacerun:yes">&nbsp;</span> In this
+case, we know that the existing provider for the relationship is at
+the "Lowest" priority, so we can provide ours at one level higher -
+i.e. "Low".<span style="mso-spacerun:yes">&nbsp;</span> The object
+tag lets us specify the view category we're supplying the <span
+class="SpellE">EditPart</span> for and the criteria under which our
+provider will be loaded.<span
+style="mso-spacerun:yes">&nbsp;</span> In this case, we chose a
+broad criteria and our provider will be loaded when the connection
+is of the semantic relationship we expect.<span
+style="mso-spacerun:yes">&nbsp;</span> In the actual java code of
+our provider class we can restrict the actual criteria to be based
+<span class="GramE">on a more strict criteria</span>, such as some
+aspect or property of the semantic relationship.<span
+style="mso-spacerun:yes">&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black">
+Next the provider class is fairly straightforward.<span
+style="mso-spacerun:yes">&nbsp;</span> It extends from the abstract
+class <span class="SpellE">AbstractEditPartProvider</span> and
+overrides the method for retrieving the connection <span
+class="SpellE">editpart</span>.<span
+style="mso-spacerun:yes">&nbsp;</span> In the following example,
+it's providing a custom <span class="SpellE">EditPart</span> when
+the shape has a particular keyword installed.<span
+style="mso-spacerun:yes">&nbsp;</span> More commonly, you would
+switch based on the semantic type which is set to the value you've
+defined in your <span
+class="SpellE">IElementType</span>.</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span class="GramE"><span
+style="font-size:10.0pt;font-family:Courier;mso-bidi-font-family:Courier; color:black">
+public</span></span><span
+style="font-size:10.0pt;font-family: Courier;mso-bidi-font-family:Courier;color:black">
+class <span class="SpellE">MyEditPartProvider</span> extends <span
+class="SpellE">AbstractEditPartProvider</span> {<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">protected</span> Class <span
+class="SpellE">getEdgeEditPartClass</span>(View <span
+class="SpellE">view</span>) {</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE">EObject</span> el = <span class="SpellE"><span
+class="GramE">view.getElement</span></span><span
+class="GramE">(</span>);</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">if</span> (el != null &amp;&amp; el <span
+class="SpellE">instanceof</span> &lt;<span
+class="SpellE">MySemanticElement</span> class&gt; ) {</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">if</span> (? &lt;some condition is <span
+class="SpellE">satisified</span>&gt; )</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">return</span> <span
+class="SpellE">MyCustomEditPart.class</span>;</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">return</span> null;</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+}</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black">
+Finally we can look at the <span class="SpellE">EditPart</span>
+class itself.<span style="mso-spacerun:yes">&nbsp;</span> In this
+case we are only interested in overriding the look of the
+connection.<span style="mso-spacerun:yes">&nbsp;</span>
+Consequently, we have to override the method that creates the
+figure in the connection edit part.<span
+style="mso-spacerun:yes">&nbsp;</span> This method is the <span
+class="SpellE"><span
+class="GramE">createConnectionFigure</span></span><span
+class="GramE">(</span>).<span
+style="mso-spacerun:yes">&nbsp;</span> Then we simply use the
+appropriate Draw2d API's to instantiate a different <span
+class="SpellE">polyline</span> figure with the look we
+desire:</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span class="GramE"><span
+style="font-size:10.0pt;font-family:Courier;mso-bidi-font-family:Courier; color:black">
+public</span></span><span
+style="font-size:10.0pt;font-family: Courier;mso-bidi-font-family:Courier;color:black">
+class <span class="SpellE">MyCustomEditPart</span> extends <span
+class="SpellE">OriginalEditPart</span> {</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+/**</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>* @<span
+class="SpellE">param</span> view</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>*/</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">public</span> <span
+class="SpellE">MyCustomEditPart</span> (View <span
+class="SpellE">view</span>) {</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">super(</span>view);</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+// TODO Auto-generated constructor stub</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">protected</span> Connection <span
+class="SpellE">createConnectionFigure</span>() {</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE">PolylineConnectionEx</span> <span
+class="SpellE">conn</span> = new <span class="SpellE"><span
+class="GramE">PolylineConnectionEx</span></span><span
+class="GramE">(</span>);</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">conn.setLineStyle</span></span><span
+class="GramE">(</span><span
+class="SpellE">Graphics.LINE_SOLID</span>);</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE">OpenArrowDecoration</span> <span
+class="SpellE">sourceDecorative</span> = new <span
+class="SpellE"><span
+class="GramE">OpenArrowDecoration</span></span><span
+class="GramE">(</span>);</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">sourceDecorative.setTemplate</span></span><span
+class="GramE">(</span><span
+class="SpellE">OpenArrowDecoration.TRIANGLE_TIP</span>);</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">sourceDecorative.setScale</span></span><span
+class="GramE">(</span><span
+class="SpellE">MapMode.DPtoLP</span>(10),<span
+class="SpellE">MapMode.DPtoLP</span>(5));</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">sourceDecorative.setLineStyle</span></span><span
+class="GramE">(</span><span
+class="SpellE">Graphics.LINE_SOLID</span>);</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">conn.setSourceDecoration</span></span><span
+class="GramE">(</span><span
+class="SpellE">sourceDecorative</span>);</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">return</span> <span
+class="SpellE">conn</span>;</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+<span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"
+style="tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in; mso-layout-grid-align:none;text-autospace:none">
+<span
+style="font-size:10.0pt; font-family:Courier;mso-bidi-font-family:Courier;color:black">
+}</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:Arial;color:black">Then when
+you create the relationship which fits the new <span
+class="SpellE">critera</span> of the xml and provider, then it will
+render using the new figure you created in the custom <span
+class="SpellE">EditPart</span>.</span></p>
+
+<p><br />
+</p>
+
+<h2><span class="GramE"><span
+style="mso-bookmark: _Toc105513761"><a id="readOnlyViews"
+name="readOnlyViews">How to open multiple read-only views on a
+diagram</a></span></span><br />
+<font size="-1">[<a href="#top">back to top</a>]</font></h2>
+
+<p class="MsoNormal">It is possible to view the same notation data
+in 2 different viewers.<span style="mso-spacerun:yes">&nbsp;</span>
+Since GEF / GMF implements the MFC design pattern, it is a simple
+matter to view the same data in different viewers.<span
+style="mso-spacerun:yes">&nbsp;</span> The "Model" (Notation) is
+the same in both viewers and synchronized with different "View"
+(Figure) data through unique controllers (<span
+class="SpellE">EditParts</span>) in each viewer.</p>
+
+<p><br />
+<span style="mso-bookmark:_Toc105513762">Creating a read-only
+viewer of an existing diagram</span></p>
+
+<p><br />
+If you wish to have a read-only view of the diagram, this is
+probably well suited to be displayed in an Eclipse View instead of
+a full-fledged editor.</p>
+
+<p class="MsoNormal">In your implementation of the <span
+class="SpellE">IViewPart</span> the <span
+class="SpellE">createPartControl</span> would create the Viewer to
+display the diagram.<span style="mso-spacerun:yes">&nbsp;</span>
+The <span class="SpellE">DiagramEditPart</span> is retrieved and
+explicitly set to disable the <span class="SpellE">EditMode</span>
+capability.<span style="mso-spacerun:yes">&nbsp;</span> It is a
+perquisite that a <span class="SpellE">DiagramView</span> object is
+?in-hand?.<span style="mso-spacerun:yes">&nbsp;</span> This could
+be retrieved by invoking an action from the Diagram element in the
+Model Explorer.</p>
+
+<p class="MsoNormal">// the assumption of this method is that the
+<span class="SpellE">DiagramView</span> has been pre-loaded</p>
+
+<p class="MsoNormal"><span class="GramE"><span
+style="font-size:8.0pt;font-family: "
+courier="">private</span></span> <span
+style="font-size:8.0pt;font-family: " courier=""><span
+class="SpellE">GraphicalViewer</span> viewer;</span></p>
+
+<p class="MsoNormal"><span class="GramE"><span
+style="font-size:8.0pt;font-family: "
+courier="">private</span></span> <span
+style="font-size:8.0pt;font-family: " courier=""><span
+class="SpellE">GraphicalViewer</span> viewer;</span></p>
+
+<p class="MsoNormal"><span class="GramE"><span
+style="font-size:8.0pt;font-family: "
+courier="">public</span></span> <span
+style="font-size:8.0pt;font-family: " courier="">class <span
+class="SpellE">TraceDiagramGraphicalViewer</span> extends <span
+class="SpellE">DiagramGraphicalViewer</span> {</span></p>
+
+<p class="MsoNormal" style="margin-left:.5in"><span
+style="font-size:8.0pt; font-family:" courier="">// no
+implementatio<span
+style="mso-bidi-font-weight: bold;mso-bidi-font-style:italic">n.<span
+ style="mso-spacerun:yes">&nbsp;</span> This class is extended
+from</span></span></p>
+
+<p class="MsoNormal" style="margin-left:.5in"><span
+style="font-size:8.0pt; font-family:" courier="">//</span> <span
+class="SpellE"><span style="font-size:8.0pt;font-family:"
+courier="">DiagramGraphicalViewer</span></span> <span
+style="font-size:8.0pt;font-family:" courier="">for type
+information only.</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier="">}</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"><span class="GramE"><span
+style="font-size:8.0pt;font-family: "
+courier="">public</span></span> <span
+style="font-size:8.0pt;font-family: " courier="">void <span
+class="SpellE">createPartControl</span>(Composite comp)
+{</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">viewer</span> = new <span
+class="SpellE">TraceDiagramGraphicalViewer</span>();</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">viewer.createControl</span></span><span
+class="GramE">(</span>comp);</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">viewer.getControl</span></span><span
+class="GramE">(</span>).<span
+class="SpellE">setBackground</span>(<span
+class="SpellE">ColorConstants.listBackground</span>);</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE">DiagramEditDomain</span> <span
+class="SpellE">editDomain</span> = new <span class="SpellE"><span
+class="GramE">DiagramEditDomain</span></span><span
+class="GramE">(</span>null);</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">editDomain.setCommandStack</span></span><span
+class="GramE">(</span>new <span
+class="SpellE">DiagramCommandStack</span>(<span
+class="SpellE">editDomain</span>));</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">viewer.setEditDomain</span></span><span
+class="GramE">(</span><span
+class="SpellE">editDomain</span>);</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">viewer.setRootEditPart</span></span><span
+class="GramE">(</span>new <span
+class="SpellE">DiagramRootEditPart</span>());</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">viewer.setEditPartFactory</span></span><span
+class="GramE">(</span><span
+class="SpellE">EditPartService.getInstance</span>());</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">viewer.setContents</span></span><span
+class="GramE">(<span
+class="SpellE">GeoDiagramEditor.diagView</span>));</span></span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">viewer.flush</span></span><span
+class="GramE">(</span>);</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<b style="mso-bidi-font-weight:normal">// now disable
+editing</b></span></p>
+
+<p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span
+style="font-size:8.0pt;font-family:" courier=""><span
+style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">Assert.isTrue</span></span><span
+class="GramE">(</span><span
+class="SpellE">viewer.getContents</span>() <span
+class="SpellE">instanceof</span> <span
+class="SpellE">DiagramEditPart</span>);</span></b></p>
+
+<p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span
+style="font-size:8.0pt;font-family:" courier=""><span
+style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
+ class="SpellE">DiagramEditPart</span> <span
+class="SpellE">diagEP</span> = (<span
+class="SpellE">DiagramEditPart</span>) <span class="SpellE"><span
+class="GramE">viewer.getContents</span></span><span
+class="GramE">(</span>);</span></b></p>
+
+<p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span
+style="font-size:8.0pt;font-family:" courier=""><span
+style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">diagEP.disableEditMode</span></span><span
+class="GramE">(</span>);</span></b><br />
+</p>
+
+<h3 class="MsoNormal"><br />
+ <a id="_Toc1055137640" name="_Toc1055137640">Screen snapshot of
+multiple views of diagram:</a><br />
+<span style="font-size:10.0pt;font-family:" courier=""><img
+border="0" width="570" height="499" src="multipleview.jpg" /></span><br />
+<br />
+<a id="_Toc105513763" name="_Toc105513763"></a></h3>
+
+<h2 class="MsoNormal"><a id="changeColor" name="changeColor">How
+to</a> <span style="mso-bookmark:_Toc105513763">change the color of
+a shape dynamically</span><br />
+<font size="-1">[<a href="#top">back to top</a>]</font></h2>
+
+<p class="MsoNormal">In the example <a
+href="#readOnlyViews0">#<span class="GramE">Creating</span> a
+read-only viewer of an existing diagram</a> it is necessary to
+create a new <span class="SpellE">GraphicalViewer</span> class
+(<span class="SpellE">TraceDiagramGraphicalViewer</span>) for the
+type information to distinguish <span
+class="SpellE">EditParts</span> hosted in a regular editor vs. a
+custom Viewer to allow for animation.<span
+style="mso-spacerun:yes">&nbsp;</span> Changing the colors of
+individual <span class="SpellE">EditParts</span> can be achieved
+dynamically by installing an <span class="SpellE">EditPolicy</span>
+on the <span class="SpellE">EditParts</span> condition on them
+being owned by the new Viewer class above.<br />
+<br />
+The <span class="SpellE">EditPolicy</span> will then listen to the
+appropriate condition and change the color of the <span
+class="SpellE">EditPart's</span> figures accordingly.<span
+style="mso-spacerun:yes">&nbsp;</span><br />
+<br />
+First we need to define an <span
+class="SpellE">EditPolicyProvider</span> that will install this new
+<span class="SpellE">editpolicy</span>.<span
+style="mso-spacerun:yes">&nbsp;</span> The Extension code in the
+<span class="SpellE">plugin.xml</span> would look something like
+the following:<br />
+</p>
+
+<div
+style="border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt; padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:48.0pt;margin-right:24.0pt">
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:8.0pt;font-family:"
+courier="">&lt;extension</span><br />
+&nbsp;&nbsp;<span class="GramE"><span
+style="font-size:8.0pt;font-family: "
+courier="">id</span></span><span
+style="font-size:8.0pt;font-family:" courier="">=</span><span
+style="font-size:8.0pt;font-family:" courier="">"<span
+class="SpellE">TraceEditPolicyProvider</span>"</span><br />
+<span class="GramE"><span style="font-size:8.0pt;font-family: "
+courier="">name</span></span><span
+style="font-size:8.0pt;font-family:" courier="">=</span><span
+style="font-size:8.0pt;font-family:" courier="">"<span
+class="SpellE">TraceEditPolicyProvider</span>"</span><br />
+<span class="GramE"><span style="font-size:8.0pt;font-family: "
+courier="">point</span></span><span
+style="font-size:8.0pt;font-family:" courier="">=</span><span
+style="font-size:8.0pt;font-family:" courier="">"<span
+class="SpellE">org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders</span>"</span><span
+ style="font-size:8.0pt;font-family:" courier="">&gt;</span><br />
+<span style="font-size:8.0pt;font-family:" courier="">&lt;<span
+class="SpellE">editpolicyProvider</span></span> <span
+class="GramE"><span style="font-size:8.0pt; font-family:"
+courier=""><br />
+class</span></span><span style="font-size:8.0pt;font-family:"
+courier="">=</span><span style="font-size:8.0pt;font-family:"
+courier="">"&lt;package namespace&gt;.<span
+class="SpellE">TraceDiagramEditPolicyProvider</span>"</span><span
+style="font-size:8.0pt;font-family:" courier="">&gt;</span><br />
+<span style="font-size:8.0pt;font-family:"
+courier="">&lt;Priority</span><br />
+<span class="GramE"><span style="font-size:8.0pt; font-family:"
+courier="">name</span></span><span
+style="font-size:8.0pt;font-family:" courier="">=</span><span
+style="font-size:8.0pt;font-family:" courier="">"Low"</span><span
+style="font-size:8.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="text-indent:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:8.0pt;font-family:"
+courier="">&lt;/Priority&gt;</span></p>
+
+<p class="MsoNormal"
+style="text-indent:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:8.0pt;font-family:"
+courier="">&lt;object</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span class="GramE"><span style="font-size:8.0pt; font-family:"
+courier="">class</span></span><span
+style="font-size:8.0pt;font-family:" courier="">=</span><span
+style="font-size:8.0pt;font-family:" courier="">"<span
+class="SpellE">org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart</span>"</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span class="GramE"><span style="font-size:8.0pt; font-family:"
+courier="">id</span></span><span
+style="font-size:8.0pt;font-family:" courier="">=</span><span
+style="font-size:8.0pt;font-family:" courier="">"<span
+class="SpellE">TraceEditPart</span>"</span><span
+style="font-size:8.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span style="font-size:8.0pt;font-family:"
+courier="">&lt;method</span><span
+style="font-size:8.0pt;font-family:" courier="">name=</span><span
+style="font-size:8.0pt;font-family:" courier="">"<span
+class="SpellE"><span class="GramE">getViewer</span></span><span
+class="GramE">(</span>)"</span><span
+style="font-size:8.0pt;font-family: " courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:8.0pt;font-family:" courier=""><span
+style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+<span style="font-size:8.0pt;font-family:"
+courier="">&lt;</span><span style="font-size:8.0pt;font-family:"
+courier="">value class<span
+style="color:navy;background:white;mso-highlight:white">=</span><span
+ style="color:green;background:white;mso-highlight:white">"</span><span
+ style="color:navy;background:white;mso-highlight:white">=</span><span
+ style="color:green;background:white;mso-highlight:white">"&lt;package
+namespace&gt;.<span
+class="SpellE">TraceDiagramGraphicalViewer</span>"</span><span
+style="color:navy;background:white;mso-highlight:white">/&gt;</span></span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span style="font-size:8.0pt;font-family:"
+courier="">&lt;/method&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span style="font-size:8.0pt;font-family:"
+courier="">&lt;/object&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span style="font-size:8.0pt;font-family:"
+courier="">&lt;context</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.5in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span class="SpellE"><span class="GramE"><span
+style="font-size:8.0pt;font-family:"
+courier="">editparts</span></span></span><span
+style="font-size:8.0pt; font-family:" courier="">=</span><span
+style="font-size:8.0pt;font-family:" courier="">"<span
+class="SpellE">TraceEditPart</span>"</span><span
+style="font-size:8.0pt;font-family:" courier="">&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:1.0in;text-indent:.5in;mso-layout-grid-align: none;text-autospace:none">
+<span style="font-size:8.0pt;font-family:"
+courier="">&lt;/context&gt;</span></p>
+
+<p class="MsoNormal"
+style="margin-left:.5in;mso-layout-grid-align:none; text-autospace:none">
+<span style="font-size:8.0pt;font-family:" courier="">&lt;/<span
+class="SpellE">editpolicyProvider</span>&gt;</span></p>
+
+<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"
+courier=""><span
+style="mso-spacerun:yes">&nbsp;</span>&lt;/extension&gt;</span></p>
+</div>
+
+<div class="Section1"><font face="Courier New"><br />
+</font><font face="Times New Roman">Finally, the <span
+class="SpellE">EditPolicy</span> class itself can be defined.<span
+style="mso-spacerun:yes">&nbsp;</span> In this particular example,
+we are adding a mouse listener <span class="GramE">the
+allows</span> us to trace mouse movement entering and exiting the
+host <span class="SpellE">EditPart</span>.<span
+style="mso-spacerun:yes">&nbsp;</span> On entry, we color the
+figure to red and on exit set it back to the original
+color.</font><font face="Courier New"><br />
+<br />
+</font>
+
+<div
+style="border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt; padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:48.0pt;margin-right:24.0pt">
+<p class="MsoNormal"><span class="GramE"><span
+style="font-size:10.0pt;font-family: "
+courier="">public</span></span> <span
+style="font-size:10.0pt;font-family: " courier="">class <span
+class="SpellE">TraceDiagramEditPolicy</span> extends <span
+class="SpellE">GraphicalEditPolicy</span> {</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
+class="GramE">private</span> class <span
+class="SpellE">TraceMouseMotionListener</span> extends <span
+class="SpellE">MouseMotionListener.Stub</span> {</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">private</span> Color <span
+class="SpellE">color</span>;</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+/**</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>* @see
+com.ibm.etools.draw2d.MouseMotionListener#<span
+class="GramE">mouseEntered(</span><span
+class="SpellE">MouseEvent</span>)</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>*/</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">public</span> void <span
+class="SpellE">mouseEntered</span>(<span
+class="SpellE">MouseEvent</span> me) {</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">color</span> = <span
+class="SpellE">getHostFigure</span>().<span
+class="SpellE">getForegroundColor</span>();</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">getHostFigure</span></span><span
+class="GramE">(</span>).<span
+class="SpellE">setForegroundColor</span>(new Color(null, new
+RGB(255, 0, 0)));</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">getHostFigure</span></span><span
+class="GramE">(</span>).invalidate();</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+/**</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>* @see
+com.ibm.etools.draw2d.MouseMotionListener#<span
+class="GramE">mouseExited(</span><span
+class="SpellE">MouseEvent</span>)</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>*/</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">public</span> void <span
+class="SpellE">mouseExited</span>(<span
+class="SpellE">MouseEvent</span> me) {</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">getHostFigure</span></span><span
+class="GramE">(</span>).<span
+class="SpellE">setForegroundColor</span>(color);</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">getHostFigure</span></span><span
+class="GramE">(</span>).invalidate();</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> /**
+mouse motion listener for the owner shape and handles */</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
+class="GramE">private</span> <span
+class="SpellE">TraceMouseMotionListener</span> <span
+class="SpellE">myMouseListener</span> = new <span
+class="SpellE">TraceMouseMotionListener</span>();</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+/**</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
+style="mso-spacerun:yes">&nbsp;</span>*</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
+style="mso-spacerun:yes">&nbsp;</span>* @see <span
+class="SpellE">org.eclipse.gef.EditPolicy#<span
+class="GramE">activate</span></span><span
+class="GramE">()</span></span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
+style="mso-spacerun:yes">&nbsp;</span>*/</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
+class="GramE">public</span> void activate() {</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">super.activate</span></span><span
+class="GramE">(</span>);</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">getHostFigure</span></span><span
+class="GramE">(</span>).<span
+class="SpellE">addMouseMotionListener</span>(<span
+class="SpellE">myMouseListener</span>);</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+/**</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
+style="mso-spacerun:yes">&nbsp;</span>*</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
+style="mso-spacerun:yes">&nbsp;</span>* @see <span
+class="SpellE">org.eclipse.gef.EditPolicy#<span
+class="GramE">deactivate</span></span><span
+class="GramE">()</span></span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
+style="mso-spacerun:yes">&nbsp;</span>*/</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
+class="GramE">public</span> void deactivate() {</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">getHostFigure</span></span><span
+class="GramE">(</span>).<span
+class="SpellE">removeMouseMotionListener</span>(<span
+class="SpellE">myMouseListener</span>);</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="SpellE"><span
+class="GramE">super.deactivate</span></span><span
+class="GramE">(</span>);</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+
+<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"
+courier="">}</span></p>
+</div>
+
+<font face="Courier New"><br />
+</font>
+
+<h2><span class="GramE"><span class="GramE"><span
+style="mso-bookmark: _Toc105513761"><a id="shapeResizable"
+name="shapeResizable">How to make a shape resizable vs.
+non-resizable</a><br />
+</span></span></span><font size="-1">[<a href="#top">back to
+top</a>]</font></h2>
+
+<h4><a id="_Toc1042732470" name="_Toc1042732470">How do I make a
+shape resizable?</a></h4>
+
+Shapes subclassed from ShapeEditPart are resizable by default.<span
+style="mso-spacerun:yes">&nbsp;</span> The resizable editpolicy is
+a special case in that it is installed via the LayoutEditPolicy on
+the diagram in the routine createChildEditPolicy.<span
+style="mso-spacerun:yes">&nbsp;</span> The GMF diagram layer has
+<span class="GramE">it's</span> own LayoutEditPolicy called
+XYLayoutEditPolicy which calls inside createChildEditPolicy a
+public method of ShapeEditPart called
+getPrimaryDragEditPolicy.<span
+style="mso-spacerun:yes">&nbsp;</span> The default implementation
+returns a ResizableShapeEditPolicy which supports the drag resize
+handles.<br />
+<br />
+If the shape doesn't appear to be resizable, make sure that you're
+not overriding the getPrimaryDragEditPolicy method in your EditPart
+and / or set a breakpoint there to make sure it's returning the
+ResizableShapeEditPolicy.<br />
+<h4><a id="_Toc1042732480" name="_Toc1042732480">How do I make a
+shape non-resizable?</a><br />
+<br />
+<span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family: Helv;color:black">
+Override the getPrimaryDragEditPolicy in your EditPart to return
+the NonResizableEditPolicyEx</span></h4>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:10.0pt;font-family:Helv;mso-bidi-font-family:Helv;color:black">
+Example (in LEDEditPart):</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:8.0pt;font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+/**</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:8.0pt;font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>* @see
+org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart#<span
+class="GramE">getPrimaryDragEditPolicy()</span></span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:8.0pt;font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span style="mso-spacerun:yes">&nbsp;</span>*/</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:8.0pt;font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">public</span> EditPolicy
+getPrimaryDragEditPolicy() {</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:8.0pt;font-family:" courier=""><span
+style="mso-tab-count:2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<span class="GramE">return</span> new
+NonResizableEditPolicyEx();</span></p>
+
+<p class="MsoNormal"
+style="mso-layout-grid-align:none;text-autospace:none"><span
+style="font-size:8.0pt;font-family:" courier=""><span
+style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+}</span></p>
+</div>
+
+<br />
+<br />
+<hr />
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright
+(c) 2000,2005 IBM Corporation and others. All Rights
+Reserved.</a></p>
+
+<hr />
+<br />
+<br />
+<br />
+<br />
+</body>
</html>
+
diff --git a/doc/org.eclipse.gmf.doc/howto/diagram/index.html b/doc/org.eclipse.gmf.doc/howto/diagram/index.html
index ad57d9b75..c08b6025a 100644
--- a/doc/org.eclipse.gmf.doc/howto/diagram/index.html
+++ b/doc/org.eclipse.gmf.doc/howto/diagram/index.html
@@ -1,25 +1,25 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML>
-<HEAD>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<META name="GENERATOR" content="IBM Software Development Platform">
-<META http-equiv="Content-Style-Type" content="text/css">
-<LINK href="../../book.css"
- rel="stylesheet" type="text/css">
-<TITLE>GMF Runtime How To Guide</TITLE>
-</HEAD>
-<BODY>
-<H1>GMF Runtime How To Guide</H1>
-<P>This guide presents How To's for the GMF Runtime.</P>
+<!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=ISO-8859-1" />
+<meta name="GENERATOR" content="IBM Software Development Platform" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<link href="../../book.css" rel="stylesheet" type="text/css" />
+<title>GMF Runtime How To Guide</title>
+</head>
+<body>
+<h1>GMF Runtime How To Guide</h1>
+<p>This guide presents How To's for the GMF Runtime.</p>
-<UL>
- <LI><a href="howto.html">GMF Diagram Layer How-To Guide</a>
-</UL>
+<ul>
+ <li><a href="howto.html">GMF Diagram Layer How-To Guide</a>
+</li>
<br/>
<br/>
<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">
+Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></p>
-</BODY>
-</HTML>
+<hr/>
+<br/>
+<br/></ul></body></html> \ No newline at end of file
diff --git a/doc/org.eclipse.gmf.doc/howto/index.html b/doc/org.eclipse.gmf.doc/howto/index.html
index 348daf047..7593309ac 100644
--- a/doc/org.eclipse.gmf.doc/howto/index.html
+++ b/doc/org.eclipse.gmf.doc/howto/index.html
@@ -1,16 +1,13 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml"
-xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/1999/xhtml">
<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 10">
-<meta name=Originator content="Microsoft Word 10">
-<link rel=File-List href="index_files/filelist.xml">
-<link rel=Edit-Time-Data href="index_files/editdata.mso">
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<meta name="ProgId" content="Word.Document" />
+<meta name="Generator" content="Microsoft Word 10" />
+<meta name="Originator" content="Microsoft Word 10" />
+<link rel="File-List" href="index_files/filelist.xml" />
+<link rel="Edit-Time-Data" href="index_files/editdata.mso" />
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
@@ -43,7 +40,7 @@ w\:* {behavior:url(#default#VML);}
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
-<link rel=Stylesheet type="text/css" media=all href=book.css>
+<link rel="Stylesheet" type="text/css" media="all" href="book.css" />
<style>
<!--
/* Font Definitions */
@@ -196,7 +193,7 @@ ul
color:windowtext;}
</style>
<![endif]-->
-<meta http-equiv=Content-Style-Type content="text/css">
+<meta http-equiv="Content-Style-Type" content="text/css" />
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
@@ -205,9 +202,9 @@ ul
</o:shapelayout></xml><![endif]-->
</head>
-<body bgcolor=white lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
+<body bgcolor="white" lang="EN-US" link="blue" vlink="blue" style="tab-interval:.5in">
-<div class=Section1>
+<div class="Section1">
<h1>GMF How-To Index</h1>
@@ -215,22 +212,21 @@ ul
<h3>How To</h3>
-<ul style='margin-top:0in' type=disc>
- <li class=MsoNormal style='color:black;mso-list:l0 level1 lfo1;tab-stops:list .5in'><span
- style='font-size:10.0pt;font-family:Arial'><a
- href="diagram/howto.html">GMF Diagram Layer How-To
+<ul style="margin-top:0in" type="disc">
+ <li class="MsoNormal" style="color:black;mso-list:l0 level1 lfo1;tab-stops:list .5in"><span style="font-size:10.0pt;font-family:Arial"><a href="diagram/howto.html">GMF Diagram Layer How-To
Guide</a><o:p></o:p></span></li>
</ul>
<br/>
<br/>
<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">
+Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></p>
-</div>
+<hr/>
-</body>
+<br/>
-</html>
+<br/>
+</div></body></html> \ No newline at end of file
diff --git a/doc/org.eclipse.gmf.doc/plugin.xml b/doc/org.eclipse.gmf.doc/plugin.xml
index 69793aac2..39d2137e6 100644
--- a/doc/org.eclipse.gmf.doc/plugin.xml
+++ b/doc/org.eclipse.gmf.doc/plugin.xml
@@ -6,5 +6,17 @@
<toc file="toc.xml" primary="true"/>
<toc file="toc-runtime-ext-pt.xml"/>
</extension>
+ <extension
+ point="org.eclipse.help.contentProducer">
+ <binding
+ producerId="org.eclipse.help.dynamic">
+ </binding>
+ </extension>
+ <extension
+ point="org.eclipse.help.base.luceneSearchParticipants">
+ <binding
+ participantId="org.eclipse.help.base.xhtml">
+ </binding>
+ </extension>
</plugin>
diff --git a/doc/org.eclipse.gmf.doc/prog-guide/index.html b/doc/org.eclipse.gmf.doc/prog-guide/index.html
index 44a4f1bfc..62b721b14 100644
--- a/doc/org.eclipse.gmf.doc/prog-guide/index.html
+++ b/doc/org.eclipse.gmf.doc/prog-guide/index.html
@@ -1,15 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML><HEAD><TITLE>GMF Programmer's Guide</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-<META content="MSHTML 6.00.2900.2873" name=GENERATOR>
-<META http-equiv=Content-Style-Type content=text/css><LINK href="./book.css"
-type=text/css rel=stylesheet></HEAD>
-<BODY>
-<H1>GMF Programmer's Guide</H1>
-<P>This guide presents the architecture of the Graphical Modeling Framework and
+<!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><title>GMF Programmer's Guide</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<meta content="MSHTML 6.00.2900.2873" name="GENERATOR" />
+<meta http-equiv="Content-Style-Type" content="text/css" /><link href="./book.css" type="text/css" rel="stylesheet" /></head>
+<body>
+<h1>GMF Programmer's Guide</h1>
+<p>This guide presents the architecture of the Graphical Modeling Framework and
provides the necessary information for its leverage in your specific
-product.</P><BR><BR>
-<HR>
+product.</p><br /><br />
+<hr />
-<P><A href="http://www.eclipse.org/legal/epl-v10.html">Copyright (c) 2000,2005
-IBM Corporation and others. All Rights Reserved.</A></P></BODY></HTML>
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright (c) 2000,2005
+IBM Corporation and others. All Rights Reserved.</a></p></body></html>
diff --git a/doc/org.eclipse.gmf.doc/prog-guide/runtime/Developer Guide to Global Actions.html b/doc/org.eclipse.gmf.doc/prog-guide/runtime/Developer Guide to Global Actions.html
index 7ddecccce..6f4c4ca1a 100644
--- a/doc/org.eclipse.gmf.doc/prog-guide/runtime/Developer Guide to Global Actions.html
+++ b/doc/org.eclipse.gmf.doc/prog-guide/runtime/Developer Guide to Global Actions.html
@@ -1,8 +1,4 @@
-<html xmlns:v="urn:schemas-microsoft-com:vml"
-xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
-xmlns="http://www.w3.org/TR/REC-html40">
+<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
diff --git a/doc/org.eclipse.gmf.doc/prog-guide/runtime/Developers Guide to the Extensible Type Registry/Developers Guide to the Extensible Type Registry.html b/doc/org.eclipse.gmf.doc/prog-guide/runtime/Developers Guide to the Extensible Type Registry/Developers Guide to the Extensible Type Registry.html
index 72ffb0ac9..476e405ed 100644
--- a/doc/org.eclipse.gmf.doc/prog-guide/runtime/Developers Guide to the Extensible Type Registry/Developers Guide to the Extensible Type Registry.html
+++ b/doc/org.eclipse.gmf.doc/prog-guide/runtime/Developers Guide to the Extensible Type Registry/Developers Guide to the Extensible Type Registry.html
@@ -1,9 +1,9 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML>
-<HEAD>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<TITLE>Developer's Guide to the Extensible Type Registry</TITLE>
-<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
+<!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=ISO-8859-1" />
+<title>Developer's Guide to the Extensible Type Registry</title>
+<script language="JavaScript" type="text/javascript">
<!--
if (navigator.userAgent.toLowerCase().indexOf('microsoft') >= 0) {
document.write('<LINK rel="stylesheet" href="./styles/technote-ie.css" type="text/css">')
@@ -11,7 +11,7 @@ if (navigator.userAgent.toLowerCase().indexOf('microsoft') >= 0) {
document.write('<LINK rel="stylesheet" href="./styles/technote.css" type="text/css">')
}
// -->
-</SCRIPT>
+</script>
<style type="text/css" media="screen">
<!-- @import url("./styles/menuExpandable.css"); -->
</style>
@@ -54,26 +54,24 @@ if (navigator.userAgent.toLowerCase().indexOf('microsoft') >= 0) {
}
//-->
</script>
-</HEAD>
-
-<BODY>
-<A name="top"></A><IMG border="0" src="./icons/gmf_header.gif" width="347" height="134">
-<H1 align="center">Developer's Guide to the Extensible Type Registry</H1>
-
-<H2>Contents</H2>
-Items marked with <img src="./icons/plus.gif"/> expand when selected.
-<UL>
- <LI class="menuitem"><A href="#intro">Introduction</A></LI>
- <LI class="menuitem"><A href="#ext_points">Extension Points and API</A></LI>
- <LI class="menuitem"><A href="#concepts">Concepts</A></LI>
- <LI class="menuitem"><A href="#use">Use of the Extensible Type Registry in GMF</A></LI>
+</head>
+
+<body>
+<a name="top"></a><img border="0" src="./icons/gmf_header.gif" width="347" height="134" />
+<h1 align="center">Developer's Guide to the Extensible Type Registry</h1>
+
+<h2>Contents</h2>
+Items marked with <img src="./icons/plus.gif" /> expand when selected.
+<ul>
+ <li class="menuitem"><a href="#intro">Introduction</a></li>
+ <li class="menuitem"><a href="#ext_points">Extension Points and API</a></li>
+ <li class="menuitem"><a href="#concepts">Concepts</a></li>
+ <li class="menuitem"><a href="#use">Use of the Extensible Type Registry in GMF</a></li>
<li class="menubar">
- <a href="#" id="examplesActuator"
- class="actuator">Examples</a>
+ <a href="#" id="examplesActuator" class="actuator">Examples</a>
<ul id="examplesMenu" class="menu">
<li><a href="#examples">Overview</a></li>
- <li><a href="#" id="ex_txActuator"
- class="actuator">Code Examples</a>
+ <li><a href="#" id="ex_txActuator" class="actuator">Code Examples</a>
<ul id="ex_txMenu" class="submenu">
<li><a href="#ex_define">Defining an Element Type</a></li>
<li><a href="#ex_bind">Binding Advice to an Existing Element Type</a></li>
@@ -84,34 +82,33 @@ Items marked with <img src="./icons/plus.gif"/> expand when selected.
<li><a href="#ex_registry">Using the Element Type Registry</a></li>
</ul></li>
</ul></li>
- <LI class="menuitem"><A href="#models">Design/Code/Interaction Models</A></LI>
-</UL>
-<HR>
-<H2><A name="intro"></A>Introduction</H2>
-<P class="backto"><FONT size="2">[<A href="#top">back to top</A>]</FONT></P>
-<P>The Eclipse GMF project uses EMF to build its structured data model. EMF defines a framework that allows users to create, modify and destroy model elements in an application. However, the metaclasses defined in an EMF Ecore metamodel are not always sufficient to build a full-featured graphical modeling application. As well, a third party may wish to extend the metamodel and provide specialized model elements in their application. </P>
-<P>The Extensible Type Registry provides a way for GMF clients to define an
+ <li class="menuitem"><a href="#models">Design/Code/Interaction Models</a></li>
+</ul>
+<hr />
+<h2><a name="intro"></a>Introduction</h2>
+<p class="backto"><font size="2">[<a href="#top">back to top</a>]</font></p>
+<p>The Eclipse GMF project uses EMF to build its structured data model. EMF defines a framework that allows users to create, modify and destroy model elements in an application. However, the metaclasses defined in an EMF Ecore metamodel are not always sufficient to build a full-featured graphical modeling application. As well, a third party may wish to extend the metamodel and provide specialized model elements in their application. </p>
+<p>The Extensible Type Registry provides a way for GMF clients to define an
application-specific classification system based on, but alternative to,
-the metaclasses defined by an Ecore metamodel. It allows GMF clients to describe the domain elements in their application by:</P>
-<UL>
- <LI>contributing icons and display names for EMF metamodel types and
- specializations</LI>
- <LI>defining reusable default editing behaviour for EMF metamodel types</LI>
- <LI>defining additional behaviour for specializations </LI>
- <LI>extending the default editing behaviour for metamodel types
- and specializations defined by other plugins</LI>
-</UL>
-<P>For example, consider a metamodel for the digital logic domain. It contains the basic building blocks for digital logic circuits, such as metaclasses for circuit, AND gate, OR gate and XOR gate. An editor for digital logic diagrams will provide creation tools for these fundamental elements. It should also provide creation tools for some commonly used 'canned' circuits, such as those for a Half Adder or a Full Adder. The Half Adder and the Full Adder are Circuits that contain a specific arrangement of AND, OR and XOR gates. As such, the Half Adder and the Full Adder are element types that add deeper meaning to the Circuit EClass with a specific arrangement of child gates. The editor will need to prevent the deletion of the individual AND, OR and XOR gates contained in a Half Adder or a Full Adder, because deleting them would change the function of the circuit. The Half and Full Adder types and their edit behaviour are defined in the extensible element type registry.</P>
-<P>Element types can also be used by visual editing tools to set the values of existing elements in a model.</P>
-<P>For example, consider the metamodel for the library domain. It contains, among other things, Writers that have a feature referencing the Books they have written. An editor for library diagrams may provide a drawing tool to connect a Writer to a Book, which means that the Writer is the author of that Book. This drawing tool creates the 'Writes' relationship between a Writer and a Book by adding the Book to the books feature of the Writer. This 'Writes' relationship can be expressed as an element type.</P>
-<P>This document describes the concepts behind the Extensible Type Registy and outlines how it is used in other parts of GMF. It includes code examples illustrating how to implement some of the key concepts as well as an overview of the registry design.</P><HR>
-<H2><A name="ext_points"></A>Extension Points and API</H2>
-<P class="backto"><FONT size="2">[<A href="#top">back to top</A>]</FONT></P>
+the metaclasses defined by an Ecore metamodel. It allows GMF clients to describe the domain elements in their application by:</p>
+<ul>
+ <li>contributing icons and display names for EMF metamodel types and
+ specializations</li>
+ <li>defining reusable default editing behaviour for EMF metamodel types</li>
+ <li>defining additional behaviour for specializations </li>
+ <li>extending the default editing behaviour for metamodel types
+ and specializations defined by other plugins</li>
+</ul>
+<p>For example, consider a metamodel for the digital logic domain. It contains the basic building blocks for digital logic circuits, such as metaclasses for circuit, AND gate, OR gate and XOR gate. An editor for digital logic diagrams will provide creation tools for these fundamental elements. It should also provide creation tools for some commonly used 'canned' circuits, such as those for a Half Adder or a Full Adder. The Half Adder and the Full Adder are Circuits that contain a specific arrangement of AND, OR and XOR gates. As such, the Half Adder and the Full Adder are element types that add deeper meaning to the Circuit EClass with a specific arrangement of child gates. The editor will need to prevent the deletion of the individual AND, OR and XOR gates contained in a Half Adder or a Full Adder, because deleting them would change the function of the circuit. The Half and Full Adder types and their edit behaviour are defined in the extensible element type registry.</p>
+<p>Element types can also be used by visual editing tools to set the values of existing elements in a model.</p>
+<p>For example, consider the metamodel for the library domain. It contains, among other things, Writers that have a feature referencing the Books they have written. An editor for library diagrams may provide a drawing tool to connect a Writer to a Book, which means that the Writer is the author of that Book. This drawing tool creates the 'Writes' relationship between a Writer and a Book by adding the Book to the books feature of the Writer. This 'Writes' relationship can be expressed as an element type.</p>
+<p>This document describes the concepts behind the Extensible Type Registy and outlines how it is used in other parts of GMF. It includes code examples illustrating how to implement some of the key concepts as well as an overview of the registry design.</p><hr />
+<h2><a name="ext_points"></a>Extension Points and API</h2>
+<p class="backto"><font size="2">[<a href="#top">back to top</a>]</font></p>
The extensible type registry defines the following extension points:
<ul>
<li><a href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypes.html">org.eclipse.gmf.runtime.emf.type.core.elementTypes</a></li>
- <li><a
- href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypeBindings.html">org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings</a></li>
+ <li><a href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypeBindings.html">org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings</a></li>
</ul>
The extensible type registry API is defined in the following packages:
<ul>
@@ -122,94 +119,91 @@ The extensible type registry API is defined in the following packages:
<li><a href="../../../reference/api/common/org/eclipse/gmf/runtime/emf/type/ui/package-summary.html">org.eclipse.gmf.runtime.emf.type.ui</a></li>
</ul>
-<H2><A name="concepts"></A>Concepts</H2>
-<P class="backto"><FONT size="2">[<A href="#top">back to top</A>]</FONT></P>
-<H3>Element Types</H3>
-<P></P>
-<P></P>
-<P>The domain-specific concepts that can be displayed, created, modified and
+<h2><a name="concepts"></a>Concepts</h2>
+<p class="backto"><font size="2">[<a href="#top">back to top</a>]</font></p>
+<h3>Element Types</h3>
+<p></p>
+<p></p>
+<p>The domain-specific concepts that can be displayed, created, modified and
destroyed as logical elements in a GMF application are described using
element types. Each element type defines how model objects that match
its type are to be displayed (by icon and display name), as well as how
they are to be created, modified and deleted (by an edit helper and edit
-helper advice).</P>
-<P>There are two kinds of element types: <I>metamodel</I>
-types and <I>specialization</I> types.</P>
-<P>A <I>metamodel</I> type corresponds directly with an EClass in the
+helper advice).</p>
+<p>There are two kinds of element types: <i>metamodel</i>
+types and <i>specialization</i> types.</p>
+<p>A <i>metamodel</i> type corresponds directly with an EClass in the
domain's EMF model, with no futher qualifications. It is not permitted
-to define more than <I></I>one metamodel type for <I></I>a single
+to define more than <i></i>one metamodel type for <i></i>a single
EClass in a given client context. All model objects with the same EClass and client context have the same metamodel
type. The metamodel type defines the editing behaviour for these
-matching model objects in its <I>edit helper</I>. By defining a metamodel type for an EClass, the application-specific editing behaviour for that type of element can be defined, and third parties can extend the editing behaviour. An icon and display name other than those defined in the Ecore model can also be associated with this type of element.</P>
-<P><I>Specialization</I> types can extend a single metamodel type or any
+matching model objects in its <i>edit helper</i>. By defining a metamodel type for an EClass, the application-specific editing behaviour for that type of element can be defined, and third parties can extend the editing behaviour. An icon and display name other than those defined in the Ecore model can also be associated with this type of element.</p>
+<p><i>Specialization</i> types can extend a single metamodel type or any
number of other specialization types. The purpose of a specialization type is to define bind points for advice, icons and display names for new classifications of model objects. It is not permitted to define a
specialization type that specializes (directly or indirectly) more than
a single metamodel type. All model objects matching the characteristics
described by the specialization type as well as those described by the type
it specializes will share the same specialization type. A specialization
type can extend the editing behaviour of the element type that it
-specializes by its <I>edit helper advice</I>.</P><H3>Element Type Registry</H3>
-<P>A registry of element types is maintained in GMF and it provides the
-ability to find:</P>
-<UL>
- <LI>element types by their unique identifiers</LI>
- <LI>the element types that match an existing model object or its EClass</LI>
- <LI>the edit helper advice that applies to an element type or an
- existing model object</LI>
- <LI>the element types that describe model objects which can be
- contained in a given feature of a given container object</LI>
-</UL>
-<P>Static declarations of element types in the <A href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypes.html"><CODE>elementTypes</CODE></A>
+specializes by its <i>edit helper advice</i>.</p><h3>Element Type Registry</h3>
+<p>A registry of element types is maintained in GMF and it provides the
+ability to find:</p>
+<ul>
+ <li>element types by their unique identifiers</li>
+ <li>the element types that match an existing model object or its EClass</li>
+ <li>the edit helper advice that applies to an element type or an
+ existing model object</li>
+ <li>the element types that describe model objects which can be
+ contained in a given feature of a given container object</li>
+</ul>
+<p>Static declarations of element types in the <a href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypes.html"><code>elementTypes</code></a>
extension point are added automatically to this registry the first time
the registry is used. Element types can also be registered dynamically,
and interested parties can listen for notification of dynamic changes to
-the registry.<SPAN
- style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
-Symbol"><SPAN
- style="mso-list:Ignore"><SPAN style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN></SPAN></P>
-<P>Only one metamodel type matches a model object, but many specialization types can match the same object. Edit helper advice bound to all matching element types will be considered when editing the model object.</P>
-<H3>Element Type Factory</H3>
-<P>Default implementations of metamodel and specialization types are
-used to instantiate types registered through the <A href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypes.html"><CODE>elementTypes</CODE></A>
+the registry. </p>
+<p>Only one metamodel type matches a model object, but many specialization types can match the same object. Edit helper advice bound to all matching element types will be considered when editing the model object.</p>
+<h3>Element Type Factory</h3>
+<p>Default implementations of metamodel and specialization types are
+used to instantiate types registered through the <a href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypes.html"><code>elementTypes</code></a>
extension point. If a custom element type implementation is required
(e.g., if there are additional properties associated with an element
type, or there is a need to replace the default editing behaviour), an
element type factory can be declared to instantiate specific element
types . The factory is identified by its 'kind', and element types that want to be created by this factory
-must specify its factory kind in their extension. Alternatively, custom element type implementations can be instantiated by a client and registered dynamically with the element type registry.</P>
-<H3>Edit Helpers</H3>
-<P>Editing behaviour for a metamodel type is defined in its <I>edit
-helper</I>. The edit helper is a factory for edit commands. These
+must specify its factory kind in their extension. Alternatively, custom element type implementations can be instantiated by a client and registered dynamically with the element type registry.</p>
+<h3>Edit Helpers</h3>
+<p>Editing behaviour for a metamodel type is defined in its <i>edit
+helper</i>. The edit helper is a factory for edit commands. These
commands are instantiated in response to requests to edit a model object
whose EClass matches the metamodel type. By default, the edit commands
returned by an edit helper are decorated with commands from advice that
-matches the model object being edited.</P>
-<H3>Edit Helper Advice</H3>
-<P class="MsoBodyText">Editing behaviour for a specialization type is
-defined in its <I>edit helper advice</I>. The specialized behaviour
+matches the model object being edited.</p>
+<h3>Edit Helper Advice</h3>
+<p class="MsoBodyText">Editing behaviour for a specialization type is
+defined in its <i>edit helper advice</i>. The specialized behaviour
decorates the default behaviour provided by the edit helper of the
metamodel type that it specializes. When an edit is performed on a model
object, advice from all of the specializations that match that object is
contributed to the command. Advice can be contributed before or after
the default behaviour. Note that there is no guarantee in which order
advice commands will be applied relative to each other, except to say
-that all 'before' advice occurs before the basic edit and all 'after' advice occurs after the basic edit.</P><P class="MsoBodyText">Edit helper advice returns a null command when there is no advice to contribute. It returns an unexecutable command when it wishes to disable the editing gesture.</P>
-<P class="MsoBodyText">Edit helper advice belonging to a specialization
-type will also apply to all further specializations of that type. </P>
-<H3>Advice Bindings</H3>
-<P>Edit helper advice can be bound to any existing metamodel type or
+that all 'before' advice occurs before the basic edit and all 'after' advice occurs after the basic edit.</p><p class="MsoBodyText">Edit helper advice returns a null command when there is no advice to contribute. It returns an unexecutable command when it wishes to disable the editing gesture.</p>
+<p class="MsoBodyText">Edit helper advice belonging to a specialization
+type will also apply to all further specializations of that type. </p>
+<h3>Advice Bindings</h3>
+<p>Edit helper advice can be bound to any existing metamodel type or
specialization type to extend the editing behaviour for model objects of
-its kind.</P>
-<P>The scope of an advice binding is an optional attribute specified in the binding XML (the attribute name is 'inheritance'). It can be one of the following:</P>
-<UL>
- <LI>The advice will apply to the target element type, and to all
+its kind.</p>
+<p>The scope of an advice binding is an optional attribute specified in the binding XML (the attribute name is 'inheritance'). It can be one of the following:</p>
+<ul>
+ <li>The advice will apply to the target element type, and to all
metamodel types whose EClasses are subtypes of the target type, and to
- all specializations of those metamodel types. For example, </LI>
- <LI>The advice will apply only to the target element type and its
+ all specializations of those metamodel types. For example, </li>
+ <li>The advice will apply only to the target element type and its
specializations. It is not applied to related metamodel types or their
specializations.
- </LI>
-</UL>
+ </li>
+</ul>
<h3>Client Context</h3>
<p>A client can define its own context and bind it to the element types and advice that it contributes to the element type registry. In this way, the contents of the element type registry are partitioned by client context and two or more clients that work with the same metamodel can be co-deployed without interfering with each other's editing behaviour. </p>
<p>The use of client contexts in the element type API is optional. A default client context is implicitly bound to any types and advice that are not explicity bound to a client context.</p>
@@ -220,15 +214,15 @@ is found to belong to more that one client context, only the element
types and advice that are bound to <b>all</b> client contexts will be applied
when editing that object. This means that when two clients are co-deployed that edit
objects from the same metamodel, their element types must be integrated in such a way that the editing behaviour from one context
-does not conflict with the editing behaviour from the other.</p><H3>Edit Requests</H3>
-<P>An edit request carries the information required to obtain an edit
-command from an edit helper.</P>
-<P>The edit request carries a collection of parameters which are used to
+does not conflict with the editing behaviour from the other.</p><h3>Edit Requests</h3>
+<p>An edit request carries the information required to obtain an edit
+command from an edit helper.</p>
+<p>The edit request carries a collection of parameters which are used to
communicate arbitrary data to the edit helpers and advice. It is
recommended that any client contributing element types to the extensible
type registry publish a list of the edit request parameters that are
-understood by its edit helpers and advice.</P>
-<P>Each edit request has an edit helper context which is used to
+understood by its edit helpers and advice.</p>
+<p>Each edit request has an edit helper context which is used to
identify the model element being edited by the request, from which is
derived the edit helper and advice to honour the edit request. For
element creation, the model object being edited is the one that will
@@ -238,8 +232,8 @@ of the create request will in turn ask the type that is being created
for the edit helper context. Edit helpers and advice bound to the type
being created can change the default container by finding or creating a
different container for the new element in response to the request for
-the edit helper context.</P>
-<P>The edit request for element creation may have specified the feature
+the edit helper context.</p>
+<p>The edit request for element creation may have specified the feature
that should contain the new element. It is recommended that edit helpers
be equipped to use a default containment feature, if possible, in the
event that one is not specified in the request. This is recommended for
@@ -247,39 +241,38 @@ the convenience of clients that do not wish to be aware of the feature
that should contain a certain kind of element. A specialization type
that declares that model objects of its kind must be contained in a
specific feature will be created in that feature by default if the
-request does not specify a feature.</P>
-<H2><A name="use"></A>Use of the Extensible Type Registry in GMF</H2>
-<P class="backto"><FONT size="2">[<A href="#top">back to top</A>]</FONT></P>
-<H3>Diagram Assistant and Palette Creation Tools</H3>
-<P>Items in the diagram popup bar and connection handles are associated with the element type that will be created when the item is selected. Creation tools on the diagram palette are likewise associated with the element type that will be created when the tool is selected and applied to the diagram.</P>
-<H3>Semantic Edit Policy</H3>
-<P>The default semantic edit policy installed on edit parts on a diagram uses the extensible type registry to obtain the command to honour the semantic edit request. It does a lookup in the registry for the type
+request does not specify a feature.</p>
+<h2><a name="use"></a>Use of the Extensible Type Registry in GMF</h2>
+<p class="backto"><font size="2">[<a href="#top">back to top</a>]</font></p>
+<h3>Diagram Assistant and Palette Creation Tools</h3>
+<p>Items in the diagram popup bar and connection handles are associated with the element type that will be created when the item is selected. Creation tools on the diagram palette are likewise associated with the element type that will be created when the tool is selected and applied to the diagram.</p>
+<h3>Semantic Edit Policy</h3>
+<p>The default semantic edit policy installed on edit parts on a diagram uses the extensible type registry to obtain the command to honour the semantic edit request. It does a lookup in the registry for the type
matching the edit context of the request, and obtains the edit command from that type. If the edit command is null or
-non-executable, the editing gesture cannot be performed.</P>
-<H3>Icon Service</H3>
-<P>A lowest-priority icon provider is registered with the Icon Service that returns the icon for an element type by resolving its icon URL. </P>
-<P>The same icon provider will also provide the icon for an existing model object by finding the icon for its matching element type from the registry. In cases where many
+non-executable, the editing gesture cannot be performed.</p>
+<h3>Icon Service</h3>
+<p>A lowest-priority icon provider is registered with the Icon Service that returns the icon for an element type by resolving its icon URL. </p>
+<p>The same icon provider will also provide the icon for an existing model object by finding the icon for its matching element type from the registry. In cases where many
specialized types apply to the model object, the provider will return the
-icon defined by the first specialization it encounters<SPAN
- style="mso-spacerun:yes">&nbsp; </SPAN>(searching breadth-first from
-most specialized to least specialized).</P><H3>View Service</H3>
-<P class="MsoBodyText">Element types can be used as the semantic adapter in a request to the View Service. In this capacity, the element type communicates the kind of model object for which a view is requested.</P>
-<P class="MsoBodyText">The element type semantic adapter is used by the view service in one of two ways:</P>
-<OL>
- <LI>the EClass associated with the element type is used to identify the view</LI>
- <LI>the element type is a kind of IHintedType, and its semantic hint is used to identify the view</LI>
-</OL><H3>Modeling Assistant Service</H3>
-<P>The modeling assistant service returns element types to describe the kinds of elements and relationships that can be created in a given modeling gesture. For example, if a connection handle is used to create a relationship between two model objects, a popup menu will appear listing the kinds of relationships that can be created between the two objects. This list is populated with element types that describe the relationships.</P>
-<H2><A name="examples"></A>Examples</H2>
-<P class="backto"><FONT size="2">[<A href="#top">back to top</A>]</FONT></P>
-<P>This section illustrates the usage of the Extensible Type Registry using code examples.
-Many of these examples are taken from the GMF logic and library examples.</P>
-<H3><A name="ex_define"></A>Defining an Element Type</H3>
-<P>Element types are declared on the <A href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypes.html"><CODE>elementTypes</CODE></A>
-extension point.</P>
-<P>When the type describes a metaclass in the domain model with no
-further matching conditions, a <I>metamodel</I> type can be defined:</P>
-<PRE class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
+icon defined by the first specialization it encounters (searching breadth-first from
+most specialized to least specialized).</p><h3>View Service</h3>
+<p class="MsoBodyText">Element types can be used as the semantic adapter in a request to the View Service. In this capacity, the element type communicates the kind of model object for which a view is requested.</p>
+<p class="MsoBodyText">The element type semantic adapter is used by the view service in one of two ways:</p>
+<ol>
+ <li>the EClass associated with the element type is used to identify the view</li>
+ <li>the element type is a kind of IHintedType, and its semantic hint is used to identify the view</li>
+</ol><h3>Modeling Assistant Service</h3>
+<p>The modeling assistant service returns element types to describe the kinds of elements and relationships that can be created in a given modeling gesture. For example, if a connection handle is used to create a relationship between two model objects, a popup menu will appear listing the kinds of relationships that can be created between the two objects. This list is populated with element types that describe the relationships.</p>
+<h2><a name="examples"></a>Examples</h2>
+<p class="backto"><font size="2">[<a href="#top">back to top</a>]</font></p>
+<p>This section illustrates the usage of the Extensible Type Registry using code examples.
+Many of these examples are taken from the GMF logic and library examples.</p>
+<h3><a name="ex_define"></a>Defining an Element Type</h3>
+<p>Element types are declared on the <a href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypes.html"><code>elementTypes</code></a>
+extension point.</p>
+<p>When the type describes a metaclass in the domain model with no
+further matching conditions, a <i>metamodel</i> type can be defined:</p>
+<pre class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
&lt;metamodel
nsURI=&quot;http://www.eclipse.org/gmf/examples/runtime/1.0.0/logicsemantic&quot;&gt;
&lt;metamodelType
@@ -290,11 +283,11 @@ further matching conditions, a <I>metamodel</I> type can be defined:</P>
edithelper=&quot;org.eclipse.gmf.examples.logic.CircuitEditHelper&quot;&gt;
&lt;/metamodelType&gt;
&lt;/metamodel&gt;
-&lt;/extension&gt;</PRE>
-<P>When the type describes a specialization of a metaclass in the domain
-model to which further characteristics have been ascribed, a <I>specialization</I>
-type can be defined with an Eclipse enablement expression (<CODE>org.eclipse.core.expressions</CODE>) that captures those further characteristics:</P>
-<PRE class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
+&lt;/extension&gt;</pre>
+<p>When the type describes a specialization of a metaclass in the domain
+model to which further characteristics have been ascribed, a <i>specialization</i>
+type can be defined with an Eclipse enablement expression (<code>org.eclipse.core.expressions</code>) that captures those further characteristics:</p>
+<pre class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
&lt;metamodel
nsURI=&quot;http://www.eclipse.org/gmf/examples/runtime/1.0.0/logicsemantic&quot;&gt;
&lt;specializationType
@@ -310,10 +303,10 @@ type can be defined with an Eclipse enablement expression (<CODE>org.eclipse.cor
&lt;/enablement&gt;
&lt;/specializationType&gt;
&lt;/metamodel&gt;
-&lt;/extension&gt;</PRE>
-<P>When the Eclipse expression language (<CODE>org.eclipse.core.expressions</CODE>) is not effective in specifying the
-matching conditions, a custom matcher may be provided:</P>
-<PRE class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
+&lt;/extension&gt;</pre>
+<p>When the Eclipse expression language (<code>org.eclipse.core.expressions</code>) is not effective in specifying the
+matching conditions, a custom matcher may be provided:</p>
+<pre class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
&lt;metamodel
nsURI=&quot;http://www.eclipse.org/gmf/examples/runtime/1.0.0/logicsemantic&quot;&gt;
&lt;specializationType
@@ -325,9 +318,9 @@ matching conditions, a custom matcher may be provided:</P>
&lt;matcher class=&quot;org.eclipse.gmf.examples.logic.FullAdderMatcher&quot;/&gt;
&lt;/specializationType&gt;
&lt;/metamodel&gt;
-&lt;/extension&gt;</PRE>
-<P>with the particular matcher implementation perhaps looking like:</P>
-<PRE class="snippet">public class FullAdderMatcher implements IElementMatcher {
+&lt;/extension&gt;</pre>
+<p>with the particular matcher implementation perhaps looking like:</p>
+<pre class="snippet">public class FullAdderMatcher implements IElementMatcher {
public boolean matches(EObject eObject) {
boolean result = false;
@@ -345,11 +338,11 @@ matching conditions, a custom matcher may be provided:</P>
// ... determine whether 'circuit' is a
// full adder
}
-}</PRE>
-<P>When the type describes something that has no direct relationship to
+}</pre>
+<p>When the type describes something that has no direct relationship to
a metaclass in the domain model, such as a reference relationship, a
-specialization of the <I>null</I> element type can be defined:</P>
-<PRE class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
+specialization of the <i>null</i> element type can be defined:</p>
+<pre class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
&lt;specializationType
id=&quot;library.writeBook&quot;
icon=&quot;icons/writeBook.gif&quot;
@@ -357,10 +350,10 @@ specialization of the <I>null</I> element type can be defined:</P>
edithelperadvice=&quot;org.eclipse.gmf.examples.library.WriteBookAdvice&quot;&gt;
&lt;specializes id=&quot;org.eclipse.gmf.runtime.emf.type.core.null&quot;/&gt;
&lt;/specializationType&gt;
-&lt;/extension&gt;</PRE>
-<P>with the particular edit helper advice implementation perhaps looking
-like:</P>
-<PRE class="snippet">public class WriteBookAdvice extends AbstractEditHelperAdvice {
+&lt;/extension&gt;</pre>
+<p>with the particular edit helper advice implementation perhaps looking
+like:</p>
+<pre class="snippet">public class WriteBookAdvice extends AbstractEditHelperAdvice {
protected ICommand getBeforeConfigureCommand(ConfigureRequest request) {
ICommand result = null;
@@ -389,18 +382,17 @@ like:</P>
return result;
}
-}</PRE>
-<P>Note that in this last case, it was not necessary to specify the
+}</pre>
+<p>Note that in this last case, it was not necessary to specify the
metamodel namespace URI, because there are no references to the domain
-model (e.g., EClasses, reference features) in the XML definition.</P>
+model (e.g., EClasses, reference features) in the XML definition.</p>
-<h3><A name="ex_client_context"></A>Defining a Client Context</h3>
-<p>Client contexts are declared and bound to element types and advice on the <a
- href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypeBindings.html"><code>elementTypeBindings</code></a>
+<h3><a name="ex_client_context"></a>Defining a Client Context</h3>
+<p>Client contexts are declared and bound to element types and advice on the <a href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypeBindings.html"><code>elementTypeBindings</code></a>
extension point.</p>
<p>The following example shows a client context for all model objects that are in the logic editing domain. The client context is bound to all of the logic element types, as well as two specific pieces of advice from GMF:</p>
-<PRE class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings&quot;&gt;
+<pre class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings&quot;&gt;
&lt;clientContext id=&quot;org.eclipse.gmf.example.runtime.diagram.logic.context&quot;&gt;
&lt;enablement&gt;
&lt;test
@@ -413,13 +405,13 @@ extension point.</p>
&lt;advice ref=&quot;org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents&quot;/&gt;
&lt;advice ref=&quot;org.eclipse.gmf.runtime.diagram.core.advice.removeBookmarks&quot;/&gt;
&lt;/binding&gt;
-&lt;/extension&gt;</PRE>
-<H3><A name="ex_bind"></A>Binding Advice to an Existing Element Type</H3>
-<P class="MsoBodyText">Edit advice can be bound to any existing element
+&lt;/extension&gt;</pre>
+<h3><a name="ex_bind"></a>Binding Advice to an Existing Element Type</h3>
+<p class="MsoBodyText">Edit advice can be bound to any existing element
type to decorate the resulting edit command with additional behaviour.
Example of a binding for the Writer element type that limits the
-creation of the WriteBook relationship from Writers to Books:</P>
-<PRE class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
+creation of the WriteBook relationship from Writers to Books:</p>
+<pre class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
&lt;metamodel
nsURI=&quot;http://org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0&quot;&gt;
&lt;adviceBinding
@@ -429,10 +421,10 @@ creation of the WriteBook relationship from Writers to Books:</P>
inheritance=&quot;all&quot;&gt;
&lt;/adviceBinding&gt;
&lt;/metamodel&gt;
-&lt;/extension&gt;</PRE>
-<P>with the particular advice binding implementation perhaps looking
-like:</P>
-<PRE class="snippet">public class WriterAdviceBinding extends AbstractEditHelperAdvice {
+&lt;/extension&gt;</pre>
+<p>with the particular advice binding implementation perhaps looking
+like:</p>
+<pre class="snippet">public class WriterAdviceBinding extends AbstractEditHelperAdvice {
protected ICommand getBeforeCreateRelationshipCommand(
CreateRelationshipRequest request) {
@@ -460,17 +452,17 @@ like:</P>
return result;
}
-}</PRE>
-<H3><A name="ex_context"></A>Changing the Edit Helper Context during Element Creation</H3>
-<P>When a request is made to create a new model object, the edit helper
+}</pre>
+<h3><a name="ex_context"></a>Changing the Edit Helper Context during Element Creation</h3>
+<p>When a request is made to create a new model object, the edit helper
(or edit helper advice) of the element type being created can change the
edit helper context used to identify the model element being edited by
the request. In short, the element type to be created can suggest a new
-container for itself other than the one supplied in the request.</P>
-<P>Example of an edit helper that changes the edit helper context from a
+container for itself other than the one supplied in the request.</p>
+<p>Example of an edit helper that changes the edit helper context from a
Diagram to the element that contains, or is associated with that
-diagram:</P>
-<PRE class="snippet">protected ICommand getEditContextCommand(GetEditContextRequest req) {
+diagram:</p>
+<pre class="snippet">protected ICommand getEditContextCommand(GetEditContextRequest req) {
GetEditContextCommand result = null;
@@ -496,15 +488,15 @@ diagram:</P>
result.setEditContext(container);
}
return result;
-}</PRE>
-<H3><A name="ex_configure"></A>Configuring a new Element</H3>
-<P>When a request is made to create a new model object, the edit helper
+}</pre>
+<h3><a name="ex_configure"></a>Configuring a new Element</h3>
+<p>When a request is made to create a new model object, the edit helper
(or edit helper advice) of the element type being created is given the
opportunity to configure the new model object to conform to its
-specifications.</P>
-<P>Example of an edit helper that configures a new logic gate with two
-input terminals and an output terminal:</P>
-<PRE class="snippet">protected ICommand getConfigureCommand(final ConfigureRequest req) {
+specifications.</p>
+<p>Example of an edit helper that configures a new logic gate with two
+input terminals and an output terminal:</p>
+<pre class="snippet">protected ICommand getConfigureCommand(final ConfigureRequest req) {
return new ConfigureLogicElementCommand(req,
SemanticPackage.eINSTANCE.getGate()) {
@@ -520,26 +512,26 @@ input terminals and an output terminal:</P>
return newOKCommandResult(oGate);
}
};
-}</PRE>
-
-<H3><A name="ex_factory"></A>Defining a Factory to Instantiate Custom Element Types</H3>
-<P>A factory can be registered to instantiate elements types with a
-custom implementation.</P>
-<P>Example of a factory that instantiates element types with additional
-parameters:</P>
-<PRE class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
+}</pre>
+
+<h3><a name="ex_factory"></a>Defining a Factory to Instantiate Custom Element Types</h3>
+<p>A factory can be registered to instantiate elements types with a
+custom implementation.</p>
+<p>Example of a factory that instantiates element types with additional
+parameters:</p>
+<pre class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
&lt;elementTypeFactory
factory=&quot;org.eclipse.gmf.examples.logic.AdderTypeFactory&quot;
kind=&quot;org.eclipse.gmf.examples.logic.AdderType&quot;
params=&quot;adderKind&quot;&gt;
&lt;/elementTypeFactory&gt;
-&lt;/extension&gt;</PRE>
+&lt;/extension&gt;</pre>
-<P>with the particular factory implementation perhaps looking like:</P>
+<p>with the particular factory implementation perhaps looking like:</p>
-<PRE class="snippet">public class NotationTypeFactory extends AbstractElementTypeFactory {
+<pre class="snippet">public class NotationTypeFactory extends AbstractElementTypeFactory {
private static final class AdderType
extends SpecializationType
@@ -568,17 +560,17 @@ parameters:</P>
String semanticHint = descriptor.getParamValue(parameterName);
return new AdderType(descriptor, semanticHint);
}
-}</PRE>
-<P>and an element type declaring that it should be instantiated by this
-factory like this:</P>
-<PRE class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
+}</pre>
+<p>and an element type declaring that it should be instantiated by this
+factory like this:</p>
+<pre class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
&lt;metamodel
nsURI=&quot;http://www.eclipse.org/gmf/examples/runtime/1.0.0/logicsemantic&quot;&gt;
&lt;specializationType
id=&quot;logic.fullAdder&quot;
icon=&quot;icons/fullAdder.gif&quot;
name=&quot;%FullAdderTool.Label&quot;
- <B>kind=&quot;org.eclipse.gmf.examples.logic.AdderType&quot;</B>
+ <b>kind=&quot;org.eclipse.gmf.examples.logic.AdderType&quot;</b>
edithelperadvice=&quot;org.eclipse.gmf.examples.logic.AdderAdvice&quot;&gt;
&lt;specializes id=&quot;logic.circuit&quot;/&gt;
&lt;param name=&quot;adderKind&quot; value=&quot;full&quot;/&gt;
@@ -589,26 +581,26 @@ factory like this:</P>
&lt;/enablement&gt;
&lt;/specializationType&gt;
&lt;/metamodel&gt;
-&lt;/extension&gt;</PRE>
+&lt;/extension&gt;</pre>
-<P>If a specialization element types wishes to completely replace the
+<p>If a specialization element types wishes to completely replace the
editing behaviour of the type that it specializes, a factory can be
-registered to instantiate the element type:</P>
-<PRE class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
+registered to instantiate the element type:</p>
+<pre class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
&lt;elementTypeFactory
factory=&quot;org.eclipse.gmf.examples.logic.HalfAdderTypeFactory&quot;
kind=&quot;org.eclipse.gmf.examples.logic.HalfAdderType&quot;&gt;
&lt;/elementTypeFactory&gt;
-&lt;/extension&gt;</PRE>
+&lt;/extension&gt;</pre>
-<P>with the particular factory implementation perhaps looking like:</P>
+<p>with the particular factory implementation perhaps looking like:</p>
-<PRE class="snippet">public class HalfAdderTypeFactory extends AbstractElementTypeFactory {
+<pre class="snippet">public class HalfAdderTypeFactory extends AbstractElementTypeFactory {
// a custom element type implementation for half adders
public static final class HalfAdderType extends SpecializationType {
@@ -638,18 +630,18 @@ registered to instantiate the element type:</P>
// instantiate the custom element type
return new HalfAdderType(descriptor);
}
-}</PRE>
+}</pre>
-<P>and an element type declaring that it should be instantiated by this
-factory like this:</P>
-<PRE class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
+<p>and an element type declaring that it should be instantiated by this
+factory like this:</p>
+<pre class="snippet">&lt;extension point=&quot;org.eclipse.gmf.runtime.emf.type.core.elementTypes&quot;&gt;
&lt;metamodel
nsURI=&quot;http://www.eclipse.org/gmf/examples/runtime/1.0.0/logicsemantic&quot;&gt;
&lt;specializationType
id=&quot;logic.halfAdder&quot;
icon=&quot;icons/halfAdder.gif&quot;
name=&quot;%HalfAdderTool.Label&quot;
- <B>kind=&quot;org.eclipse.gmf.examples.logic.HalfAdderType&quot;&gt; </B>
+ <b>kind=&quot;org.eclipse.gmf.examples.logic.HalfAdderType&quot;&gt; </b>
&lt;specializes id=&quot;logic.circuit&quot;/&gt;
&lt;enablement&gt;
&lt;test
@@ -658,25 +650,25 @@ factory like this:</P>
&lt;/enablement&gt;
&lt;/specializationType&gt;
&lt;/metamodel&gt;
-&lt;/extension&gt;</PRE>
+&lt;/extension&gt;</pre>
-<H3><A name="ex_registry"></A>Using the Element Type Registry</H3>
-<P>The element type registry is used to find element types by ID:</P>
+<h3><a name="ex_registry"></a>Using the Element Type Registry</h3>
+<p>The element type registry is used to find element types by ID:</p>
-<PRE class="snippet">
+<pre class="snippet">
String logicCircuitID = &quot;logic.circuit&quot;; //$NON-NLS-1$
ElementTypeRegistry registry = ElementTypeRegistry.getInstance();
-IElementType logicCircuitType = registry.getType(logicCircuitID);</PRE>
-<P>The element type registry is used to find the kinds model objects
-that can be contained in a specific feature of a container object:</P>
+IElementType logicCircuitType = registry.getType(logicCircuitID);</pre>
+<p>The element type registry is used to find the kinds model objects
+that can be contained in a specific feature of a container object:</p>
-<PRE class="snippet">
+<pre class="snippet">
private void fillMenu(Menu menu, EObject container, EReference feature) {
// fills a menu with items that create model objects in the
@@ -708,13 +700,13 @@ private void fillMenu(Menu menu, EObject container, EReference feature) {
}
}
}
-}</PRE>
+}</pre>
-<P>The element type registry is used to find edit commands:</P>
+<p>The element type registry is used to find edit commands:</p>
-<PRE class="snippet">
+<pre class="snippet">
public ICommand getEditCommand(IEditCommandRequest request) {
ICommand result = null;
@@ -728,72 +720,66 @@ public ICommand getEditCommand(IEditCommandRequest request) {
}
return result;
-}</PRE>
-<H3></H3>
-<H2><A name="models"></A>Design/Code/Interaction Models</H2>
-<P class="backto"><FONT size="2">[<A href="#top">back to top</A>]</FONT></P>
-<P>The main part of the extensible type registry API is depicted in the
-figure below.</P>
-<P><IMG border="1" src="./icons/ETR Class Diagram.gif"></P>
-<P><MAP name="ClientContexts">
- <AREA shape="rect" href="#ClientContextManager_api"
- coords="43,1,523,200">
- <AREA shape="rect" target="_blank"
- href="http://help.eclipse.org/help30/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/expressions/Expression.html"
- coords="448,514,590,612">
- <AREA shape="rect" href="#IClientContext_api" coords="123,219,450,365">
- <AREA shape="rect" href="#IClientSelector_api" coords="3,398,265,496">
- <AREA shape="default" nohref>
-</MAP></P>
-<P>The ElementTypeRegistry
-is responsible for loading the element types and advice bindings from the <A href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypes.html"><CODE>elementTypes</CODE></A> extension
+}</pre>
+<h3></h3>
+<h2><a name="models"></a>Design/Code/Interaction Models</h2>
+<p class="backto"><font size="2">[<a href="#top">back to top</a>]</font></p>
+<p>The main part of the extensible type registry API is depicted in the
+figure below.</p>
+<p><img border="1" src="./icons/ETR Class Diagram.gif" /></p>
+<p><map name="ClientContexts">
+ <area shape="rect" href="#ClientContextManager_api" coords="43,1,523,200" />
+ <area shape="rect" target="_blank" href="http://help.eclipse.org/help30/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/expressions/Expression.html" coords="448,514,590,612" />
+ <area shape="rect" href="#IClientContext_api" coords="123,219,450,365" />
+ <area shape="rect" href="#IClientSelector_api" coords="3,398,265,496" />
+ <area shape="default" nohref="nohref" />
+</map></p>
+<p>The ElementTypeRegistry
+is responsible for loading the element types and advice bindings from the <a href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypes.html"><code>elementTypes</code></a> extension
point, and for filtering the edit helper advice applicable to an object
-according to its container descriptor and its matcher criteria.</P>
-<P>The sequence diagram below shows how the AbstractEditHelper uses the <CODE>ElementTypeRegistry</CODE>
-to decorate an edit command with advice before and after the default editing behaviour supplied by the edit helper itself. </P>
-<P><IMG border="1" src="icons/getEditCommand.gif"></P>
-<P>The steps are as follows:</P>
-<OL>
- <LI>The edit helper asks the extensible type registry for all element types that apply to a specific edit helper context <CODE>(EObject</CODE> or <CODE>IElementType</CODE>). The registry iterates over the registered edit advice and tests the container descriptor and matcher of each advice against the edit helper context.</LI>
- <LI>The registry returns all of the advice whose criteria matched the <CODE>EObject</CODE> or <CODE>IElementType</CODE>.</LI>
- <LI>The edit helper constructs a new composite command.</LI>
- <BR>
+according to its container descriptor and its matcher criteria.</p>
+<p>The sequence diagram below shows how the AbstractEditHelper uses the <code>ElementTypeRegistry</code>
+to decorate an edit command with advice before and after the default editing behaviour supplied by the edit helper itself. </p>
+<p><img border="1" src="icons/getEditCommand.gif" /></p>
+<p>The steps are as follows:</p>
+<ol>
+ <li>The edit helper asks the extensible type registry for all element types that apply to a specific edit helper context <code>(EObject</code> or <code>IElementType</code>). The registry iterates over the registered edit advice and tests the container descriptor and matcher of each advice against the edit helper context.</li>
+ <li>The registry returns all of the advice whose criteria matched the <code>EObject</code> or <code>IElementType</code>.</li>
+ <li>The edit helper constructs a new composite command.</li>
+ <br />
The edit helper iterates the advice returned by the
registry:
- <OL>
- <LI>For each advice, the edit helper asks it for a before command for
- the edit request.</LI>
- <LI>The advice returns a before command, or <CODE>null</CODE> if it
- has no advice to offer for that request.</LI>
- <LI>The edit helper adds the advice to the composite command, if it is not
- <CODE>null</CODE>.</LI>
- <LI>The composite command returns itself.<BR>
- </LI>
- </OL>
- <LI>The edit helper gets the default edit behaviour.</LI>
- <LI>The default edit behaviour is returned. Subclasses will override the default behaviour as required.</LI>
- <LI>The edit helper adds the default edit behaviour to the composite command.</LI>
- <LI>The composite command returns itself.<BR>
- <BR>The edit helper iterates the advice returned by the
+ <ol>
+ <li>For each advice, the edit helper asks it for a before command for
+ the edit request.</li>
+ <li>The advice returns a before command, or <code>null</code> if it
+ has no advice to offer for that request.</li>
+ <li>The edit helper adds the advice to the composite command, if it is not
+ <code>null</code>.</li>
+ <li>The composite command returns itself.<br />
+ </li>
+ </ol>
+ <li>The edit helper gets the default edit behaviour.</li>
+ <li>The default edit behaviour is returned. Subclasses will override the default behaviour as required.</li>
+ <li>The edit helper adds the default edit behaviour to the composite command.</li>
+ <li>The composite command returns itself.<br />
+ <br />The edit helper iterates the advice returned by the
registry:
- <OL>
- <LI>For each advice, the edit helper asks it for an after command for
- the edit request.</LI>
- <LI>The advice returns an after command, or <CODE>null</CODE> if it
- has no advice to offer for that request.</LI>
- <LI>The edit helper adds the advice to the composite command, if it is not
- <CODE>null</CODE>.</LI>
- <LI>The composite command returns itself.
- <BR>
- </LI>
- </OL>
- The edit helper returns the composite command. </OL>
-<P><MAP name="ClientContextUsage">
-</MAP></P>
-<P></P><P></P>
-<DL>
- <DD></DD>
-</DL>
-<HR>
-</BODY>
-</HTML>
+ <ol>
+ <li>For each advice, the edit helper asks it for an after command for
+ the edit request.</li>
+ <li>The advice returns an after command, or <code>null</code> if it
+ has no advice to offer for that request.</li>
+ <li>The edit helper adds the advice to the composite command, if it is not
+ <code>null</code>.</li>
+ <li>The composite command returns itself.
+ <br />
+ </li>
+ </ol>
+ The edit helper returns the composite command. </li>
+<p><map name="ClientContextUsage">
+</map></p>
+<hr />
+</ol>
+</body>
+</html> \ No newline at end of file
diff --git a/doc/org.eclipse.gmf.doc/prog-guide/runtime/index.html b/doc/org.eclipse.gmf.doc/prog-guide/runtime/index.html
index 5b848b673..b5d194cca 100644
--- a/doc/org.eclipse.gmf.doc/prog-guide/runtime/index.html
+++ b/doc/org.eclipse.gmf.doc/prog-guide/runtime/index.html
@@ -1,29 +1,29 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML>
-<HEAD>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<META name="GENERATOR" content="IBM Software Development Platform">
-<META http-equiv="Content-Style-Type" content="text/css">
-<LINK href="../../book.css"
- rel="stylesheet" type="text/css">
-<TITLE>GMF Runtime Programmer's Guide</TITLE>
-</HEAD>
-<BODY>
-<H1>GMF Programmer's Guide</H1>
-<P>This guide presents the GMF Runtime Programmer's Guide.</P>
+<!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=ISO-8859-1" />
+<meta name="GENERATOR" content="IBM Software Development Platform" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<link href="../../book.css" rel="stylesheet" type="text/css" />
+<title>GMF Runtime Programmer's Guide</title>
+</head>
+<body>
+<h1>GMF Programmer's Guide</h1>
+<p>This guide presents the GMF Runtime Programmer's Guide.</p>
-<UL>
- <LI><A href="Developer Guide to Command Framework.html">Developer Guide to Command Framework</A></LI>
- <LI><A href="Developer Guide to Global Actions.html">Developer Guide to Global Actions</A></LI>
- <LI><A href="Developer Guide to Contribution Item Service.html">Developer Guide to Contribution Item Service</A></LI>
- <LI><A href="Developers Guide to the Extensible Type Registry/Developers Guide to the Extensible Type Registry.html">Developer Guide to the Extensible Type Registry</A></LI>
- <LI><A href="Developer Guide to Diagram Runtime.html">Developer Guide to Diagram Runtime Framework</A></LI>
-</UL>
+<ul>
+ <li><a href="Developer Guide to Command Framework.html">Developer Guide to Command Framework</a></li>
+ <li><a href="Developer Guide to Global Actions.html">Developer Guide to Global Actions</a></li>
+ <li><a href="Developer Guide to Contribution Item Service.html">Developer Guide to Contribution Item Service</a></li>
+ <li><a href="Developers Guide to the Extensible Type Registry/Developers Guide to the Extensible Type Registry.html">Developer Guide to the Extensible Type Registry</a></li>
+ <li><a href="Developer Guide to Diagram Runtime.html">Developer Guide to Diagram Runtime Framework</a></li>
+</ul>
<br/>
<br/>
<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">
+Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></p>
-</BODY>
-</HTML>
+<hr/>
+<br/>
+<br/></body></html> \ No newline at end of file
diff --git a/doc/org.eclipse.gmf.doc/reference/extension-points/index.html b/doc/org.eclipse.gmf.doc/reference/extension-points/index.html
index c7206e73e..97b81dc2a 100644
--- a/doc/org.eclipse.gmf.doc/reference/extension-points/index.html
+++ b/doc/org.eclipse.gmf.doc/reference/extension-points/index.html
@@ -1,66 +1,134 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-<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">
+<!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 name="generator" content="HTML Tidy, see www.w3.org" />
+<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>GMF Extension Points</title>
-</HEAD>
-<BODY BGCOLOR="#ffffff">
-<H1>
-<center>GMF Extension Points</center>
-</H1>
-The following extension points can be used to extend the Graphical Modeling Framework:
+</head>
+<body bgcolor="#ffffff">
+<center>
+<h1>GMF Extension Points</h1>
+</center>
+The following extension points can be used to extend the Graphical
+Modeling Framework: <!-- All level 0 components should go here -->
+<h3><a id="Runtime" name="Runtime"></a>GMF Runtime</h3>
-<!-- All level 0 components should go here -->
-<h3><a name=Runtime></a>GMF Runtime</h3>
<ul>
-<li><a href="org_eclipse_gmf_runtime_common_core_logListeners.html">org.eclipse.gmf.runtime.common.core.logListeners</a></li>
-<li><a href="org_eclipse_gmf_runtime_common_core_propertiesConfiguration.html">org.eclipse.gmf.runtime.common.core.propertiesConfiguration</a></li>
-
-<li><a href="org_eclipse_gmf_runtime_common_ui_services_action_actionFilterProviders.html">org.eclipse.gmf.runtime.common.ui.services.action.actionFilterProviders</a></li>
-<li><a href="org_eclipse_gmf_runtime_common_ui_services_action_contributionItemProviders.html">org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders</a></li>
-<li><a href="org_eclipse_gmf_runtime_common_ui_services_action_globalActionHandlerProviders.html">org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders</a></li>
-
-<li><a href="org_eclipse_gmf_runtime_common_ui_services_dnd_dragDropListenerProviders.html">org.eclipse.gmf.runtime.common.ui.services.dnd.dragDropListenerProviders</a></li>
-<li><a href="org_eclipse_gmf_runtime_common_ui_services_dnd_transferAdapterProviders.html">org.eclipse.gmf.runtime.common.ui.services.dnd.transferAdapterProviders</a></li>
-
-<li><a href="org_eclipse_gmf_runtime_common_ui_services_properties_propertyModifiers.html">org.eclipse.gmf.runtime.common.ui.services.properties.propertyModifiers</a></li>
-<li><a href="org_eclipse_gmf_runtime_common_ui_services_properties_propertiesProviders.html">org.eclipse.gmf.runtime.common.ui.services.properties.propertiesProviders</a></li>
-
-<li><a href="org_eclipse_gmf_runtime_common_ui_services_editorProviders.html">org.eclipse.gmf.runtime.common.ui.services.editorProviders</a></li>
-<li><a href="org_eclipse_gmf_runtime_common_ui_services_elementSelectionProviders.html">org.eclipse.gmf.runtime.common.ui.services.elementSelectionProviders</a></li>
-<li><a href="org_eclipse_gmf_runtime_common_ui_services_iconProviders.html">org.eclipse.gmf.runtime.common.ui.services.iconProviders</a></li>
-<li><a href="org_eclipse_gmf_runtime_common_ui_services_markerNavigationProviders.html">org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders</a></li>
-<li><a href="org_eclipse_gmf_runtime_common_ui_services_parserProviders.html">org.eclipse.gmf.runtime.common.ui.services.parserProviders</a></li>
-
-<li><a href="org_eclipse_gmf_runtime_diagram_core_viewProviders.html">org.eclipse.gmf.runtime.diagram.core.viewProviders</a></li>
-<li><a href="org_eclipse_gmf_runtime_diagram_ui_resources_editor_documentProviders.html">org.eclipse.gmf.runtime.diagram.ui.resources.editor.documentProviders</a></li>
-
-<li><a href="org_eclipse_gmf_runtime_diagram_ui_decoratorProviders.html">org.eclipse.gmf.runtime.diagram.ui.decoratorProviders</a></li>
-<li><a href="org_eclipse_gmf_runtime_diagram_ui_editpartProviders.html">org.eclipse.gmf.runtime.diagram.ui.editpartProviders</a></li>
-<li><a href="org_eclipse_gmf_runtime_diagram_ui_editpolicyProviders.html">org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders</a></li>
-<li><a href="org_eclipse_gmf_runtime_diagram_ui_layoutProviders.html">org.eclipse.gmf.runtime.diagram.ui.layoutProviders</a></li>
-<li><a href="org_eclipse_gmf_runtime_diagram_ui_paletteProviders.html">org.eclipse.gmf.runtime.diagram.ui.paletteProviders</a></li>
-
-<li><a href="org_eclipse_gmf_runtime_draw2d_ui_render_renderedImageFactory.html">org.eclipse.gmf.runtime.draw2d.ui.render.renderedImageFactory</a></li>
-
-<li><a href="org_eclipse_gmf_runtime_emf_clipboard_core_clipboardSupport.html">org.eclipse.gmf.runtime.emf.clipboard.core.clipboardSupport</a></li>
-
-<li><a href="org_eclipse_gmf_runtime_emf_core_Pathmaps.html">org.eclipse.gmf.runtime.emf.core.Pathmaps</a></li>
-<li><a href="org_eclipse_gmf_runtime_emf_ui_modelingAssistantProviders.html">org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders</a></li>
-
-<li><a href="org_eclipse_gmf_runtime_emf_type_core_elementTypes.html">org.eclipse.gmf.runtime.emf.type.core.elementTypes</a></li>
-<li><a href="org_eclipse_gmf_runtime_emf_type_core_elementTypeBindings.html">org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings</a></li>
+<li><a
+href="org_eclipse_gmf_runtime_common_core_logListeners.html">org.eclipse.gmf.runtime.common.core.logListeners</a></li>
+<li><a
+href="org_eclipse_gmf_runtime_common_core_propertiesConfiguration.html">
+org.eclipse.gmf.runtime.common.core.propertiesConfiguration</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_common_ui_services_action_actionFilterProviders.html">
+org.eclipse.gmf.runtime.common.ui.services.action.actionFilterProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_common_ui_services_action_contributionItemProviders.html">
+org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_common_ui_services_action_globalActionHandlerProviders.html">
+org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_common_ui_services_dnd_dragDropListenerProviders.html">
+org.eclipse.gmf.runtime.common.ui.services.dnd.dragDropListenerProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_common_ui_services_dnd_transferAdapterProviders.html">
+org.eclipse.gmf.runtime.common.ui.services.dnd.transferAdapterProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_common_ui_services_properties_propertyModifiers.html">
+org.eclipse.gmf.runtime.common.ui.services.properties.propertyModifiers</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_common_ui_services_properties_propertiesProviders.html">
+org.eclipse.gmf.runtime.common.ui.services.properties.propertiesProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_common_ui_services_editorProviders.html">
+org.eclipse.gmf.runtime.common.ui.services.editorProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_common_ui_services_elementSelectionProviders.html">
+org.eclipse.gmf.runtime.common.ui.services.elementSelectionProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_common_ui_services_iconProviders.html">
+org.eclipse.gmf.runtime.common.ui.services.iconProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_common_ui_services_markerNavigationProviders.html">
+org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_common_ui_services_parserProviders.html">
+org.eclipse.gmf.runtime.common.ui.services.parserProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_diagram_core_viewProviders.html">org.eclipse.gmf.runtime.diagram.core.viewProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_diagram_ui_resources_editor_documentProviders.html">
+org.eclipse.gmf.runtime.diagram.ui.resources.editor.documentProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_diagram_ui_decoratorProviders.html">org.eclipse.gmf.runtime.diagram.ui.decoratorProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_diagram_ui_editpartProviders.html">org.eclipse.gmf.runtime.diagram.ui.editpartProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_diagram_ui_editpolicyProviders.html">org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_diagram_ui_layoutProviders.html">org.eclipse.gmf.runtime.diagram.ui.layoutProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_diagram_ui_paletteProviders.html">org.eclipse.gmf.runtime.diagram.ui.paletteProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_draw2d_ui_render_renderedImageFactory.html">
+org.eclipse.gmf.runtime.draw2d.ui.render.renderedImageFactory</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_emf_clipboard_core_clipboardSupport.html">
+org.eclipse.gmf.runtime.emf.clipboard.core.clipboardSupport</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_emf_core_Pathmaps.html">org.eclipse.gmf.runtime.emf.core.Pathmaps</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_emf_ui_modelingAssistantProviders.html">
+org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_emf_type_core_elementTypes.html">org.eclipse.gmf.runtime.emf.type.core.elementTypes</a></li>
+
+<li><a
+href="org_eclipse_gmf_runtime_emf_type_core_elementTypeBindings.html">
+org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings</a></li>
</ul>
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
+<br />
+<br />
+<hr />
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright
+(c) 2000,2005 IBM Corporation and others. All Rights
+Reserved.</a></p>
+<br />
+ <br />
</body>
</html>
+
diff --git a/doc/org.eclipse.gmf.doc/toc.xml b/doc/org.eclipse.gmf.doc/toc.xml
index f26461749..966fc2211 100644
--- a/doc/org.eclipse.gmf.doc/toc.xml
+++ b/doc/org.eclipse.gmf.doc/toc.xml
@@ -44,10 +44,6 @@
<anchor id="tutorial-before" />
<topic label="Tutorials" href="tutorials/index.html">
-
- <anchor id="tutorial-tooling-before" />
- <topic label="Tooling" href="http://wiki.eclipse.org/index.php/GMF_Tutorial"/>
- <anchor id="tutorial-runtime-after" />
<anchor id="tutorial-runtime-before" />
<topic label="Runtime" href="tutorials/index.html">
diff --git a/doc/org.eclipse.gmf.doc/tutorials/Service and Provider Tutorial.html b/doc/org.eclipse.gmf.doc/tutorials/Service and Provider Tutorial.html
index 256704002..0b251e30f 100644
--- a/doc/org.eclipse.gmf.doc/tutorials/Service and Provider Tutorial.html
+++ b/doc/org.eclipse.gmf.doc/tutorials/Service and Provider Tutorial.html
@@ -1,1390 +1,696 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml"
-xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 10">
-<meta name=Originator content="Microsoft Word 10">
-<link rel=File-List
-href="Service%20and%20Provider%20Tutorial_files/filelist.xml">
-<link rel=Edit-Time-Data
-href="Service%20and%20Provider%20Tutorial_files/editdata.mso">
-<!--[if !mso]>
-<style>
-v\:* {behavior:url(#default#VML);}
-o\:* {behavior:url(#default#VML);}
-w\:* {behavior:url(#default#VML);}
-.shape {behavior:url(#default#VML);}
-</style>
-<![endif]-->
-<title>Tutorial: Service and Provider</title>
-<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
- name="date"/>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Author>jcorchis</o:Author>
- <o:LastAuthor>jcorchis</o:LastAuthor>
- <o:Revision>36</o:Revision>
- <o:TotalTime>4441</o:TotalTime>
- <o:Created>2005-04-21T14:33:00Z</o:Created>
- <o:LastSaved>2005-05-05T17:51:00Z</o:LastSaved>
- <o:Pages>1</o:Pages>
- <o:Words>2133</o:Words>
- <o:Characters>12164</o:Characters>
- <o:Company>Rational Software</o:Company>
- <o:Lines>101</o:Lines>
- <o:Paragraphs>28</o:Paragraphs>
- <o:CharactersWithSpaces>14269</o:CharactersWithSpaces>
- <o:Version>10.6735</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:SpellingState>Clean</w:SpellingState>
- <w:GrammarState>Clean</w:GrammarState>
- <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
- </w:WordDocument>
-</xml><![endif]--><!--[if !mso]><object
- classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
-<style>
-st1\:*{behavior:url(#ieooui) }
-</style>
-<![endif]-->
-<link rel=Stylesheet type="text/css" media=all href=technote.css>
-<style>
-<!--
- /* Style Definitions */
- p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-h1
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:1;
- font-size:24.0pt;
- font-family:"Times New Roman";
- font-weight:bold;}
-h2
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:2;
- font-size:18.0pt;
- font-family:"Times New Roman";
- font-weight:bold;}
-h3
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:3;
- font-size:13.5pt;
- font-style:italic;}
-p.MsoCaption, li.MsoCaption, div.MsoCaption
- {mso-style-noshow:yes;
- mso-style-next:Normal;
- margin-top:6.0pt;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";
- font-weight:bold;}
-a:link, span.MsoHyperlink
- {color:blue;
- text-decoration:underline;
- text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
- {color:blue;
- text-decoration:underline;
- text-underline:single;}
-p
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-code
- {font-family:"Courier New";
- mso-ascii-font-family:"Courier New";
- mso-fareast-font-family:"Times New Roman";
- mso-hansi-font-family:"Courier New";
- mso-bidi-font-family:"Courier New";}
-pre
- {margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:24.0pt;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
- font-size:10.0pt;
- font-family:"Courier New";
- mso-fareast-font-family:"Times New Roman";}
-p.notabene, li.notabene, div.notabene
- {mso-style-name:notabene;
- mso-margin-top-alt:auto;
- margin-right:48.0pt;
- mso-margin-bottom-alt:auto;
- margin-left:48.0pt;
- mso-pagination:widow-orphan;
- border:none;
- mso-border-top-alt:solid windowtext .75pt;
- mso-border-bottom-alt:solid windowtext .75pt;
- padding:0in;
- mso-padding-alt:4.0pt 0in 4.0pt 0in;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.question, li.question, div.question
- {mso-style-name:question;
- mso-margin-top-alt:auto;
- margin-right:48.0pt;
- mso-margin-bottom-alt:auto;
- margin-left:48.0pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";
- font-style:italic;}
-p.backto, li.backto, div.backto
- {mso-style-name:backto;
- mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-span.SpellE
- {mso-style-name:"";
- mso-spl-e:yes;}
-span.GramE
- {mso-style-name:"";
- mso-gram-e:yes;}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:35.4pt;
- mso-footer-margin:35.4pt;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
- /* List Definitions */
- @list l0
- {mso-list-id:1754820217;
- mso-list-template-ids:-806848416;}
-@list l0:level1
- {mso-level-number-format:bullet;
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Symbol;}
-@list l0:level2
- {mso-level-tab-stop:1.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l0:level3
- {mso-level-tab-stop:1.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l0:level4
- {mso-level-tab-stop:2.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l0:level5
- {mso-level-tab-stop:2.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l0:level6
- {mso-level-tab-stop:3.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l0:level7
- {mso-level-tab-stop:3.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l0:level8
- {mso-level-tab-stop:4.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l0:level9
- {mso-level-tab-stop:4.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-ol
- {margin-bottom:0in;}
-ul
- {margin-bottom:0in;}
--->
-</style>
-<!--[if gte mso 10]>
-<style>
- /* Style Definitions */
- table.MsoNormalTable
- {mso-style-name:"Table Normal";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-noshow:yes;
- mso-style-parent:"";
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;}
-table.MsoTableGrid
- {mso-style-name:"Table Grid";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- margin-left:24.0pt;
- border:solid windowtext 1.0pt;
- mso-border-alt:solid windowtext .5pt;
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-border-insideh:.5pt solid windowtext;
- mso-border-insidev:.5pt solid windowtext;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;}
-</style>
-<![endif]-->
-</head>
-
-<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p class=MsoNormal><a name=top></a><img id="_x0000_i1025"
-src="../logo.gif" border=0></p>
-
-<h1 align=center style='text-align:center'>Tutorial: Service and Provider</h1>
-
-<table class=MsoNormalTable border=0 cellspacing=8 cellpadding=0
- style='mso-cellspacing:6.0pt;margin-left:24.0pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
- <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'>
- <td style='padding:.75pt .75pt .75pt .75pt'>
- <p class=MsoNormal>Version: 0.1</p>
- </td>
- <td style='padding:.75pt .75pt .75pt .75pt'>
- <p class=MsoNormal>Date: <st1:date Year="2005" Day="29" Month="4">April 29,
- 2005</st1:date></p>
- </td>
- </tr>
-</table>
-
-<h2>Contents</h2>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo2;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_Overview">Overview</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo2;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#refs">References</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo2;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#trace">Introduction</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo2;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#reqs">Creating the Widget Service</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo2;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#constraints">Creating the Widget Providers</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo2;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_Provider_Priorities">Provider Priorities</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo2;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_Execution_Strategies">Execution Strategies</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo2;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_Example">The Client</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo2;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#models">Summary</a></p>
-
-<div class=MsoNormal align=center style='text-align:center'>
-
-<hr size=2 width="100%" align=center>
-
-</div>
-
-<h2><a name=intro></a><a name="_Overview"></a>Overview</h2>
-
-<p class=backto><span style='font-size:10.0pt'>[<a href="#top"><span
-class=GramE>back</span> to top</a>]</span></p>
-
-<p>The GMF Service Provider infrastructure provides a framework for building
-Services for clients to execute a unit of work.<span style='mso-spacerun:yes'> 
-</span>The Service depends on Providers who actually perform the work on behalf
-of the Service.<span style='mso-spacerun:yes'>  </span>Providers have a
-Priority and an optional Policy which dictate how the Service will determine
-which Provider(s) to use when executing a request on behalf of a client.<a
-name=refs></a><span style='mso-spacerun:yes'>  </span>The Service may be
-optimized in some capacity.</p>
-
-<h2>References</h2>
-
-<p class=backto><span style='font-size:10.0pt'>[<a href="#top"><span
-class=GramE>back</span> to top</a>]</span></p>
-
-<p>This tutorial assumes the reader is familiar with Eclipse extension point
-architecture.<span style='mso-spacerun:yes'>  </span>There is an abundance of on-line
-help in Eclipse for those unfamiliar with extension points.<span
-style='mso-spacerun:yes'>  </span>For reference, the full source for this
-tutorial is available <a href="service_provider_src.zip">here</a>.</p>
-
-<h2><a name=trace></a>Introduction</h2>
-
-<p class=backto><span style='font-size:10.0pt'>[<a href="#top"><span
-class=GramE>back</span> to top</a>]</span></p>
-
-<p>To demonstrate the Provider Service we will create a simple example Widget
-Service and two Widget Provider.<span style='mso-spacerun:yes'>  </span>Then we
-will create a client to uses the Widget Service to create Widgets.<span
-style='mso-spacerun:yes'>  </span>This tutorial requires only the <span
-class=SpellE>org.eclipse.gmf.runtime.common.core</span> <span class=SpellE>plugins</span>
-and its dependencies to run.</p>
-
-<h2><a name=reqs></a>Creating the Widget Service</h2>
-
-<p class=backto><span style='font-size:10.0pt'>[<a href="#top"><span
-class=GramE>back</span> to top</a>]</span></p>
-
-<p>The first step in creating a Widget Service is defining the API for your Widget
-Providers.<span style='mso-spacerun:yes'>  </span>This is done using a Java
-interfaces.<span style='mso-spacerun:yes'>  </span>The Service Provider
-infrastructure defines an <span class=SpellE><code><span style='font-size:10.0pt'>IProvider</span></code></span>
-interface that is used to define the base interface for clients. This interface
-provides the call-backs to Providers via the <span class=GramE><code><span
-style='font-size:10.0pt'>provides(</span></code></span><span class=SpellE><code><span
-style='font-size:10.0pt'>IOperation</span></code></span><code><span
-style='font-size:10.0pt'>) </span></code>method.<span
-style='mso-spacerun:yes'>  </span><span class=SpellE><code><span
-style='font-size:10.0pt'>IProvider</span></code></span> also provides a
-mechanism for Providers to receive provider change events from the
-Service.<span style='mso-spacerun:yes'>  </span>It is expected that new Providers
-extend this interface for their own purposes.<span style='mso-spacerun:yes'> 
-</span>In order to keep this tutorial simple, the Providers created in this
-tutorial do not listen to provider changes.</p>
-
-<p>To support the creation of Widgets, we will create <span class=SpellE>IWidgetProvider</span>.<span
-style='mso-spacerun:yes'>  </span>The <span class=SpellE>IWidgetProvider</span>
-extends the <span class=SpellE>IProvider</span> interface and also defines the <span
-class=SpellE><span class=GramE>createWidget</span></span><span class=GramE>(</span>)
-method where Providers carry-out the actual work of creating widgets when asked
-by the <span class=SpellE>WidgetService</span>. </p>
-
-<div style='margin-left:24.0pt'>
-
-<div style='border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre style='margin-left:0in;border:none;
-mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span
-style='color:navy'>public interface <span class=SpellE>IWidgetProvider</span><o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:1'>    </span>extends <span class=SpellE>IProvider</span> {<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:1'>    </span><o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:1'>    </span>Object <span class=SpellE>createWidget</span>(<span
-class=SpellE>int</span> <span class=SpellE>orderSize</span>);<span
-style='mso-tab-count:1'>   </span><o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><o:p>&nbsp;</o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'>}</span><span
-style='font-size:12.0pt;font-family:"Times New Roman";color:navy'><o:p></o:p></span></pre></div>
-
-</div>
-
-<p><span style='mso-spacerun:yes'> </span>Next, create the actual <span
-class=SpellE>WidgetService</span>.<span style='mso-spacerun:yes'>  </span>This
-is done by extending the abstract base class Service and implementing <span
-class=SpellE>IWidgetProvider</span>.<span style='mso-spacerun:yes'> 
-</span>Take a minute to read the code before we go through it in more detail.</p>
-
-<div style='border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:24.0pt;margin-right:0in'><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span class=GramE><code><span
-style='color:navy'>public</span></code></span><code><span style='color:navy'> class <span
-class=SpellE>WidgetService</span><o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span><span class=GramE>extends</span> Service<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span><span class=GramE>implements</span> <span
-class=SpellE>IWidgetProvider</span> {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><o:p>&nbsp;</o:p></span></code></pre><pre style='margin-left:
-0in;border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><code><span style='color:navy'><span style='mso-tab-count:
-1'>    </span><span class=GramE>private</span> final static <span class=SpellE>WidgetService</span> service = new <span
-class=SpellE>WidgetService</span>();<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><o:p>&nbsp;</o:p></span></code></pre><pre style='margin-left:
-0in;border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><code><span style='color:navy'><span style='mso-tab-count:
-1'>    </span><span class=GramE>public</span> static <span class=SpellE>WidgetService</span> <span
-class=SpellE>getInstance</span>() {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span><span
-class=GramE>return</span> service;<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span>}<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><o:p>&nbsp;</o:p></span></code></pre><pre style='margin-left:
-0in;border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><code><span style='color:navy'><span style='mso-tab-count:
-1'>    </span><span class=GramE>public</span> Object <span class=SpellE>createWidget</span>(<span
-class=SpellE>int</span> <span class=SpellE>orderSize</span>) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span><span
-class=GramE>return</span> execute(new <span class=SpellE>CreateWidgetOperation</span>(<span
-class=SpellE>orderSize</span>));<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span><o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span>}<span
-style='mso-tab-count:1'>       </span><o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span><o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span><span class=GramE>public</span> Object execute(<span
-class=SpellE>IOperation</span> operation) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span> List results = <span
-class=GramE>execute(</span><span class=SpellE>ExecutionStrategy.FIRST</span>, operation);<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span> <span
-class=GramE>return</span> <span class=SpellE>results.isEmpty</span>() ? null : results;<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span>}<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span><o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span><span class=GramE>protected</span> <span
-class=SpellE>Service.ProviderDescriptor</span> <span class=SpellE>newProviderDescriptor</span>(<span
-class=SpellE>IConfigurationElement</span> element) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span><span
-class=GramE>return</span> new <span class=SpellE>WidgetProviderDescriptor</span>(element);<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span>}<span
-style='mso-tab-count:1'>       </span><o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span><o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span><o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span><span class=GramE>protected</span> static class <span
-class=SpellE>WidgetProviderDescriptor</span><o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span><span
-class=GramE>extends</span> <span class=SpellE>Service.ProviderDescriptor</span> {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><o:p>&nbsp;</o:p></span></code></pre><pre style='margin-left:
-0in;border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><code><span style='color:navy'><span style='mso-tab-count:
-2'>           </span><span class=GramE>private</span> <span class=SpellE>WidgetServiceProviderConfiguration</span> <span
-class=SpellE>providerConfiguration</span>;<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><o:p>&nbsp;</o:p></span></code></pre><pre style='margin-left:
-0in;border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><code><span style='color:navy'><span style='mso-tab-count:
-2'>           </span><span class=GramE>public</span> <span class=SpellE>WidgetProviderDescriptor</span>(<span
-class=SpellE>IConfigurationElement</span> element) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span><span
-style='mso-tab-count:1'>        </span><span class=GramE>super(</span>element);<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><o:p>&nbsp;</o:p></span></code></pre><pre style='margin-left:
-0in;border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><code><span style='color:navy'><span style='mso-tab-count:
-3'>                   </span><span class=SpellE>this.providerConfiguration</span> =<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:4'>                           </span><span
-class=SpellE><span class=GramE>WidgetServiceProviderConfiguration.parse</span></span><span
-class=GramE>(</span>element);<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:3'>                   </span><span
-class=GramE>assert</span> null != element : &quot;NULL configuration element&quot;; //$NON-NLS-1$<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span>}<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><o:p>&nbsp;</o:p></span></code></pre><pre style='margin-left:
-0in;border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><code><span style='color:navy'><span style='mso-tab-count:
-2'>           </span><span class=GramE>public</span> <span class=SpellE>boolean</span> provides(<span
-class=SpellE>IOperation</span> operation) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:3'>                   </span><span
-class=GramE>if</span> (<span class=SpellE>getPolicy</span>() != null)<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:4'>                           </span><span
-class=GramE>return</span> <span class=SpellE>getPolicy</span>().provides(operation);<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:3'>                   </span><span
-class=GramE>if</span> (provider == null) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:4'>                           </span><span
-class=GramE>if</span> (<span class=SpellE>isSupportedInExtension</span>(operation)) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:5'>                                  </span><span
-class=SpellE><span class=GramE>providerConfiguration</span></span> = null;<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:5'>                                  </span><span
-class=GramE>return</span> <span class=SpellE>getProvider</span>().provides(operation);<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:4'>                           </span>}<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:4'>                           </span><span
-class=GramE>return</span> false;<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:3'>                   </span>}<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:3'>                   </span><span
-class=GramE>return</span> <span class=SpellE>getProvider</span>().provides(operation);<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span>}<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><o:p>&nbsp;</o:p></span></code></pre><pre style='margin-left:
-0in;border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><code><span style='color:navy'><span style='mso-tab-count:
-2'>           </span><span class=GramE>private</span> <span class=SpellE>boolean</span> <span
-class=SpellE>isSupportedInExtention</span>(<span class=SpellE>IOperation</span> operation) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:3'>                   </span><o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:3'>                   </span><span
-class=GramE>if</span> (operation <span class=SpellE>instanceof</span> <span
-class=SpellE>CreateWidgetOperation</span>) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:4'>                           </span><span
-class=GramE>return</span> <span class=SpellE>providerConfiguration.supports</span>(((<span
-class=SpellE>CreateWidgetOperation</span>)operation).<span class=SpellE>getOrderSize</span>());<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:3'>                   </span>}<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:3'>                   </span><span
-class=GramE>return</span> false;<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span>}<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span>}<span
-style='mso-tab-count:1'>       </span><o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'>}<o:p></o:p></span></code></pre></div>
-
-<p>First, notice that the <span class=SpellE>WidgetService</span> is a static instance.<span
-style='mso-spacerun:yes'>  </span>This is needed to support the initialization of
-the Widget <span class=GramE>Providers,</span> we will get to that in more
-detail in a minute.</p>
-
-<p>Next, notice that the <span class=SpellE>WidgetService</span> implements <span
-class=SpellE>IWidgetProvider</span> by delegating the service request to the
-actual Service.<span style='mso-spacerun:yes'>  </span>This is done by calling the
-Service&#8217;s <span class=GramE>execute(</span><span class=SpellE>ExecutionStrategy</span>,
-<span class=SpellE>IOperation</span>) method.<span style='mso-spacerun:yes'> 
-</span>Again, don&#8217;t worry about the understanding the <span class=SpellE>ExecutionStrategy</span>,
-we explain the <span class=SpellE>ExecutionStrategies</span> that later.<span
-style='mso-spacerun:yes'>  </span>At this point the Service will find Providers
-for the given <span class=SpellE>IOperation</span> and delegate the work
-required in the <span class=SpellE>IOperation</span> to them.<span
-style='mso-spacerun:yes'>  </span>Then return the results for the work done by
-the Providers back to the client.</p>
-
-<p>Now back to the Provider initialization.<span style='mso-spacerun:yes'> 
-</span>In order to know about potential Providers for a given <span
-class=SpellE>IOperation</span>, the Service will find them by examining all the
-extensions of <span class=SpellE>widgetProvider</span> extension-point.<span
-style='mso-spacerun:yes'>  </span>These <span class=SpellE>widgetProviders</span>
-are registered with the Service as <span class=SpellE>WidgetProviderDescriptors</span>.<span
-style='mso-spacerun:yes'>  </span>Which are used by the service to determine if
-a particular Provider provides for the operation via <span class=GramE>provides(</span><span
-class=SpellE>IOperation</span>).<span style='mso-spacerun:yes'>  </span>Since
-the providers are registered this way we don&#8217;t have to worry about a <span
-class=SpellE>plugin</span> not being loaded in order to contribute to the
-Service.<span style='mso-spacerun:yes'>  </span>The service will load the
-Provider&#8217;s corresponding <span class=SpellE>plugin</span> when required.</p>
-
-<p><span style='mso-bidi-font-size:10.0pt'>Registration of the Providers is done
-in the <span class=GramE>startup(</span>) method of the <span class=SpellE>WidgetService&#8217;s</span>
-corresponding <span class=SpellE>xxPlugin.java</span>.<span
-style='mso-spacerun:yes'>  </span>The following code fragment shows the
-mechanics of the static initialization of Providers.<o:p></o:p></span></p>
-
-<div style='margin-left:24.0pt'>
-
-<div style='border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre style='margin-left:0in;border:none;
-mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span
-style='color:navy'><span style='mso-tab-count:1'>    </span><span class=GramE>public</span> static final String WIDGET_SERVICE_EXTENSION_POINT = &#8220;<span
-class=SpellE>widgetProviders</span>&#8221;;<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><o:p>&nbsp;</o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:1'>    </span><span class=GramE>public</span> void startup() {<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span style='mso-spacerun:yes'>          </span><span
-class=SpellE><span class=GramE>super.startup</span></span><span class=GramE>(</span>);<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span style='mso-spacerun:yes'>          </span><span
-class=SpellE><span class=GramE>configureWidgetProviders</span></span><span
-class=GramE>(</span>);<o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span style='mso-spacerun:yes'>   </span>}<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><o:p>&nbsp;</o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:1'>    </span><span class=GramE>public</span> void <span
-class=SpellE>configureWidgetProviders</span>() {<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:2'>           </span><span class=SpellE>WidgetService.getInstance</span>().<span
-class=SpellE>configureProviders</span>(<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:3'>                   </span><span class=SpellE>Platform.getExtensionRegistry</span>().<span
-class=SpellE>getExtensionPoint</span>(<span class=SpellE>getPluginId</span>(),<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:4'>                           </span>WIDGET_SERVICE_EXTENSION_POINT).<span
-class=SpellE>getConfigurationElements</span>());<span style='mso-tab-count:
-2'>   </span><o:p></o:p></span></pre><pre style='margin-left:0in;border:none;
-mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span
-style='mso-tab-count:1'>    </span>}<span style='mso-tab-count:1'>       </span></pre></div>
-
-</div>
-
-<p>Finally, define the &#8220;<span class=SpellE>widgetProviders</span>&#8221; extension-point
-for Providers to extend in the <span class=SpellE>plugin.xml</span>.<o:p></o:p></p>
-
-<div style='border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:24.0pt;margin-right:0in'><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'>&lt;extension-point id=&quot;<span class=SpellE>widgetProviders</span>&quot; name=&quot;%<span
-class=SpellE>extPoint.widgetProviders</span>&quot; schema=&quot;schema/<span
-class=SpellE>widgetProviders.exsd</span>&quot;/&gt;<o:p></o:p></span></code></pre></div>
-
-<p style='margin-left:0in;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><o:p>&nbsp;</o:p></p>
-
-<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
-name=constraints></a>Creating the Providers</h2>
-
-<p class=backto style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
-style='font-size:10.0pt'>[<a href="#top"><span class=GramE>back</span> to top</a>]</span></p>
-
-<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>Now
-we create the Providers that actually carry-out the requests on behalf of the
-Service.<span style='mso-spacerun:yes'>  </span>The first step in creating a
-Provider is to create an extension of the <span class=SpellE>widgetProvider</span>
-extension-point for the <span class=SpellE>WidgetProvider</span>.<span
-style='mso-spacerun:yes'>  </span>In the extension, you also define what type
-of request the Provider can handle and the Priority of the Provider.<span
-style='mso-spacerun:yes'>  </span>For our <span class=SpellE>WidgetProvider</span>,
-we have a low Priority Provider that supports widget order sizes between 50 and
-5000 widgets.</p>
-
-<div style='margin-left:24.0pt'>
-
-<div style='border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre style='margin-left:0in;border:none;
-mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span
-style='color:navy;background:white;mso-highlight:white'><span style='mso-spacerun:yes'>   </span>&lt;extension point=&quot;org.eclipse.gmf.examples.runtime.common.service.widgetProviders&quot;&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>      </span>&lt;<span class=SpellE>widgetProvider</span> class=&quot;org.eclipse.gmf.examples.runtime.common.service.providers.WidgetProvider&quot;&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>         </span>&lt;Priority name=&quot;Low&quot;/&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>         </span>&lt;<span class=SpellE>orderSize</span> max=&quot;5000&quot; min=&quot;50&quot;/&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>      </span>&lt;/<span class=SpellE>widgetProvider</span>&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>   </span>&lt;/extension&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre></div>
-
-</div>
-
-<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>Next
-we implement <span class=SpellE>WidgetProvider.java</span> as follows. The key
-point here is to ensure that your XML based configuration matches the Provider
-itself.<span style='mso-spacerun:yes'>  </span>In this case we are concerned
-with matching the order size.</p>
-
-<div style='margin-left:24.0pt'>
-
-<div style='border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre style='margin-left:0in;border:none;
-mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span
-style='color:navy'><span style='mso-tab-count:1'>    </span><span class=GramE>public</span> <span
-class=SpellE>boolean</span> provides(<span class=SpellE>IOperation</span> operation) {<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:2'>           </span>if (operation <span class=SpellE>instanceof</span> <span
-class=SpellE>CreateWidgetOperation</span>) {<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:3'>                   </span><span class=SpellE>int</span> <span
-class=SpellE>orderSize</span> = ((<span class=SpellE>CreateWidgetOperation</span>)operation).<span
-class=SpellE>getOrderSize</span>();<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:3'>                   </span>return (<span class=SpellE>orderSize</span> &gt;= 100 &amp;&amp; <span
-class=SpellE>orderSize</span> &lt;= 10000);<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:2'>           </span>}<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:2'>           </span>return false;<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:1'>    </span>}<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><o:p>&nbsp;</o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:1'>    </span><span class=GramE>public</span> Object <span
-class=SpellE>createWidget</span>(<span class=SpellE>int</span> <span
-class=SpellE>orderSize</span>) {<o:p></o:p></span></pre><pre style='margin-left:
-0in;border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span style='mso-tab-count:
-2'>           </span>List widgets = new <span class=SpellE><span class=GramE>ArrayList</span></span><span
-class=GramE>(</span><span class=SpellE>orderSize</span>);<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:2'>           </span><span class=GramE>for</span> (<span
-class=SpellE>int</span> <span class=SpellE>i</span> = 0; <span class=SpellE>i</span> &lt; <span
-class=SpellE>orderSize</span>; <span class=SpellE>i</span>++) {<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:3'>                   </span><span class=SpellE><span
-class=GramE>widgets.add</span></span><span class=GramE>(</span>I, &#8220;widget&#8221;);<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:2'>           </span>}<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:2'>           </span><span class=GramE>return</span> widgets;<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span
-style='mso-tab-count:1'>    </span>}<o:p></o:p></span></pre></div>
-
-</div>
-
-<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>To
-create the second provider follow the same steps are the first.<span
-style='mso-spacerun:yes'>  </span>However, there are a few subtle
-differences.<span style='mso-spacerun:yes'>  </span>Change the Provider
-priority from Low to High and change the order size<span
-style='mso-spacerun:yes'>  </span>to 100 &lt;= order size &lt;= 10000.</p>
-
-<div style='margin-left:24.0pt'>
-
-<div style='border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre style='margin-left:0in;border:none;
-mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span
-style='color:navy;background:white;mso-highlight:white'><span style='mso-spacerun:yes'>   </span>&lt;extension point=&quot;org.eclipse.gmf.examples.runtime.common.service.widgetProviders&quot;&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>      </span>&lt;<span class=SpellE>widgetProvider</span> class=&quot;org.eclipse.gmf.examples.runtime.common.service.providers.SuperWidgetProvider&quot;&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>         </span>&lt;Priority name=&quot;High&quot;/&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>         </span>&lt;<span class=SpellE>orderSize</span> max=&quot;10000&quot; min=&quot;100&quot;/&gt; </span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>      </span>&lt;/<span class=SpellE>widgetProvider</span>&gt;<span style='mso-spacerun:yes'>     </span></span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'> </span>&lt;/extension&gt;<span style='mso-spacerun:yes'>   </span></span><span
-style='color:navy'><o:p></o:p></span></pre></div>
-
-</div>
-
-<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>Again,
-create <span class=SpellE>SuperWidgetProvider</span> by implementing <span
-class=SpellE>IWidgetProvider</span>.</p>
-
-<div style='margin-left:24.0pt'>
-
-<div style='border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre style='margin-left:0in;border:none;
-mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span><span class=GramE>public</span> <span
-class=SpellE>boolean</span> provides(<span class=SpellE>IOperation</span> operation) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span>if (operation <span
-class=SpellE>instanceof</span> <span class=SpellE>CreateWidgetOperation</span>) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:3'>                   </span><span
-class=SpellE>int</span> <span class=SpellE>orderSize</span> = ((<span
-class=SpellE>CreateWidgetOperation</span>)operation).<span class=SpellE>getOrderSize</span>();<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:3'>                   </span>return (<span
-class=SpellE>orderSize</span> &gt;= 50 &amp;&amp; <span class=SpellE>orderSize</span> &lt;= 5000);<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span>}<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span>return false;<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span>}<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><o:p>&nbsp;</o:p></span></code></pre><pre style='margin-left:
-0in;border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><code><span style='color:navy'><span style='mso-tab-count:
-1'>    </span><span class=GramE>public</span> Object <span class=SpellE>createWidget</span>(<span
-class=SpellE>int</span> <span class=SpellE>orderSize</span>) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span>List widgets = new <span
-class=SpellE><span class=GramE>ArrayList</span></span><span class=GramE>(</span><span
-class=SpellE>orderSize</span>);<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span><span
-class=GramE>for</span> (<span class=SpellE>int</span> <span class=SpellE>i</span> = 0; I &lt; <span
-class=SpellE>orderSize</span>; <span class=SpellE>i</span>++) {<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:3'>                   </span><span
-class=SpellE><span class=GramE>widgets.add</span></span><span class=GramE>(</span><span
-class=SpellE>i</span>, &#8220;widget&#8221;);<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span>}<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span><span
-class=GramE>return</span> widgets;<o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:2'>           </span><o:p></o:p></span></code></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><code><span
-style='color:navy'><span style='mso-tab-count:1'>    </span>}<o:p></o:p></span></code></pre></div>
-
-</div>
-
-<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
-name="_Provider_Priorities"></a>Provider Priorities</h2>
-
-<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>[<a
-href="#top"><span class=GramE><span style='font-size:10.0pt'>back</span></span><span
-style='font-size:10.0pt'> to top</span></a>]</p>
-
-<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>Provider
-Priorities are closely tied to <span class=SpellE>ExecutionStrategies</span> (described
-in the next section).<span style='mso-spacerun:yes'>  </span>For now know that
-a Provider must have a Priority and that Priority assigns an importance to the
-Provider.<span style='mso-spacerun:yes'>  </span>The following Priorities are
-defined by GMF.</p>
-
-<div style='margin-left:24.0pt'>
-
-<div style='border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre style='margin-left:0in;border:none;
-mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span
-style='font-size:12.0pt;color:navy'><span style='mso-tab-count:1'>   </span><span
-class=SpellE>ProviderPriority.HIGHEST</span><o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='font-size:
-12.0pt;color:navy'><span style='mso-tab-count:1'>   </span><span class=SpellE>ProviderPriority.HIGH</span><o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='font-size:
-12.0pt;color:navy'><span style='mso-tab-count:1'>   </span><span class=SpellE>ProviderPriority.MEDIUM</span><o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='font-size:
-12.0pt;color:navy'><span style='mso-tab-count:1'>   </span><span class=SpellE>ProviderPriority.LOW</span><o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='font-size:
-12.0pt;color:navy'><span style='mso-tab-count:1'>   </span><span class=SpellE>ProviderPriority.LOWEST</span><b><o:p></o:p></b></span></pre></div>
-
-</div>
-
-<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
-name="_Execution_Strategies"></a>Execution Strategies</h2>
-
-<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>[<a
-href="#top"><span class=GramE><span style='font-size:10.0pt'>back</span></span><span
-style='font-size:10.0pt'> to top</span></a>]</p>
-
-<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>When
-collecting Providers for a given <span class=SpellE>IOperation</span> the
-Service can be instructed to find the Providers in a well-defined way.<span
-style='mso-spacerun:yes'>  </span><span style='mso-field-code:" REF _Ref102967140 \\h "'>Table
-<span style='mso-no-proof:yes'>1</span> Execution Strategies<!--[if gte mso 9]><xml>
- <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F005200650066003100300032003900360037003100340030000000</w:data>
-</xml><![endif]--></span> below defines that ways in which the Service finds
-Providers to carryout the unit of work.</p>
-
-<div align=center>
-
-<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
- style='margin-left:30.2pt;border-collapse:collapse;border:none;mso-border-alt:
- solid windowtext .5pt;mso-yfti-tbllook:480;mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-border-insideh:.5pt solid windowtext;mso-border-insidev:.5pt solid windowtext'>
- <tr style='mso-yfti-irow:0'>
- <td width=295 valign=top style='width:221.4pt;border:solid windowtext 1.0pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p style='margin-left:0in;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b
- style='mso-bidi-font-weight:normal'>Strategy<o:p></o:p></b></p>
- </td>
- <td width=295 valign=top style='width:221.4pt;border:solid windowtext 1.0pt;
- border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
- solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p style='margin-left:0in;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b
- style='mso-bidi-font-weight:normal'>Description<o:p></o:p></b></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:1'>
- <td width=295 valign=top style='width:221.4pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'><pre><span class=SpellE><span style='font-size:
- 12.0pt'>ExecutionStrategy.FIRST</span></span><span style='font-size:12.0pt'><o:p></o:p></span></pre></td>
- <td width=295 valign=top style='width:221.4pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p style='margin-left:0in;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>The
- Service will select the first Provider with the highest Priority that is
- capable of the service request.</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:2'>
- <td width=295 valign=top style='width:221.4pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'><pre><span class=SpellE><span style='font-size:
- 12.0pt'>ExecutionStrategy.LAST</span></span><span style='font-size:12.0pt'><o:p></o:p></span></pre></td>
- <td width=295 valign=top style='width:221.4pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p style='margin-left:0in;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>The
- Service will use the last Provider with the lowest Priority that is capable
- of the service request.</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:3'>
- <td width=295 valign=top style='width:221.4pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'><pre><span class=SpellE><span style='font-size:
- 12.0pt'>ExecutionStrategy.FORWARD</span></span><span style='font-size:12.0pt'><o:p></o:p></span></pre></td>
- <td width=295 valign=top style='width:221.4pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p style='margin-left:0in;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>The
- Services will use all the Providers in order of highest Priority to the
- lowest that are capable of providing the service request.<span
- style='mso-spacerun:yes'>  </span>The results from the Providers are placed in
- a List that matches the relative descending order of the Provider priorities.</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:4;mso-yfti-lastrow:yes'>
- <td width=295 valign=top style='width:221.4pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'><pre><span class=SpellE><span style='font-size:
- 12.0pt'>ExecutionStrategy.REVERSE</span></span><span style='font-size:12.0pt'><o:p></o:p></span></pre></td>
- <td width=295 valign=top style='width:221.4pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p style='margin-left:0in;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>The
- Service will use all the Providers in order of lowest Priority to the highest
- that are capable of providing the service request.<span
- style='mso-spacerun:yes'>  </span>The results from the Providers are placed
- in a List that matches the relative ascending order of the Provider
- priorities.</p>
- </td>
- </tr>
-</table>
-
-</div>
-
-<p class=MsoCaption align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
-name="_Ref102967140">Table </a><!--[if supportFields]><span style='mso-bookmark:
-_Ref102967140'></span><span style='mso-element:field-begin'></span><span
-style='mso-bookmark:_Ref102967140'><span style='mso-spacerun:yes'> </span>SEQ
-Table \* ARABIC <span style='mso-element:field-separator'></span></span><![endif]--><span
-style='mso-bookmark:_Ref102967140'><span style='mso-no-proof:yes'>1</span></span><!--[if supportFields]><span
-style='mso-bookmark:_Ref102967140'></span><span style='mso-element:field-end'></span><![endif]--><span
-style='mso-bookmark:_Ref102967140'> Execution Strategies</span></p>
-
-<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
-name="_Example"></a>The Client</h2>
-
-<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>[<a
-href="#top"><span class=GramE><span style='font-size:10.0pt'>back</span></span><span
-style='font-size:10.0pt'> to top</span></a>]</p>
-
-<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>To
-use the <span class=SpellE>WidgetService</span> we&#8217;ll simply create a
-client in the form of a Workbench action.<span style='mso-spacerun:yes'> 
-</span>Add the following to the <span class=SpellE>plugin.xml</span>.</p>
-
-<div style='margin-left:24.0pt'>
-
-<div style='border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre style='margin-left:0in;border:none;
-mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span
-style='color:navy;background:white;mso-highlight:white'><span style='mso-spacerun:yes'>   </span>&lt;extension point=&quot;<span
-class=SpellE>org.eclipse.ui.actionSets</span>&quot;&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>      </span>&lt;<span class=SpellE>actionSet</span> </span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>         </span>label=&quot;Widget <span
-class=SpellE>Serice</span> <span class=SpellE>ActionSet</span>&quot;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>         </span>visible=&quot;true&quot;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>         </span>id=&quot;<span
-class=SpellE>org.eclipse.gmf.examples.runtime.common.service.client.actionSet</span>&quot;&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>         </span>&lt;menu id=&quot;<span
-class=SpellE>org.eclipse.gmf.examples.runtime.menu</span>&quot;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>            </span>label=&quot;Widget Service&quot;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>            </span>path=&quot;additions&quot;&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>            </span>&lt;separator name=&quot;group1&quot;/&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>         </span>&lt;/menu&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>         </span>&lt;action id=&quot;<span
-class=SpellE>org.eclipse.gmf.examples.runtime.common.service.client.RunExampleAction</span>&quot;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>            </span><span class=GramE>label</span>=&quot;Run Widget Example&quot;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>            </span>menubarPath=&quot;org.eclipse.gmf.examples.runtime.menu/group1&quot;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>            </span>class=&quot;org.eclipse.gmf.examples.runtime.common.service.client.RunExampleAction&quot;&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>         </span>&lt;/action&gt;<span style='mso-spacerun:yes'>   </span></span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>      </span>&lt;/<span class=SpellE>actionSet</span>&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'><span style='mso-spacerun:yes'>   </span>&lt;/extension&gt;</span><span
-style='color:navy'><o:p></o:p></span></pre></div>
-
-</div>
-
-<p>Next, implement the <span class=SpellE><span style='background:white;
-mso-highlight:white'>RunExampleAction</span>&#8217;s</span> <span class=GramE>run(</span>)
-method with the following code <span class=SpellE>snipet</span>.</p>
-
-<div style='margin-left:24.0pt'>
-
-<div style='border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre style='margin-left:0in;border:none;
-mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span
-style='mso-tab-count:1'>    </span><span class=GramE>public</span> void run(<span
-class=SpellE>IAction</span> action) {</pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='mso-tab-count:2'>           </span>Object widgets = <span
-class=SpellE>WidgetService.getInstance</span>().<span class=SpellE>createWidget</span>(1000);</pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='mso-tab-count:
-2'>           </span><span class=SpellE>System.out.println</span>(widgets == null ? &quot;No widgets created&quot; : &quot;Created &quot; + ((Object[])widgets).length + &quot; widgets&quot;);//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$</pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='mso-tab-count:
-2'>           </span>widgets = <span class=SpellE>WidgetService.getInstance</span>().<span
-class=SpellE>createWidget</span>(30);</pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy'><span style='mso-tab-count:
-2'>           </span><span class=SpellE>System.out.println</span>(widgets == null ? &quot;No widgets created&quot; : &quot;Created &quot; + ((Object[])widgets).length + &quot; widgets&quot;);//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$<o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='mso-tab-count:
-2'>           </span>widgets = <span class=SpellE>WidgetService.getInstance</span>().<span
-class=SpellE>createWidget</span>(76);</pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='mso-tab-count:2'>           </span><span
-class=SpellE>System.out.println</span>(widgets == null ? &quot;No widgets created&quot; : &quot;Created &quot; + ((Object[])widgets).length + &quot; widgets&quot;);//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$</pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='mso-tab-count:
-1'>    </span><span style='mso-tab-count:1'>        </span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='mso-tab-count:
-1'>    </span>}</pre></div>
-
-</div>
-
-<p>Run the workbench and execution the &#8220;Run Widget Action&#8221;.<span
-style='mso-spacerun:yes'>  </span>You should see following in the Console
-view.<span style='mso-spacerun:yes'>  </span><span class=GramE>Not very
-exciting, but enough to demonstrate the Service Provider infrastructure.</span><span
-style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'>  </span>In
-all cases the <span class=SpellE>ExecutionStrategy.FIRST</span> is used.<span
-style='mso-spacerun:yes'>  </span>The first client request for a 1000 widgets
-is provided <span class=GramE>by <span style='mso-spacerun:yes'> </span><span
-class=SpellE>SuperWidgetProvider</span></span> since is has a higher Priority
-than the <span class=SpellE>WidgetProvider</span> and it is capable of handling
-the order size.<span style='mso-spacerun:yes'>  </span>In the second client
-request, no widgets were created since neither of the <span class=SpellE>widgetProvider</span>
-handles the order size.<span style='mso-spacerun:yes'>  </span>Lastly, the
-small order is provided by the <span class=SpellE>WidgetProvider</span> since
-the <span class=SpellE>SuperWidgetProvider</span> does not handle order smaller
-than 100 widgets.</p>
-
-<div style='border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:24.0pt;margin-right:0in'><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;
-background:white;mso-highlight:white'>Created 1000 widgets</span><span
-style='color:navy'><o:p></o:p></span></pre><pre style='margin-left:0in;
-border:none;mso-border-alt:solid windowtext .75pt;padding:0in;mso-padding-alt:
-4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;background:white;mso-highlight:
-white'>No widgets created</span><span style='color:navy'><o:p></o:p></span></pre><pre
-style='margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt'><span style='color:navy;
-background:white;mso-highlight:white'>Created 76 widgets</span><span
-style='color:navy'><o:p></o:p></span></pre></div>
-
-<p>As a simple exercise change the <span class=SpellE>ExecutionStrategy</span>
-used by the <span class=SpellE>WidgetService</span> to see the behavior change.<span
-style='mso-spacerun:yes'>  </span>You can also change the order sizes and
-Priority of the Providers.</p>
-
-<div class=MsoNormal align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>
-
-<hr size=2 width="100%" align=center>
-
-</div>
-
-<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
-name=principles></a><a name=examples></a><a name=models></a><a name=api></a>Summary</h2>
-
-<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
-style='font-size:10.0pt'>[<a href="#top"><span class=GramE>back</span> to top</a>]</span></p>
-
-<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>To
-create and demonstrate the Service Provider Infrastructure we:</p>
-
-<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo2;
-tab-stops:45.8pt list 1.0in left 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
-style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span><![endif]>Defined the <span class=SpellE>IWidgetProvider</span> interface
-by extending the base <span class=SpellE>IProvider</span> interface,</p>
-
-<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo2;
-tab-stops:45.8pt list 1.0in left 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
-style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span><![endif]>Created the <span class=SpellE>WidgetService</span> by
-extending Service and implementing <span class=SpellE>IWidgetProvider</span>,</p>
-
-<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo2;
-tab-stops:45.8pt list 1.0in left 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
-style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span><![endif]>Create the <span class=SpellE>WidgetDescriptor</span>
-to load the <span class=SpellE>WidgetProvider&#8217;s</span> XML descriptors,</p>
-
-<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo2;
-tab-stops:45.8pt list 1.0in left 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
-style='mso-list:Ignore'>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span><![endif]>Created the <span class=SpellE>widgetProvider</span> <span
-class=SpellE>extension</span>-point,</p>
-
-<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo2;
-tab-stops:45.8pt list 1.0in left 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
-style='mso-list:Ignore'>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span><![endif]>Add the <span class=SpellE>widgetProvider</span>
-extensions to the <span class=SpellE>plugin.xml</span>,</p>
-
-<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo2;
-tab-stops:45.8pt list 1.0in left 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
-style='mso-list:Ignore'>6.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span><![endif]>Created a widget Provider by implementing <span
-class=SpellE>IWidgetProvider</span>, and </p>
-
-<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo2;
-tab-stops:45.8pt list 1.0in left 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
-style='mso-list:Ignore'>7.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span><![endif]>Finally, created a simple client to use the Widget
-Service. </p>
-
-<div class=MsoNormal align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>
-
-<hr size=2 width="100%" align=center>
-
-</div>
-
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
-</div>
-
-</body>
-
-</html>
+<html>
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<meta name=Generator content="Microsoft Word 11 (filtered)">
+<title>Tutorial: Service and Provider</title>
+
+<link rel=Stylesheet type="text/css" media=all href=technote.css>
+<style>
+<!--
+ /* Style Definitions */
+ p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {margin:0in;
+ margin-bottom:.0001pt;
+ font-size:12.0pt;
+ font-family:"Times New Roman";}
+h1
+ {margin-right:0in;
+ margin-left:0in;
+ font-size:24.0pt;
+ font-family:"Times New Roman";
+ font-weight:bold;}
+h2
+ {margin-right:0in;
+ margin-left:0in;
+ font-size:18.0pt;
+ font-family:"Times New Roman";
+ font-weight:bold;}
+h3
+ {margin-right:0in;
+ margin-left:0in;
+ font-size:13.5pt;
+ font-family:"Times New Roman";
+ font-style:italic;}
+p.MsoCaption, li.MsoCaption, div.MsoCaption
+ {margin-top:6.0pt;
+ margin-right:0in;
+ margin-bottom:6.0pt;
+ margin-left:0in;
+ font-size:10.0pt;
+ font-family:"Times New Roman";
+ font-weight:bold;}
+a:link, span.MsoHyperlink
+ {color:blue;
+ text-decoration:underline;}
+a:visited, span.MsoHyperlinkFollowed
+ {color:blue;
+ text-decoration:underline;}
+p
+ {margin-right:0in;
+ font-size:12.0pt;
+ font-family:"Times New Roman";}
+code
+ {font-family:"Courier New";}
+pre
+ {margin-top:0in;
+ margin-right:0in;
+ margin-bottom:0in;
+ margin-left:24.0pt;
+ margin-bottom:.0001pt;
+ font-size:10.0pt;
+ font-family:"Courier New";}
+p.notabene, li.notabene, div.notabene
+ {margin-right:48.0pt;
+ margin-left:48.0pt;
+ border:none;
+ padding:0in;
+ font-size:12.0pt;
+ font-family:"Times New Roman";}
+p.question, li.question, div.question
+ {margin-right:48.0pt;
+ margin-left:48.0pt;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ font-style:italic;}
+p.backto, li.backto, div.backto
+ {margin-right:0in;
+ margin-left:0in;
+ font-size:12.0pt;
+ font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;}
+div.Section1
+ {page:Section1;}
+ /* List Definitions */
+ ol
+ {margin-bottom:0in;}
+ul
+ {margin-bottom:0in;}
+-->
+</style>
+
+</head>
+
+<body lang=EN-US link=blue vlink=blue>
+
+<div class=Section1>
+
+<p class=MsoNormal><a name=top></a><img width=347 height=134 src="../logo.gif"
+border=0></p>
+
+<h1 align=center style='text-align:center'>Tutorial: Service and Provider</h1>
+
+<table class=MsoNormalTable border=0 cellspacing=8 cellpadding=0
+ style='margin-left:24.0pt'>
+ <tr>
+ <td style='padding:.75pt .75pt .75pt .75pt'>
+ <p class=MsoNormal>Version: 0.1</p>
+ </td>
+ <td style='padding:.75pt .75pt .75pt .75pt'>
+ <p class=MsoNormal>Date: April 29, 2005</p>
+ </td>
+ </tr>
+</table>
+
+<h2>Contents</h2>
+
+<p class=MsoNormal style='margin-left:48.0pt;text-indent:-.25in'><span
+style='font-size:10.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
+</span></span><a href="#_Overview">Overview</a></p>
+
+<p class=MsoNormal style='margin-left:48.0pt;text-indent:-.25in'><span
+style='font-size:10.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
+</span></span><a href="#refs">References</a></p>
+
+<p class=MsoNormal style='margin-left:48.0pt;text-indent:-.25in'><span
+style='font-size:10.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
+</span></span><a href="#trace">Introduction</a></p>
+
+<p class=MsoNormal style='margin-left:48.0pt;text-indent:-.25in'><span
+style='font-size:10.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
+</span></span><a href="#reqs">Creating the Widget Service</a></p>
+
+<p class=MsoNormal style='margin-left:48.0pt;text-indent:-.25in'><span
+style='font-size:10.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
+</span></span><a href="#constraints">Creating the Widget Providers</a></p>
+
+<p class=MsoNormal style='margin-left:48.0pt;text-indent:-.25in'><span
+style='font-size:10.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
+</span></span><a href="#_Provider_Priorities">Provider Priorities</a></p>
+
+<p class=MsoNormal style='margin-left:48.0pt;text-indent:-.25in'><span
+style='font-size:10.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
+</span></span><a href="#_Execution_Strategies">Execution Strategies</a></p>
+
+<p class=MsoNormal style='margin-left:48.0pt;text-indent:-.25in'><span
+style='font-size:10.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
+</span></span><a href="#_Example">The Client</a></p>
+
+<p class=MsoNormal style='margin-left:48.0pt;text-indent:-.25in'><span
+style='font-size:10.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
+</span></span><a href="#models">Summary</a></p>
+
+<div class=MsoNormal align=center style='text-align:center'>
+
+<hr size=2 width="100%" align=center>
+
+</div>
+
+<h2><a name=intro></a><a name="_Overview"></a>Overview</h2>
+
+<p class=backto><span style='font-size:10.0pt'>[<a href="#top">back to top</a>]</span></p>
+
+<p>The GMF Service Provider infrastructure provides a framework for building
+Services for clients to execute a unit of work.  The Service depends on
+Providers who actually perform the work on behalf of the Service.  Providers
+have a Priority and an optional Policy which dictate how the Service will determine
+which Provider(s) to use when executing a request on behalf of a client.<a
+name=refs></a>  The Service may be optimized in some capacity.</p>
+
+<h2>References</h2>
+
+<p class=backto><span style='font-size:10.0pt'>[<a href="#top">back to top</a>]</span></p>
+
+<p>This tutorial assumes the reader is familiar with Eclipse extension point architecture. 
+There is an abundance of on-line help in Eclipse for those unfamiliar with
+extension points.  For reference, the full source for this tutorial is
+available <a href="service_provider_src.zip">here</a>.</p>
+
+<h2><a name=trace></a>Introduction</h2>
+
+<p class=backto><span style='font-size:10.0pt'>[<a href="#top">back to top</a>]</span></p>
+
+<p>To demonstrate the Provider Service we will create a simple example Widget
+Service and two Widget Provider.  Then we will create a client to uses the
+Widget Service to create Widgets.  This tutorial requires only the
+org.eclipse.gmf.runtime.common.core plugins and its dependencies to run.</p>
+
+<h2><a name=reqs></a>Creating the Widget Service</h2>
+
+<p class=backto><span style='font-size:10.0pt'>[<a href="#top">back to top</a>]</span></p>
+
+<p>The first step in creating a Widget Service is defining the API for your
+Widget Providers.  This is done using a Java interfaces.  The Service Provider
+infrastructure defines an <code><span style='font-size:10.0pt'>IProvider</span></code>
+interface that is used to define the base interface for clients. This interface
+provides the call-backs to Providers via the <code><span style='font-size:10.0pt'>provides(IOperation)
+</span></code>method.  <code><span style='font-size:10.0pt'>IProvider</span></code>
+also provides a mechanism for Providers to receive provider change events from
+the Service.  It is expected that new Providers extend this interface for their
+own purposes.  In order to keep this tutorial simple, the Providers created in
+this tutorial do not listen to provider changes.</p>
+
+<p>To support the creation of Widgets, we will create IWidgetProvider.  The
+IWidgetProvider extends the IProvider interface and also defines the
+createWidget() method where Providers carry-out the actual work of creating
+widgets when asked by the WidgetService. </p>
+
+<div style='margin-left:24.0pt'>
+
+<div style='border:solid windowtext 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>public interface IWidgetProvider</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>    extends IProvider {</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>    </span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>    Object createWidget(int orderSize);   </span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>&nbsp;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>}</span><span
+Times New></pre></div>
+
+</div>
+
+<p></span> Next, create the actual WidgetService.  This is done by extending
+the abstract base class Service and implementing IWidgetProvider.  Take a
+minute to read the code before we go through it in more detail.</p>
+
+<div style='margin-left:24.0pt'>
+
+<div style='border:solid windowtext 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>public class WidgetService</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    extends Service</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    implements IWidgetProvider {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>&nbsp;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    private final static WidgetService service = new WidgetService();</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>&nbsp;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    public static WidgetService getInstance() {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           return service;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    }</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>&nbsp;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    public Object createWidget(int orderSize) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           return execute(new CreateWidgetOperation(orderSize));</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           </span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    }       </span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    </span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    public Object execute(IOperation operation) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           List results = execute(ExecutionStrategy.FIRST, operation);</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           return results.isEmpty() ? null : results;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    }</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    </span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    protected Service.ProviderDescriptor newProviderDescriptor(IConfigurationElement element) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           return new WidgetProviderDescriptor(element);</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    }       </span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    </span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    </span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    protected static class WidgetProviderDescriptor</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           extends Service.ProviderDescriptor {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>&nbsp;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           private WidgetServiceProviderConfiguration providerConfiguration;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>&nbsp;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           public WidgetProviderDescriptor(IConfigurationElement element) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   super(element);</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>&nbsp;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   this.providerConfiguration =</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                           WidgetServiceProviderConfiguration.parse(element);</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   assert null != element : &quot;NULL configuration element&quot;; //$NON-NLS-1$</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           }</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>&nbsp;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           public boolean provides(IOperation operation) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   if (getPolicy() != null)</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                           return getPolicy().provides(operation);</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   if (provider == null) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                           if (isSupportedInExtension(operation)) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                                  providerConfiguration = null;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                                  return getProvider().provides(operation);</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                           }</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                           return false;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   }</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   return getProvider().provides(operation);</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           }</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>&nbsp;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           private boolean isSupportedInExtention(IOperation operation) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   </span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   if (operation instanceof CreateWidgetOperation) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                           return providerConfiguration.supports(((CreateWidgetOperation)operation).getOrderSize());</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   }</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   return false;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           }</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    }       </span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>}</span></code></pre></div>
+
+</div>
+
+<p>First, notice that the WidgetService is a static instance.  This is needed
+to support the initialization of the Widget Providers, we will get to that in
+more detail in a minute.</p>
+
+<p>Next, notice that the WidgetService implements IWidgetProvider by delegating
+the service request to the actual Service.  This is done by calling the
+Service&#8217;s execute(ExecutionStrategy, IOperation) method.  Again,
+don&#8217;t worry about the understanding the ExecutionStrategy, we explain the
+ExecutionStrategies that later.  At this point the Service will find Providers
+for the given IOperation and delegate the work required in the IOperation to
+them.  Then return the results for the work done by the Providers back to the
+client.</p>
+
+<p>Now back to the Provider initialization.  In order to know about potential
+Providers for a given IOperation, the Service will find them by examining all
+the extensions of widgetProvider extension-point.  These widgetProviders are
+registered with the Service as WidgetProviderDescriptors.  Which are used by
+the service to determine if a particular Provider provides for the operation
+via provides(IOperation).  Since the providers are registered this way we
+don&#8217;t have to worry about a plugin not being loaded in order to
+contribute to the Service.  The service will load the Provider&#8217;s
+corresponding plugin when required.</p>
+
+<p>Registration of the Providers is done in the startup() method of the
+WidgetService&#8217;s corresponding xxPlugin.java.  The following code fragment
+shows the mechanics of the static initialization of Providers.</p>
+
+<div style='margin-left:24.0pt'>
+
+<div style='border:solid windowtext 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>    public static final String WIDGET_SERVICE_EXTENSION_POINT = &#8220;widgetProviders&#8221;;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>&nbsp;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>    public void startup() {</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>          super.startup();</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>          configureWidgetProviders();</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>   }</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>&nbsp;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>    public void configureWidgetProviders() {</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>           WidgetService.getInstance().configureProviders(</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>                   Platform.getExtensionRegistry().getExtensionPoint(getPluginId(),</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>                           WIDGET_SERVICE_EXTENSION_POINT).getConfigurationElements());   </span></pre><pre
+style='margin-left:0in;border:none;padding:0in'>    }       </pre></div>
+
+</div>
+
+<p>Finally, define the &#8220;widgetProviders&#8221; extension-point for
+Providers to extend in the plugin.xml.</p>
+
+<div style='margin-left:24.0pt'>
+
+<div style='border:solid windowtext 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>&lt;extension-point id=&quot;widgetProviders&quot; name=&quot;%extPoint.widgetProviders&quot; schema=&quot;schema/widgetProviders.exsd&quot;/&gt;</span></code></pre></div>
+
+</div>
+
+<p style='margin-left:0in'>&nbsp;</p>
+
+<h2><a name=constraints></a>Creating the Providers</h2>
+
+<p class=backto><span style='font-size:10.0pt'>[<a href="#top">back to top</a>]</span></p>
+
+<p>Now we create the Providers that actually carry-out the requests on behalf
+of the Service.  The first step in creating a Provider is to create an
+extension of the widgetProvider extension-point for the WidgetProvider.  In the
+extension, you also define what type of request the Provider can handle and the
+Priority of the Provider.  For our WidgetProvider, we have a low Priority
+Provider that supports widget order sizes between 50 and 5000 widgets.</p>
+
+<div style='margin-left:24.0pt'>
+
+<div style='border:solid windowtext 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>   &lt;extension point=&quot;org.eclipse.gmf.examples.runtime.common.service.widgetProviders&quot;&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>      &lt;widgetProvider class=&quot;org.eclipse.gmf.examples.runtime.common.service.providers.WidgetProvider&quot;&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>         &lt;Priority name=&quot;Low&quot;/&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>         &lt;orderSize max=&quot;5000&quot; min=&quot;50&quot;/&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>      &lt;/widgetProvider&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>   &lt;/extension&gt;</span></pre></div>
+
+</div>
+
+<p>Next we implement WidgetProvider.java as follows. The key point here is to
+ensure that your XML based configuration matches the Provider itself.  In this
+case we are concerned with matching the order size.</p>
+
+<div style='margin-left:24.0pt'>
+
+<div style='border:solid windowtext 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>    public boolean provides(IOperation operation) {</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>           if (operation instanceof CreateWidgetOperation) {</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>                   int orderSize = ((CreateWidgetOperation)operation).getOrderSize();</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>                   return (orderSize &gt;= 100 &amp;&amp; orderSize &lt;= 10000);</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>           }</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>           return false;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>    }</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>&nbsp;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>    public Object createWidget(int orderSize) {</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>           List widgets = new ArrayList(orderSize);</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>           for (int i = 0; i &lt; orderSize; i++) {</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>                   widgets.add(I, &#8220;widget&#8221;);</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>           }</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>           return widgets;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>    }</span></pre></div>
+
+</div>
+
+<p>To create the second provider follow the same steps are the first.  However,
+there are a few subtle differences.  Change the Provider priority from Low to
+High and change the order size  to 100 &lt;= order size &lt;= 10000.</p>
+
+<div style='margin-left:24.0pt'>
+
+<div style='border:solid windowtext 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>   &lt;extension point=&quot;org.eclipse.gmf.examples.runtime.common.service.widgetProviders&quot;&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>      &lt;widgetProvider class=&quot;org.eclipse.gmf.examples.runtime.common.service.providers.SuperWidgetProvider&quot;&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>         &lt;Priority name=&quot;High&quot;/&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>         &lt;orderSize max=&quot;10000&quot; min=&quot;100&quot;/&gt; </span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>      &lt;/widgetProvider&gt;     </span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>   &lt;/extension&gt;   </span></pre></div>
+
+</div>
+
+<p>Again, create SuperWidgetProvider by implementing IWidgetProvider.</p>
+
+<div style='margin-left:24.0pt'>
+
+<div style='border:solid windowtext 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    public boolean provides(IOperation operation) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           if (operation instanceof CreateWidgetOperation) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   int orderSize = ((CreateWidgetOperation)operation).getOrderSize();</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   return (orderSize &gt;= 50 &amp;&amp; orderSize &lt;= 5000);</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           }</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           return false;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    }</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>&nbsp;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    public Object createWidget(int orderSize) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           List widgets = new ArrayList(orderSize);</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           for (int i = 0; I &lt; orderSize; i++) {</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>                   widgets.add(i, &#8220;widget&#8221;);</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           }</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           return widgets;</span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>           </span></code></pre><pre
+style='margin-left:0in;border:none;padding:0in'><code><span style='color:navy'>    }</span></code></pre></div>
+
+</div>
+
+<h2><a name="_Provider_Priorities"></a>Provider Priorities</h2>
+
+<p>[<a href="#top"><span style='font-size:10.0pt'>back to top</span></a>]</p>
+
+<p>Provider Priorities are closely tied to ExecutionStrategies (described in
+the next section).  For now know that a Provider must have a Priority and that
+Priority assigns an importance to the Provider.  The following Priorities are
+defined by GMF.</p>
+
+<div style='margin-left:24.0pt'>
+
+<div style='border:solid windowtext 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre
+style='margin-left:0in;border:none;padding:0in'><span style='font-size:12.0pt;
+color:navy'>   ProviderPriority.HIGHEST</span></pre><pre style='margin-left:
+0in;border:none;padding:0in'><span style='font-size:12.0pt;color:navy'>   ProviderPriority.HIGH</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='font-size:12.0pt;
+color:navy'>   ProviderPriority.MEDIUM</span></pre><pre style='margin-left:
+0in;border:none;padding:0in'><span style='font-size:12.0pt;color:navy'>   ProviderPriority.LOW</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='font-size:12.0pt;
+color:navy'>   ProviderPriority.LOWEST</span></pre></div>
+
+</div>
+
+<h2><a name="_Execution_Strategies"></a>Execution Strategies</h2>
+
+<p>[<a href="#top"><span style='font-size:10.0pt'>back to top</span></a>]</p>
+
+<p>When collecting Providers for a given IOperation the Service can be
+instructed to find the Providers in a well-defined way.  <span REF _Ref102967140>Table
+1 Execution Strategies</span> below defines that ways in which the Service
+finds Providers to carryout the unit of work.</p>
+
+<div align=center>
+
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
+ style='margin-left:30.2pt;border-collapse:collapse;border:none'>
+ <tr>
+ <td width=295 valign=top style='width:221.4pt;border:solid windowtext 1.0pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p style='margin-left:0in'><b>Strategy</b></p>
+ </td>
+ <td width=295 valign=top style='width:221.4pt;border:solid windowtext 1.0pt;
+ border-left:none;padding:0in 5.4pt 0in 5.4pt'>
+ <p style='margin-left:0in'><b>Description</b></p>
+ </td>
+ </tr>
+ <tr>
+ <td width=295 valign=top style='width:221.4pt;border:solid windowtext 1.0pt;
+ border-top:none;padding:0in 5.4pt 0in 5.4pt'><pre><span style='font-size:
+ 12.0pt'>ExecutionStrategy.FIRST</span></pre></td>
+ <td width=295 valign=top style='width:221.4pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p style='margin-left:0in'>The Service will select the first Provider with
+ the highest Priority that is capable of the service request.</p>
+ </td>
+ </tr>
+ <tr>
+ <td width=295 valign=top style='width:221.4pt;border:solid windowtext 1.0pt;
+ border-top:none;padding:0in 5.4pt 0in 5.4pt'><pre><span style='font-size:
+ 12.0pt'>ExecutionStrategy.LAST</span></pre></td>
+ <td width=295 valign=top style='width:221.4pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p style='margin-left:0in'>The Service will use the last Provider with the
+ lowest Priority that is capable of the service request.</p>
+ </td>
+ </tr>
+ <tr>
+ <td width=295 valign=top style='width:221.4pt;border:solid windowtext 1.0pt;
+ border-top:none;padding:0in 5.4pt 0in 5.4pt'><pre><span style='font-size:
+ 12.0pt'>ExecutionStrategy.FORWARD</span></pre></td>
+ <td width=295 valign=top style='width:221.4pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p style='margin-left:0in'>The Services will use all the Providers in order
+ of highest Priority to the lowest that are capable of providing the service request. 
+ The results from the Providers are placed in a List that matches the relative
+ descending order of the Provider priorities.</p>
+ </td>
+ </tr>
+ <tr>
+ <td width=295 valign=top style='width:221.4pt;border:solid windowtext 1.0pt;
+ border-top:none;padding:0in 5.4pt 0in 5.4pt'><pre><span style='font-size:
+ 12.0pt'>ExecutionStrategy.REVERSE</span></pre></td>
+ <td width=295 valign=top style='width:221.4pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p style='margin-left:0in'>The Service will use all the Providers in order of
+ lowest Priority to the highest that are capable of providing the service
+ request.  The results from the Providers are placed in a List that matches
+ the relative ascending order of the Provider priorities.</p>
+ </td>
+ </tr>
+</table>
+
+</div>
+
+<p class=MsoCaption align=center style='text-align:center'><a
+name="_Ref102967140">Table </a>1 Execution Strategies</p>
+
+<h2><a name="_Example"></a>The Client</h2>
+
+<p>[<a href="#top"><span style='font-size:10.0pt'>back to top</span></a>]</p>
+
+<p>To use the WidgetService we&#8217;ll simply create a client in the form of a
+Workbench action.  Add the following to the plugin.xml.</p>
+
+<div style='margin-left:24.0pt'>
+
+<div style='border:solid windowtext 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>   &lt;extension point=&quot;org.eclipse.ui.actionSets&quot;&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>      &lt;actionSet </span></pre><pre style='margin-left:
+0in;border:none;padding:0in'><span style='color:navy;background:white'>         label=&quot;Widget Serice ActionSet&quot;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>         visible=&quot;true&quot;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>         id=&quot;org.eclipse.gmf.examples.runtime.common.service.client.actionSet&quot;&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>         &lt;menu id=&quot;org.eclipse.gmf.examples.runtime.menu&quot;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>            label=&quot;Widget Service&quot;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>            path=&quot;additions&quot;&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>            &lt;separator name=&quot;group1&quot;/&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>         &lt;/menu&gt;</span></pre><pre style='margin-left:
+0in;border:none;padding:0in'><span style='color:navy;background:white'>         &lt;action id=&quot;org.eclipse.gmf.examples.runtime.common.service.client.RunExampleAction&quot;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>            label=&quot;Run Widget Example&quot;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>            menubarPath=&quot;org.eclipse.gmf.examples.runtime.menu/group1&quot;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>            class=&quot;org.eclipse.gmf.examples.runtime.common.service.client.RunExampleAction&quot;&gt;</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>         &lt;/action&gt;   </span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>      &lt;/actionSet&gt;</span></pre><pre style='margin-left:
+0in;border:none;padding:0in'><span style='color:navy;background:white'>   &lt;/extension&gt;</span></pre></div>
+
+</div>
+
+<p>Next, implement the <span style='background:white'>RunExampleAction</span>&#8217;s
+run() method with the following code snipet.</p>
+
+<div style='margin-left:24.0pt'>
+
+<div style='border:solid windowtext 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre
+style='margin-left:0in;border:none;padding:0in'>    public void run(IAction action) {</pre><pre
+style='margin-left:0in;border:none;padding:0in'>           Object widgets = WidgetService.getInstance().createWidget(1000);</pre><pre
+style='margin-left:0in;border:none;padding:0in'>           System.out.println(widgets == null ? &quot;No widgets created&quot; : &quot;Created &quot; + ((Object[])widgets).length + &quot; widgets&quot;);//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$</pre><pre
+style='margin-left:0in;border:none;padding:0in'>           widgets = WidgetService.getInstance().createWidget(30);</pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy'>           System.out.println(widgets == null ? &quot;No widgets created&quot; : &quot;Created &quot; + ((Object[])widgets).length + &quot; widgets&quot;);//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'>           widgets = WidgetService.getInstance().createWidget(76);</pre><pre
+style='margin-left:0in;border:none;padding:0in'>           System.out.println(widgets == null ? &quot;No widgets created&quot; : &quot;Created &quot; + ((Object[])widgets).length + &quot; widgets&quot;);//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$</pre><pre
+style='margin-left:0in;border:none;padding:0in'>           </pre><pre
+style='margin-left:0in;border:none;padding:0in'>    }</pre></div>
+
+</div>
+
+<p>Run the workbench and execution the &#8220;Run Widget Action&#8221;.  You
+should see following in the Console view.  Not very exciting, but enough to
+demonstrate the Service Provider infrastructure.    In all cases the
+ExecutionStrategy.FIRST is used.  The first client request for a 1000 widgets
+is provided by  SuperWidgetProvider since is has a higher Priority than the
+WidgetProvider and it is capable of handling the order size.  In the second
+client request, no widgets were created since neither of the widgetProvider
+handles the order size.  Lastly, the small order is provided by the
+WidgetProvider since the SuperWidgetProvider does not handle order smaller than
+100 widgets.</p>
+
+<div style='margin-left:24.0pt'>
+
+<div style='border:solid windowtext 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt'><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>Created 1000 widgets</span></pre><pre style='margin-left:
+0in;border:none;padding:0in'><span style='color:navy;background:white'>No widgets created</span></pre><pre
+style='margin-left:0in;border:none;padding:0in'><span style='color:navy;
+background:white'>Created 76 widgets</span></pre></div>
+
+</div>
+
+<p>As a simple exercise change the ExecutionStrategy used by the WidgetService
+to see the behavior change.  You can also change the order sizes and Priority
+of the Providers.</p>
+
+<div class=MsoNormal align=center style='text-align:center'>
+
+<hr size=2 width="100%" align=center>
+
+</div>
+
+<h2><a name=principles></a><a name=examples></a><a name=models></a><a name=api></a>Summary</h2>
+
+<p><span style='font-size:10.0pt'>[<a href="#top">back to top</a>]</span></p>
+
+<p>To create and demonstrate the Service Provider Infrastructure we:</p>
+
+<p style='margin-left:1.0in;text-indent:-.25in'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>Defined the IWidgetProvider interface by extending the base IProvider
+interface,</p>
+
+<p style='margin-left:1.0in;text-indent:-.25in'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>Created the WidgetService by extending Service and implementing
+IWidgetProvider,</p>
+
+<p style='margin-left:1.0in;text-indent:-.25in'>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>Create the WidgetDescriptor to load the WidgetProvider&#8217;s XML
+descriptors,</p>
+
+<p style='margin-left:1.0in;text-indent:-.25in'>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>Created the widgetProvider extension-point,</p>
+
+<p style='margin-left:1.0in;text-indent:-.25in'>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>Add the widgetProvider extensions to the plugin.xml,</p>
+
+<p style='margin-left:1.0in;text-indent:-.25in'>6.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>Created a widget Provider by implementing IWidgetProvider, and </p>
+
+<p style='margin-left:1.0in;text-indent:-.25in'>7.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>Finally, created a simple client to use the Widget Service. </p>
+
+<div class=MsoNormal align=center style='text-align:center'>
+
+<hr size=2 width="100%" align=center>
+
+</div>
+
+<p class=MsoNormal style='margin-bottom:12.0pt'>&nbsp;</p>
+
+<div class=MsoNormal align=center style='text-align:center'>
+
+<hr size=2 width="100%" align=center>
+
+</div>
+
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright (c) 2000,2005
+IBM Corporation and others. All Rights Reserved.</a></p>
+
+</hr/></br/></br/></div>
+
+</body>
+
+</html>
diff --git a/doc/org.eclipse.gmf.doc/tutorials/common/Extensible Type Registry/extensibleTypeRegistryTutorial.html b/doc/org.eclipse.gmf.doc/tutorials/common/Extensible Type Registry/extensibleTypeRegistryTutorial.html
index 02bdd0fcd..19d5f3b15 100644
--- a/doc/org.eclipse.gmf.doc/tutorials/common/Extensible Type Registry/extensibleTypeRegistryTutorial.html
+++ b/doc/org.eclipse.gmf.doc/tutorials/common/Extensible Type Registry/extensibleTypeRegistryTutorial.html
@@ -1,125 +1,191 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-
+<!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=iso-8859-1">
-<link rel="Stylesheet" type="text/css" href="../../technote.css">
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<meta http-equiv="Content-Type"
+content="text/html; charset=iso-8859-1" />
+<link rel="Stylesheet" type="text/css" href="../../technote.css" />
<title>Tutorial: Extensible Type Registry</title>
</head>
-
<body lang="EN-US" link="blue" vlink="blue">
-
-<a name=top></a><img src="../../../logo.gif" border="0">
+<a id="top" name="top"></a><img src="../../../logo.gif"
+border="0" />
<h1 align="center">Tutorial: Extensible Type Registry</h1>
-<table border="0" cellspacing="8" cellpadding="0">
- <tr>
- <td>Version: 0.1</td>
- <td>Date: December 28, 2005</td>
- </tr>
+<table border="0" cellspacing="8" cellpadding="0">
+<tr>
+<td>Version: 0.1</td>
+<td>Date: December 28, 2005</td>
+</tr>
</table>
<h2>Contents</h2>
<ul>
- <li><a href="#overview">Overview</a></li>
- <li><a href="#refs">References</a></li>
- <LI><A href="#intro">Introduction</A></LI>
- <li><a href="#batch">Specifying a Metamodel Type</a></li>
- <li><a href="#live">Specifying a Specialization Type</a></li>
- <li><a href="#eval">Creating Model Elements</a></li>
- <li><a href="#summary">Summary</a></li>
+<li><a href="#overview">Overview</a></li>
+
+<li><a href="#refs">References</a></li>
+
+<li><a href="#intro">Introduction</a></li>
+
+<li><a href="#batch">Specifying a Metamodel Type</a></li>
+
+<li><a href="#live">Specifying a Specialization Type</a></li>
+
+<li><a href="#eval">Creating Model Elements</a></li>
+
+<li><a href="#summary">Summary</a></li>
</ul>
-<hr/>
-
-<h2><a name="overview"></a></a>Overview</h2>
-<p class="backto"><font size="-1">[<a href="#top">back to top</a>]</font></p>
-
-<p>
-The GMF Extensible Type Registry provides an extension point for plug-ins to
-add new element types to the registry. This extension point provides a way for GMF clients to define an
-application-specific classification system based on, but alternative to,
-the metaclasses defined by an Ecore metamodel. You can use this extension point when you wish to extend the metamodel and provide specialized model elements in your GMF application. You may also use this extension point to extend the editing behaviour of existing element types.</p><p>
-This tutorial will illustrate how to contribute element types and edit behaviour using the Extensible Type Registry.
-</p>
-
-<h2><a name="refs"></a>References</h2>
-<p class="backto"><font size="-1">[<a href="#top">back to top</a>]</font></p>
-
-<p>
-To see the complete source code for the examples shown in this tutorial, install
-the <A href="../../../examples-guide/diagram/logicExample.html">Logic
-Example</A>
-plug-in into your workspace.
-</p><p>
-Other references:
-</p>
+<hr />
+<h2><a id="overview" name="overview"></a></h2>
+
+Overview
+
+<p class="backto"><font size="-1">[<a href="#top">back to
+top</a>]</font></p>
+
+<p>The GMF Extensible Type Registry provides an extension point for
+plug-ins to add new element types to the registry. This extension
+point provides a way for GMF clients to define an
+application-specific classification system based on, but
+alternative to, the metaclasses defined by an Ecore metamodel. You
+can use this extension point when you wish to extend the metamodel
+and provide specialized model elements in your GMF application. You
+may also use this extension point to extend the editing behaviour
+of existing element types.</p>
+
+<p>This tutorial will illustrate how to contribute element types
+and edit behaviour using the Extensible Type Registry.</p>
+
+<h2><a id="refs" name="refs"></a>References</h2>
+
+<p class="backto"><font size="-1">[<a href="#top">back to
+top</a>]</font></p>
+
+<p>To see the complete source code for the examples shown in this
+tutorial, install the <a
+href="../../../examples-guide/diagram/logicExample.html">Logic
+Example</a> plug-in into your workspace.</p>
+
+<p>Other references:</p>
+
<ul>
- <li>The <A href="../../../prog-guide/common/Developers Guide to the Extensible Type Registry/Developers Guide to the Extensible Type Registry.html">Developer's Guide to the Extensible Type Registry</A>
-contains a description of the Extensible Type Registry in GMF.</li>
- <li><A
- href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypes.html">org.eclipse.gmf.runtime.emf.type.core.elementTypes</A> extension point</li></ul>
-
-<hr/>
-
-<H2><A name="intro"></A>Introduction</H2>
-<P class="backto"><SPAN style="FONT-SIZE: 10pt">[<A href="#top"><SPAN
- class="GramE">back</SPAN> to top</A>]</SPAN></P>
-<P>In this tutorial, we will use the Logic Diagram Example to illustrate
-how to create element types used by a graphical editor for the digital logic domain. To gain
-familiarity with the Logic Diagram Example, refer to the <A
- href="../../../examples-guide/diagram/logicExample.html">Logic
-Example Guide</A>. The example provides other element types,
-but will also include the element types and menu items that we add in this tutorial</P>
-<P>For reference, here is the ECore model for the Logic Diagram Example:</P>
-<P><IMG border="0" src="images/logicSemantic.gif" width="622"
- height="293"></P>
-<P>This tutorial will guide you through the specification of the metamodel type for the Circuit metaclass and show you how to create a specialization of the Circuit type that describes a Half Adder. You will learn how to add context menu items that allow you to create Circuit and a Half Adder elements using the edit behaviour that you have associated with these two element types.</P>
-<h2><a name="batch"></a>Specifying a Metamodel Type</h2>
-<p class="backto"><font size="-1">[<a href="#top">back to top</a>]</font></p><p>We start with the extension declaration in the plugin.xml file, in which we indicate the <CODE>EPackage</CODE> for which we are contributing our metamodel type by referencing the logic example's namespace
-URI: </p>
+<li>The <a
+href="../../../prog-guide/common/Developers Guide to the Extensible Type Registry/Developers Guide to the Extensible Type Registry.html">
+Developer's Guide to the Extensible Type Registry</a> contains a
+description of the Extensible Type Registry in GMF.</li>
+
+<li><a
+href="../../../reference/extension-points/org_eclipse_gmf_runtime_emf_type_core_elementTypes.html">
+org.eclipse.gmf.runtime.emf.type.core.elementTypes</a> extension
+point</li>
+</ul>
+
+<hr />
+<h2><a id="intro" name="intro"></a>Introduction</h2>
+
+<p class="backto"><span style="FONT-SIZE: 10pt">[<a
+href="#top"><span class="GramE">back</span> to top</a>]</span></p>
+
+<p>In this tutorial, we will use the Logic Diagram Example to
+illustrate how to create element types used by a graphical editor
+for the digital logic domain. To gain familiarity with the Logic
+Diagram Example, refer to the <a
+href="../../../examples-guide/diagram/logicExample.html">Logic
+Example Guide</a>. The example provides other element types, but
+will also include the element types and menu items that we add in
+this tutorial</p>
+
+<p>For reference, here is the ECore model for the Logic Diagram
+Example:</p>
+
+<p><img border="0" src="images/logicSemantic.gif" width="622"
+height="293" /></p>
+
+<p>This tutorial will guide you through the specification of the
+metamodel type for the Circuit metaclass and show you how to create
+a specialization of the Circuit type that describes a Half Adder.
+You will learn how to add context menu items that allow you to
+create Circuit and a Half Adder elements using the edit behaviour
+that you have associated with these two element types.</p>
+
+<h2><a id="batch" name="batch"></a>Specifying a Metamodel Type</h2>
+
+<p class="backto"><font size="-1">[<a href="#top">back to
+top</a>]</font></p>
+
+<p>We start with the extension declaration in the plugin.xml file,
+in which we indicate the <code>EPackage</code> for which we are
+contributing our metamodel type by referencing the logic example's
+namespace URI:</p>
+
<pre class="snippet">
&lt;extension
point="org.eclipse.gmf.runtime.emf.type.core.elementTypes"&gt;
&lt;metamodel
- nsURI=&quot;http://www.eclipse.org/gmf/examples/runtime/1.0.0/logicsemantic&quot;&gt;</pre><P>Next, we define a metamodel type for the Circuit metaclass in the digital logic ECore model. Inside of the <CODE>&lt;metamodel&gt;</CODE> element, we declare
- the Circuit metamodel type with the following data:</P>
-<UL>
- <LI>a unique ID</LI>
- <LI>an icon from the icons directory located in the <A
- href="../../../examples-guide/diagram/logicExample.html">Logic Example</A>
- plugin, for display in the UI</LI>
- <LI>a localized name, for display in the UI</LI>
- <LI>the name of the Circuit <CODE>EClass</CODE></LI>
- <LI>the fully qualified name of the class that implements the <CODE>IEditHelper</CODE>
- for Circuits</LI>
- <LI>the kind of the <CODE>IElementTypeFactory</CODE> that is used to
- instantiate the Circuit element type</LI>
- <LI>the semanticHint parameter value. The semantic hint is used by the
- <CODE>LogicViewProvider</CODE> to determine if it provides a view for
- that kind of element.</LI>
-</UL>
-<PRE class="snippet">
+ nsURI="http://www.eclipse.org/gmf/examples/runtime/1.0.0/logicsemantic"&gt;
+</pre>
+
+<p>Next, we define a metamodel type for the Circuit metaclass in
+the digital logic ECore model. Inside of the
+<code>&lt;metamodel&gt;</code> element, we declare the Circuit
+metamodel type with the following data:</p>
+
+<ul>
+<li>a unique ID</li>
+
+<li>an icon from the icons directory located in the <a
+href="../../../examples-guide/diagram/logicExample.html">Logic
+Example</a> plugin, for display in the UI</li>
+
+<li>a localized name, for display in the UI</li>
+
+<li>the name of the Circuit <code>EClass</code></li>
+
+<li>the fully qualified name of the class that implements the
+<code>IEditHelper</code> for Circuits</li>
+
+<li>the kind of the <code>IElementTypeFactory</code> that is used
+to instantiate the Circuit element type</li>
+
+<li>the semanticHint parameter value. The semantic hint is used by
+the <code>LogicViewProvider</code> to determine if it provides a
+view for that kind of element.</li>
+</ul>
+
+<pre class="snippet">
&lt;metamodelType
- id=&quot;logic.circuit&quot;
- icon=&quot;icons/circuit16.gif&quot;
- name=&quot;%CircuitTool.Label&quot;
- eclass=&quot;Circuit&quot;
- edithelper=&quot;org.eclipse.gmf.examples.runtime.diagram.logic.internal.edithelpers.CircuitEditHelper&quot;
- kind=&quot;org.eclipse.gmf.runtime.emf.core.internal.util.IHintedType&quot;&gt;
- &lt;param name=&quot;semanticHint&quot; value=&quot;circuit&quot;/&gt;
-&lt;/metamodelType&gt;</PRE>
-<P>The Circuit type name is localized in the plugin.properties
-file:</P>
-<PRE class="snippet">
-CircuitTool.Label = Circuit</PRE>
-<p>
-Next, we implement the edit helper for the Circuit element type. The <CODE>CircuitEditHelper</CODE>
-extends the edit helper for all ContainerElements, since the Circuit EClass extends the ContainerElement EClass. The<CODE> ContainerElementEditHelper</CODE> defines behaviour common to all ContainerElements. The <CODE>CircuitEditHelper</CODE>
-extends this behaviour to configure a new Circuit with its eight terminals.</p>
-<pre class="snippet">public class CircuitEditHelper extends ContainerElementEditHelper {
+ id="logic.circuit"
+ icon="icons/circuit16.gif"
+ name="%CircuitTool.Label"
+ eclass="Circuit"
+ edithelper="org.eclipse.gmf.examples.runtime.diagram.logic.internal.edithelpers.CircuitEditHelper"
+ kind="org.eclipse.gmf.runtime.emf.core.internal.util.IHintedType"&gt;
+ &lt;param name="semanticHint" value="circuit"/&gt;
+&lt;/metamodelType&gt;
+</pre>
+
+<p>The Circuit type name is localized in the plugin.properties
+file:</p>
+
+<pre class="snippet">
+CircuitTool.Label = Circuit
+</pre>
+
+<p>Next, we implement the edit helper for the Circuit element type.
+The <code>CircuitEditHelper</code> extends the edit helper for all
+ContainerElements, since the Circuit EClass extends the
+ContainerElement EClass. The
+<code>ContainerElementEditHelper</code> defines behaviour common to
+all ContainerElements. The <code>CircuitEditHelper</code> extends
+this behaviour to configure a new Circuit with its eight
+terminals.</p>
+
+<pre class="snippet">
+public class CircuitEditHelper extends ContainerElementEditHelper {
/**
* Gets a command to configure a circuit after it has been created.
@@ -133,55 +199,82 @@ extends this behaviour to configure a new Circuit with its eight terminals.</p>
Circuit oCircuit = (Circuit) req.getElementToConfigure();
- createInputOutputTerminal(oCircuit, &quot;A&quot;, progressMonitor); //$NON-NLS-1$
- createInputOutputTerminal(oCircuit, &quot;B&quot;, progressMonitor); //$NON-NLS-1$
- createInputOutputTerminal(oCircuit, &quot;C&quot;, progressMonitor); //$NON-NLS-1$
- createInputOutputTerminal(oCircuit, &quot;D&quot;, progressMonitor); //$NON-NLS-1$
+ createInputOutputTerminal(oCircuit, "A", progressMonitor); //$NON-NLS-1$
+ createInputOutputTerminal(oCircuit, "B", progressMonitor); //$NON-NLS-1$
+ createInputOutputTerminal(oCircuit, "C", progressMonitor); //$NON-NLS-1$
+ createInputOutputTerminal(oCircuit, "D", progressMonitor); //$NON-NLS-1$
- createInputOutputTerminal(oCircuit, &quot;1&quot;, progressMonitor); //$NON-NLS-1$
- createInputOutputTerminal(oCircuit, &quot;2&quot;, progressMonitor); //$NON-NLS-1$
- createInputOutputTerminal(oCircuit, &quot;3&quot;, progressMonitor); //$NON-NLS-1$
- createInputOutputTerminal(oCircuit, &quot;4&quot;, progressMonitor); //$NON-NLS-1$
+ createInputOutputTerminal(oCircuit, "1", progressMonitor); //$NON-NLS-1$
+ createInputOutputTerminal(oCircuit, "2", progressMonitor); //$NON-NLS-1$
+ createInputOutputTerminal(oCircuit, "3", progressMonitor); //$NON-NLS-1$
+ createInputOutputTerminal(oCircuit, "4", progressMonitor); //$NON-NLS-1$
return newOKCommandResult(oCircuit);
}
};
}
-}</pre><h2><a name="live"></a>Specifying a Specialization Type</h2>
-<p class="backto"><font size="-1">[<a href="#top">back to top</a>]</font></p>
+}
+</pre>
+
+<h2><a id="live" name="live"></a>Specifying a Specialization
+Type</h2>
+
+<p class="backto"><font size="-1">[<a href="#top">back to
+top</a>]</font></p>
+
+<p>Creating a specialization type is very similar; the main
+differences are that</p>
-<p>
-Creating a specialization type is very similar; the main differences are that
-</p>
<ul>
- <li>it declares the element type that it specializes</li>
- <LI>it has an edit helper advice that decorates the edit commands returned by the edit helper of the type it specializes</LI>
+<li>it declares the element type that it specializes</li>
+
+<li>it has an edit helper advice that decorates the edit commands
+returned by the edit helper of the type it specializes</li>
</ul>
-<p>
-The following specialization type defines a half adder circuit. The half adder is a digital logic circuit built from two logic gates that adds two one-bit binary numbers and produces two outputs: the sum and the carry. Add this into the same
-<code>&lt;metamodel&gt;</code> element as the previous metamodel type:
-</p>
+
+<p>The following specialization type defines a half adder circuit.
+The half adder is a digital logic circuit built from two logic
+gates that adds two one-bit binary numbers and produces two
+outputs: the sum and the carry. Add this into the same
+<code>&lt;metamodel&gt;</code> element as the previous metamodel
+type:</p>
+
<pre class="snippet">
&lt;specializationType
- id=&quot;logic.halfAdder&quot;
- icon=&quot;icons/halfadder16.gif&quot;
- name=&quot;%HalfAdderTool.Label&quot;
- edithelperadvice=&quot;org.eclipse.gmf.examples.runtime.diagram.logic.internal.edithelpers.HalfAdderAdvice&quot;
- kind=&quot;org.eclipse.gmf.runtime.emf.core.internal.util.IHintedType&quot;&gt;
- &lt;specializes id=&quot;logic.circuit&quot;/&gt;
- &lt;param name=&quot;semanticHint&quot; value=&quot;circuit&quot;/&gt;
-&lt;/specializationType&gt;</pre>
-<p>
-And, of course, the localized string for the name:
-</p>
-<pre class="snippet">
-HalfAdderTool.Label: HalfAdder</pre>
+ id="logic.halfAdder"
+ icon="icons/halfadder16.gif"
+ name="%HalfAdderTool.Label"
+ edithelperadvice="org.eclipse.gmf.examples.runtime.diagram.logic.internal.edithelpers.HalfAdderAdvice"
+ kind="org.eclipse.gmf.runtime.emf.core.internal.util.IHintedType"&gt;
+ &lt;specializes id="logic.circuit"/&gt;
+ &lt;param name="semanticHint" value="circuit"/&gt;
+&lt;/specializationType&gt;
+</pre>
+
+<p>And, of course, the localized string for the name:</p>
-<P>The <CODE>HalfAdderAdvice</CODE> class is responsible for configuring a new circuit element to look like a half adder. The half adder has four terminals; two for the 1-bit binary numbers that it adds (A and B), one for the sum of the two bits (1), and one for the carry (2). Inputs A and B are directed through an XOR gate to produce the sum bit, at the same time also being directed through an AND gate to produce the carry bit.</P>
-<P>Because the Circuit configuration provided by the <CODE>CircuitEditHelper </CODE>creates eight terminals and the half adder has only four terminals, it is easiest in this case configure our half adder by completely replacing the default configuration behaviour for Circuits. We replace the default configuration
-behaviour by setting the <CODE>REPLACE_DEFAULT_EDIT_COMMAND</CODE> to <CODE>TRUE</CODE>.</P>
+<pre class="snippet">
+HalfAdderTool.Label: HalfAdder
+</pre>
+
+<p>The <code>HalfAdderAdvice</code> class is responsible for
+configuring a new circuit element to look like a half adder. The
+half adder has four terminals; two for the 1-bit binary numbers
+that it adds (A and B), one for the sum of the two bits (1), and
+one for the carry (2). Inputs A and B are directed through an XOR
+gate to produce the sum bit, at the same time also being directed
+through an AND gate to produce the carry bit.</p>
+
+<p>Because the Circuit configuration provided by the
+<code>CircuitEditHelper</code> creates eight terminals and the half
+adder has only four terminals, it is easiest in this case configure
+our half adder by completely replacing the default configuration
+behaviour for Circuits. We replace the default configuration
+behaviour by setting the <code>REPLACE_DEFAULT_EDIT_COMMAND</code>
+to <code>TRUE</code>.</p>
-<PRE class="snippet">public class HalfAdderAdvice extends AbstractEditHelperAdvice {
+<pre class="snippet">
+public class HalfAdderAdvice extends AbstractEditHelperAdvice {
protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
@@ -189,7 +282,7 @@ behaviour by setting the <CODE>REPLACE_DEFAULT_EDIT_COMMAND</CODE> to <CODE>TRUE
// configuration.
request.setParameter(IEditCommandRequest.REPLACE_DEFAULT_EDIT_COMMAND,
Boolean.TRUE);
-
+
return new ConfigureLogicElementCommand(request,
SemanticPackage.eINSTANCE.getCircuit()) {
@@ -199,17 +292,17 @@ behaviour by setting the <CODE>REPLACE_DEFAULT_EDIT_COMMAND</CODE> to <CODE>TRUE
// Input two 1-bit binary numbers
InputOutputTerminal a = createInputOutputTerminal(
- circuit, &quot;A&quot;, progressMonitor); //$NON-NLS-1$
+ circuit, "A", progressMonitor); //$NON-NLS-1$
InputOutputTerminal b = createInputOutputTerminal(
- circuit, &quot;B&quot;, progressMonitor); //$NON-NLS-1$
+ circuit, "B", progressMonitor); //$NON-NLS-1$
// Sum of the the two bits
InputOutputTerminal s = createInputOutputTerminal(
- circuit, &quot;1&quot;, progressMonitor); //$NON-NLS-1$
+ circuit, "1", progressMonitor); //$NON-NLS-1$
// Carry
InputOutputTerminal c = createInputOutputTerminal(
- circuit, &quot;2&quot;, progressMonitor); //$NON-NLS-1$
+ circuit, "2", progressMonitor); //$NON-NLS-1$
// The half adder contains an XOR gate and an AND gate
Gate xorGate = createGate(circuit, LogicSemanticType.XORGATE, progressMonitor);
@@ -237,45 +330,63 @@ behaviour by setting the <CODE>REPLACE_DEFAULT_EDIT_COMMAND</CODE> to <CODE>TRUE
}
};
}
-}</PRE><h2><a name="eval"></a>Creating Model Elements</h2>
-<p class="backto"><font size="-1">[<a href="#top">back to top</a>]</font></p>
+}
+</pre>
-<p>
-To see these two new element types in action, we will create context menu items that will create Circuits and Half Adders. We contribute the context menu items to all <CODE>IGraphicalEditPart</CODE>s that adapt to <CODE>ContainerElement</CODE>, using the Eclipse <CODE>popupMenus</CODE> extension point:</p>
-<PRE class="snippet">&lt;extension
- point=&quot;org.eclipse.ui.popupMenus&quot;&gt;
+<h2><a id="eval" name="eval"></a>Creating Model Elements</h2>
+
+<p class="backto"><font size="-1">[<a href="#top">back to
+top</a>]</font></p>
+
+<p>To see these two new element types in action, we will create
+context menu items that will create Circuits and Half Adders. We
+contribute the context menu items to all
+<code>IGraphicalEditPart</code>s that adapt to
+<code>ContainerElement</code>, using the Eclipse
+<code>popupMenus</code> extension point:</p>
+
+<pre class="snippet">
+&lt;extension
+ point="org.eclipse.ui.popupMenus"&gt;
&lt;objectContribution
- id=&quot;LogicContainerElementObjectContribution&quot;
- objectClass=&quot;org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart&quot;&gt;
+ id="LogicContainerElementObjectContribution"
+ objectClass="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"&gt;
&lt;enablement&gt;
- &lt;adapt type=&quot;org.eclipse.emf.ecore.EObject&quot;&gt;
- &lt;instanceof value=&quot;ContainerElement&quot;/&gt;
+ &lt;adapt type="org.eclipse.emf.ecore.EObject"&gt;
+ &lt;instanceof value="ContainerElement"/&gt;
&lt;/adapt&gt;
&lt;/enablement&gt;
&lt;action
- id=&quot;logic.circuit&quot;
- label=&quot;%CreateCircuit.ActionLabel&quot;
- icon=&quot;icons/circuit16.gif&quot;
- menubarPath=&quot;addGroup&quot;
- class=&quot;org.eclipse.gmf.examples.runtime.diagram.logic.internal.actions.CreateLogicElementActionDelegate&quot;
- enablesFor=&quot;1&quot;&gt;
+ id="logic.circuit"
+ label="%CreateCircuit.ActionLabel"
+ icon="icons/circuit16.gif"
+ menubarPath="addGroup"
+ class="org.eclipse.gmf.examples.runtime.diagram.logic.internal.actions.CreateLogicElementActionDelegate"
+ enablesFor="1"&gt;
&lt;/action&gt;
&lt;action
- id=&quot;logic.halfAdder&quot;
- label=&quot;%CreateHalfAdder.ActionLabel&quot;
- icon=&quot;icons/halfadder16.gif&quot;
- menubarPath=&quot;addGroup&quot;
- class=&quot;org.eclipse.gmf.examples.runtime.diagram.logic.internal.actions.CreateLogicElementActionDelegate&quot;
- enablesFor=&quot;1&quot;&gt;
+ id="logic.halfAdder"
+ label="%CreateHalfAdder.ActionLabel"
+ icon="icons/halfadder16.gif"
+ menubarPath="addGroup"
+ class="org.eclipse.gmf.examples.runtime.diagram.logic.internal.actions.CreateLogicElementActionDelegate"
+ enablesFor="1"&gt;
&lt;/action&gt;
&lt;/viewerContribution&gt;
-&lt;/extension&gt;</PRE>
+&lt;/extension&gt;
+</pre>
+
+<p>The ID of each action corresponds to the ID of the element type
+that the action will create. This way, we can use a single action
+delegate to create any kind of logic element.</p>
+<p>Next, we implement the
+<code>CreateLogicElementActionDelegate</code>. It obtains a command
+to create a new logic element from the selected edit part:</p>
-<P>The ID of each action corresponds to the ID of the element type that the action will create. This way, we can use a single action delegate to create any kind of logic element.</P>
-<P>Next, we implement the <CODE>CreateLogicElementActionDelegate</CODE>. It obtains a command to create a new logic element from the selected edit part:</P>
-<PRE class="snippet">public class CreateLogicElementActionDelegate extends AbstractActionDelegate
- implements IObjectActionDelegate {
+<pre class="snippet">
+public class CreateLogicElementActionDelegate extends AbstractActionDelegate
+ implements IObjectActionDelegate {
protected void doRun(IProgressMonitor progressMonitor) {
@@ -285,9 +396,9 @@ To see these two new element types in action, we will create context menu items
if (elementType == null) {
// Problem in the Action contribution XML
- throw new IllegalArgumentException(&quot;Action id '&quot; //$NON-NLS-1$
+ throw new IllegalArgumentException("Action id '" //$NON-NLS-1$
+ actionId
- + &quot;' does not correspond to an existing element type ID.&quot;); //$NON-NLS-1$
+ + "' does not correspond to an existing element type ID."); //$NON-NLS-1$
}
// Get the selected edit part
@@ -296,8 +407,8 @@ To see these two new element types in action, we will create context menu items
if (!(selection instanceof IGraphicalEditPart)) {
// Action enablement criteria expected to prevent this
- throw new IllegalArgumentException(&quot;Selected element '&quot; //$NON-NLS-1$
- + selection + &quot;' is not an IGraphicalEditPart.&quot;); //$NON-NLS-1$
+ throw new IllegalArgumentException("Selected element '" //$NON-NLS-1$
+ + selection + "' is not an IGraphicalEditPart."); //$NON-NLS-1$
}
IGraphicalEditPart container = (IGraphicalEditPart) selection;
@@ -311,8 +422,8 @@ To see these two new element types in action, we will create context menu items
if (command == null || !(command.canExecute())) {
// Action enablement criteria expected to prevent this
- throw new IllegalArgumentException(&quot;Command for '&quot; //$NON-NLS-1$
- + actionId + &quot;' is not executable.&quot;); //$NON-NLS-1$
+ throw new IllegalArgumentException("Command for '" //$NON-NLS-1$
+ + actionId + "' is not executable."); //$NON-NLS-1$
}
// Create the new element
@@ -320,24 +431,35 @@ To see these two new element types in action, we will create context menu items
.getDiagramCommandStack();
commandStack.execute(command);
}
-}</PRE>
+}
+</pre>
+
+<h2><a id="summary" name="summary"></a>Summary</h2>
-<h2><a name="summary"></a>Summary</h2>
-<p class="backto"><font size="-1">[<a href="#top">back to top</a>]</font></p>
+<p class="backto"><font size="-1">[<a href="#top">back to
+top</a>]</font></p>
+
+<p>To illustrate how to implement editing behaviour in using the
+GMF Extensible Type Registry, we</p>
-<p>
-To illustrate how to implement editing behaviour in using the GMF Extensible Type Registry, we
-</p>
<ol>
- <li>Created a metamodel type and its edit helper.</li>
- <li>Created a specialization type and its edit helper advice.</li>
- <li>Added context menu items to create these element types from the diagram.</li>
+<li>Created a metamodel type and its edit helper.</li>
+
+<li>Created a specialization type and its edit helper advice.</li>
+
+<li>Added context menu items to create these element types from the
+diagram.</li>
</ol>
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
+<br />
+<br />
+<hr />
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright
+(c) 2000,2005 IBM Corporation and others. All Rights
+Reserved.</a></p>
+<br />
+<br />
+</body>
</html>
+
diff --git a/doc/org.eclipse.gmf.doc/tutorials/diagram/automaticLayout.html b/doc/org.eclipse.gmf.doc/tutorials/diagram/automaticLayout.html
index 497579028..e8e3a6eb8 100644
--- a/doc/org.eclipse.gmf.doc/tutorials/diagram/automaticLayout.html
+++ b/doc/org.eclipse.gmf.doc/tutorials/diagram/automaticLayout.html
@@ -1,501 +1,196 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml"
-xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
-xmlns="http://www.w3.org/TR/REC-html40">
-
+<!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=iso-8859-1">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 10">
-<meta name=Originator content="Microsoft Word 10">
-<link rel=File-List href="Tutorial_files/filelist.xml">
-<link rel=Edit-Time-Data href="Tutorial_files/editdata.mso">
-<!--[if !mso]>
-<style>
-v\:* {behavior:url(#default#VML);}
-o\:* {behavior:url(#default#VML);}
-w\:* {behavior:url(#default#VML);}
-.shape {behavior:url(#default#VML);}
-</style>
-<![endif]-->
-<title>Tutorial: Automatic Layout</title>
-<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
- name="City"/>
-<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
- name="place"/>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Author>jcorchis</o:Author>
- <o:LastAuthor>jcorchis</o:LastAuthor>
- <o:Revision>7</o:Revision>
- <o:TotalTime>111</o:TotalTime>
- <o:Created>2005-04-21T14:33:00Z</o:Created>
- <o:LastSaved>2005-04-21T18:18:00Z</o:LastSaved>
- <o:Pages>1</o:Pages>
- <o:Words>636</o:Words>
- <o:Characters>3627</o:Characters>
- <o:Company>Rational Software</o:Company>
- <o:Lines>30</o:Lines>
- <o:Paragraphs>8</o:Paragraphs>
- <o:CharactersWithSpaces>4255</o:CharactersWithSpaces>
- <o:Version>10.6735</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:SpellingState>Clean</w:SpellingState>
- <w:GrammarState>Clean</w:GrammarState>
- <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
- </w:WordDocument>
-</xml><![endif]--><!--[if !mso]><object
- classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
-<style>
-st1\:*{behavior:url(#ieooui) }
-</style>
-<![endif]-->
-<link rel=Stylesheet type="text/css" media=all href=technote.css>
-<style>
-<!--
- /* Font Definitions */
- @font-face
- {font-family:Wingdings;
- panose-1:5 0 0 0 0 0 0 0 0 0;
- mso-font-charset:2;
- mso-generic-font-family:auto;
- mso-font-pitch:variable;
- mso-font-signature:0 268435456 0 0 -2147483648 0;}
- /* Style Definitions */
- p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-h1
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:1;
- font-size:24.0pt;
- font-family:"Times New Roman";
- font-weight:bold;}
-h2
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:2;
- font-size:18.0pt;
- font-family:"Times New Roman";
- font-weight:bold;}
-h3
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:3;
- font-size:13.5pt;
- font-style:italic;}
-a:link, span.MsoHyperlink
- {color:blue;
- text-decoration:underline;
- text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
- {color:blue;
- text-decoration:underline;
- text-underline:single;}
-p
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-code
- {font-family:"Courier New";
- mso-ascii-font-family:"Courier New";
- mso-fareast-font-family:"Times New Roman";
- mso-hansi-font-family:"Courier New";
- mso-bidi-font-family:"Courier New";}
-pre
- {margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:24.0pt;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
- font-size:10.0pt;
- font-family:"Courier New";
- mso-fareast-font-family:"Times New Roman";}
-p.notabene, li.notabene, div.notabene
- {mso-style-name:notabene;
- mso-margin-top-alt:auto;
- margin-right:48.0pt;
- mso-margin-bottom-alt:auto;
- margin-left:48.0pt;
- mso-pagination:widow-orphan;
- border:none;
- mso-border-top-alt:solid windowtext .75pt;
- mso-border-bottom-alt:solid windowtext .75pt;
- padding:0in;
- mso-padding-alt:4.0pt 0in 4.0pt 0in;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.question, li.question, div.question
- {mso-style-name:question;
- mso-margin-top-alt:auto;
- margin-right:48.0pt;
- mso-margin-bottom-alt:auto;
- margin-left:48.0pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";
- font-style:italic;}
-p.backto, li.backto, div.backto
- {mso-style-name:backto;
- mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-span.SpellE
- {mso-style-name:"";
- mso-spl-e:yes;}
-span.GramE
- {mso-style-name:"";
- mso-gram-e:yes;}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:35.4pt;
- mso-footer-margin:35.4pt;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
- /* List Definitions */
- @list l0
- {mso-list-id:1754820217;
- mso-list-template-ids:-806848416;}
-@list l0:level1
- {mso-level-number-format:bullet;
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Symbol;}
-ol
- {margin-bottom:0in;}
-ul
- {margin-bottom:0in;}
--->
-</style>
-<!--[if gte mso 10]>
-<style>
- /* Style Definitions */
- table.MsoNormalTable
- {mso-style-name:"Table Normal";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-noshow:yes;
- mso-style-parent:"";
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;}
-</style>
-<![endif]-->
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<title></title>
</head>
+<body>
+<p><img src="../../logo.gif" /></p>
+
+<h1>Tutorial: Modifying a container to support automatic
+layout</h1>
+
+<table border="0">
+<tr>
+<td>
+<p>Version: 0.1</p>
+</td>
+<td>
+<p>Date: August 11, 2005</p>
+</td>
+</tr>
+</table>
-<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
+<h2>Contents</h2>
-<div class=Section1>
+<p>&middot; <a href="#_Overview">Overview</a></p>
-<p class=MsoNormal><img id="_x0000_i1025"
-src="../../logo.gif"></p>
+<p>&middot; <a href="#_References">References</a></p>
+
+<p>&middot; <a href="#_Introduction">Introduction</a><br />
+ &middot; <a href="#automaticLayout">Modifying a container to
+support automatic layout</a></p>
+
+<p>&middot; <a href="#summary">Summary</a></p>
+
+<h2><a id="_Overview" name="_Overview"></a>Overview</h2>
+
+<p>[<a href="#top">back to top</a>]</p>
+
+<p>This tutorial provides the reader with the steps to initializing
+a container that can automatically layout it's children accordingly
+to a specific hseuristic.</p>
-<h1 align=center style='text-align:center'>Tutorial: Modifying a container to support automatic layout</h1>
+<h2><a id="_References" name="_References"></a>References</h2>
+
+<p>[<a href="#top">back to top</a>]</p>
-<table class=MsoNormalTable border=0 cellspacing=8 cellpadding=0
- style='mso-cellspacing:6.0pt;margin-left:24.0pt'>
- <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'>
- <td style='padding:.75pt .75pt .75pt .75pt'>
- <p class=MsoNormal>Version: 0.1</p>
- </td>
- <td style='padding:.75pt .75pt .75pt .75pt'>
- <p class=MsoNormal>Date: August 11, 2005</p>
- </td>
- </tr>
-</table>
+<p>This tutorial references the following tutoral:<br />
+<br />
+ <a href="createShape.html">Create a shape</a></p>
-<h2>Contents</h2>
+<h2><a id="_Introduction"
+name="_Introduction"></a>Introduction</h2>
+
+<p>[<a href="#top">back to top</a>]</p>
+
+<p>In this tutorial, we will use the Logic Diagram Example to
+illustrate how to initialize the logic flow container to layout
+it's children by utilizing a flow layout. To gain familiarity with
+the Logic Diagram Example, refer to the <a
+href="../../examples-guide/diagram/logicExample.htm">Logic Example
+Guide</a>.</p>
+
+<h2><a id="automaticLayout" name="automaticLayout">Modifying a
+container to support automatic layout</a><br />
+ [<a href="#top">back to top</a>]</h2>
+
+<p>Layout is usually managed by the user through explicit movement
+of diagram shapes inside the container.&nbsp; Sometimes, it is more
+convenient to have a managed layout that automatically places
+shapes based on an algorithm.&nbsp; In the Logic example, the Flow
+container shape is an example of this.&nbsp; Logic elements placed
+inside the flow container are automatically positioned relative to
+the other elements.&nbsp; To do this we need to override some
+default behavior that container shapes in exhibit.</p>
+
+<h3><a id="_Toc104273264" name="_Toc104273264">Example: Flow
+Container Shape displaying automatic layout containment</a><br />
+ <img width="236" height="188" src="flowContainer.gif" /><br />
+</h3>
+
+<p>By default the XYLayoutEditPolicy is installed on a shape
+container that allows for specific placement of elements with-in
+the container.&nbsp; If you wish to have a more managed layout that
+automatically positions elements, then a different layout edit
+policy would need to be installed.&nbsp; In this example, we are
+interested in installed a directed flow layout such that the
+elements positions are automatically placed in a flow chart like
+manner.</p>
+
+<h3><a id="_Toc104273265" name="_Toc104273265">Add entries to the
+contribution for the palette provider for the flow container
+shape</a></h3>
+
+<p>See <a href="createShape.html#palette"><a
+href="createShape.html#palette">#Add entries to the contribution
+for the palette provider.</a></a></p>
+
+<h3><a id="_Toc104273267" name="_Toc104273267">Add new View
+provider entry for the flow container shape</a></h3>
+
+<p>This is very similar to the Circuit shape view provider in that
+a sub-container view is created to contain the children.</p>
+
+<p>See <a href="createShape.html#notation">#Add new View provider
+entry for the Circuit shape</a></p>
+
+<h3><a id="_Toc104273268" name="_Toc104273268">Add new EditPart
+provider entry for the flow container shape</a></h3>
+
+<p>A custom EditPart is necessary to handle the unique
+functionality of the Logic Flow container (See <a
+href="createShape.html#editpart">#Add new EditPart provider
+entry</a>). Since the layout of the children is handled uniquely
+(i.e. managed), a new layout EditPolicy needs to be installed on
+the container compartment.&nbsp; This EditPolicy is called the
+?LogicFlowEditPolicy? and it will automatically layout the shapes
+in a grid fashion. LogicFlowEditPolicy? is needed since flow
+container uses ?FlowLayout? to arrange components. Make
+?LogicFlowEditPolicy? inherit from
+?FlowLayoutEditPolicy?.&nbsp;</p>
+
+<p>The ?LogicFlowCompartmentEditPart? inherits from
+?ListCompartmentEditPart? instead of ?ShapeCompartmentEditPart?.
+The reason is that the latter assumes that the layout is going to
+be manipulated by the user (i.e. XYLayoutEditPolicy) instead of
+managed by the container.&nbsp; ?ListCompartmentEditPart? is
+lightweight and doesn?t make any such assumptions. In the
+?LogicFlowCompartmentEditPart, the ?createFigure? method was
+overridden to allow automatic positioning of the children properly
+by setting the layout manager as ?FlowLayout?.&nbsp; It was also
+necessary to overwrite the abstract method
+?hasModelChildrenChanged? from ListCompartmentEditPart in
+?LogicFlowCompartmentEditPart? since there is no canonical
+reflection of the underlying semantic elements inside the
+container.</p>
+
+<p>In LogicFlowCompartmentEditPart:</p>
+
+<p><i></i></p>
+
+<p>/**</p>
+
+<p>&nbsp;* @see
+org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()</p>
+
+<p>&nbsp;*/</p>
+
+<p>public IFigure createFigure() {</p>
+
+<p>ResizableCompartmentFigure rcf = (ResizableCompartmentFigure)
+super.createFigure();</p>
+
+<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FlowLayout layout = new
+FlowLayout();</p>
+
+<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+layout.setMajorSpacing(MapMode.DPtoLP(5));</p>
+
+<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+layout.setMinorSpacing(MapMode.DPtoLP(5));</p>
+
+<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+rcf.getContentPane().setLayoutManager(layout);</p>
+
+<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return rcf;</p>
+
+<p>}</p>
+
+<h3><a id="_Toc104273269" name="_Toc104273269">Example Logic Flow
+Container structure:</a><br />
+ <img width="623" height="614" src="flowStructure.gif" /></h3>
+
+<h2><a id="summary" name="summary">Summary</a></h2>
+
+<p>[<a href="#top">back to top</a>]</p>
+
+<p>In this tutorial, we did the following:</p>
+
+<ol>
+<li>Initialized the flow container class to support a custom layout
+type that automatically laid-out it's children.</li>
+</ol>
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_Overview">Overview</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_References">References</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_Introduction">Introduction</a><BR>
-<![if !supportLists]><SPAN
- style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol"><SPAN
- style="mso-list:Ignore">·<SPAN style='font:7.0pt "Times New Roman"'> </SPAN></SPAN></SPAN><![endif]><A
- href="#automaticLayout">Modifying a container to support automatic
-layout</A>
-</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
- href="#summary">Summary</a></p>
-
-<div class=MsoNormal align=center style='text-align:center'>
-
-<hr size=2 width="100%" align=center></div>
-
-<h2><a name="_Overview"></a>Overview</h2>
-
-<p class=backto><span style='font-size:10.0pt'>[<a href="#top"><span
-class=GramE>back</span> to top</a>]</span></p>
-
-<p>This tutorial provides the reader with the steps to initializing a container that can automatically layout it's children accordingly to a specific hseuristic. </p>
-
-<h2><a name="_References"></a>References</h2>
-
-<p class=backto><span style='font-size:10.0pt'>[<a href="#top"><span
-class=GramE>back</span> to top</a>]</span></p><p>
-
-This tutorial references the following tutoral:<BR>
-<BR>
-<A href="createShape.html">Create a shape</A>
-</p>
-
-<h2><a name="_Introduction"></a>Introduction</h2>
-
-<p class=backto><span style='font-size:10.0pt'>[<a href="#top"><span
-class=GramE>back</span> to top</a>]</span></p>
-
-<p>In this tutorial, we will use the Logic Diagram Example to illustrate how to initialize the logic flow container to layout it's children by utilizing a flow layout. To gain familiarity with the Logic Diagram Example, refer to the <A
- href="../../examples-guide/diagram/logicExample.htm">Logic Example
-Guide</A>. </p>
-<H2><A name="automaticLayout">Modifying a container to support automatic
-layout</A><BR>
-<SPAN style="font-size:10.0pt">[<A href="#top"><SPAN class="GramE">back</SPAN>
-to top</A>]</SPAN>
-</H2>
-
-<P class="MsoNormal" style="margin-left:.5in">Layout is usually managed
-by the user through explicit movement of diagram shapes inside the
-container.<SPAN style="mso-spacerun:yes">  </SPAN>Sometimes, it is more
-convenient to have a managed layout that automatically places shapes
-based on an algorithm.<SPAN style="mso-spacerun:yes">  </SPAN>In the
-Logic example, the Flow container shape is an example of this.<SPAN
- style="mso-spacerun:yes">  </SPAN>Logic elements placed inside the flow
-container are automatically positioned relative to the other elements.<SPAN
- style="mso-spacerun:yes">  </SPAN>To do this we need to override some
-default behavior that container shapes in exhibit.</P>
-
-<P class="MsoNormal" style="margin-left:.5in"></P>
-
-<H3><A name="_Toc104273264">Example:
-Flow Container Shape displaying automatic layout containment</A><BR>
-<IMG border="0" width="236" height="188" src="flowContainer.gif"
- v:shapes="_x0000_i1032">
-<BR>
-</H3>
-<P>By default the XYLayoutEditPolicy is installed on a shape container
-that allows for specific placement of elements with-in the container.<SPAN
- style="mso-spacerun:yes">  </SPAN>If you wish to have a more managed
-layout that automatically positions elements, then a different layout
-edit policy would need to be installed.<SPAN style="mso-spacerun:yes"> 
-</SPAN>In this example, we are interested in installed a directed flow
-layout such that the elements positions are automatically placed in a
-flow chart like manner.</P>
-<P class="MsoNormal" style="margin-left:.5in"><o:p>&nbsp;</o:p></P>
-
-<H3><A name="_Toc104273265">Add
-entries to the contribution for the palette provider for the flow
-container shape</A></H3>
-
-<P class="MsoNormal" style="margin-left:.5in">See<A
- href="createShape.html#palette"> <A href="createShape.html#palette">#Add
-entries to the contribution for the palette provider.</A></A></P>
-
-<P class="MsoNormal" style="margin-left:.5in"></P><P class="MsoNormal" style="margin-left:.5in"></P>
-
-<H3><A name="_Toc104273267">Add
-new View provider entry for the flow container shape</A></H3>
-
-<P class="MsoNormal" style="margin-left:.5in">This is very similar to
-the Circuit shape view provider in that a sub-container view is created
-to contain the children.</P>
-
-<P class="MsoNormal" style="margin-left:.5in">See <A
- href="createShape.html#notation">#Add new View provider entry for the
-Circuit shape</A></P>
-
-<P class="MsoNormal" style="margin-left:.5in"></P>
-
-<H3><A name="_Toc104273268">Add
-new EditPart provider entry for the flow container shape</A></H3>
-
-<P class="MsoNormal" style="margin-left:.5in">A custom EditPart is
-necessary to handle the unique functionality of the Logic Flow container
-(See <A href="createShape.html#editpart">#Add new EditPart provider
-entry</A>). Since the layout of the children is handled
-uniquely (i.e. managed), a new layout EditPolicy needs to be installed
-on the container compartment.<SPAN style="mso-spacerun:yes">  </SPAN>This
-EditPolicy is called the ?LogicFlowEditPolicy? and it <SPAN
- class="GramE">will</SPAN> automatically layout the shapes in a grid
-fashion. LogicFlowEditPolicy? is needed since flow container uses
-?FlowLayout? to arrange components. Make ?LogicFlowEditPolicy? inherit
-from ?FlowLayoutEditPolicy?.<SPAN style="mso-spacerun:yes">  </SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><o:p>&nbsp;</o:p></P>
-
-<P class="MsoNormal" style="margin-left:.5in">The
-?LogicFlowCompartmentEditPart? inherits from ?ListCompartmentEditPart?
-instead of ?ShapeCompartmentEditPart?. The reason is that the latter
-assumes that the layout is going to be manipulated by the user (i.e.
-XYLayoutEditPolicy) instead of managed by the container.<SPAN
- style="mso-spacerun:yes">  </SPAN>?ListCompartmentEditPart? is
-lightweight and doesn?t make any such assumptions. <SPAN class="GramE">In
-the ?LogicFlowCompartmentEditPart, the ?createFigure? method was
-overridden to allow automatic positioning of the children properly by
-setting the layout manager as ?FlowLayout?.</SPAN><SPAN
- style="mso-spacerun:yes">  </SPAN>It was also necessary to overwrite
-the abstract method ?hasModelChildrenChanged? from
-ListCompartmentEditPart in ?LogicFlowCompartmentEditPart? since there is
-no canonical reflection of the underlying semantic elements inside the
-container.</P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN style="color:black"><o:p>&nbsp;</o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN style="color:black">In
-LogicFlowCompartmentEditPart:<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><I
- style="mso-bidi-font-style:normal"><SPAN style="color:black"><o:p>&nbsp;</o:p></SPAN></I></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New"'>/**<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New"'><SPAN
- style="mso-spacerun:yes"> </SPAN>* @see
-org.eclipse.gef.editparts.AbstractGraphicalEditPart#<SPAN class="GramE">createFigure()</SPAN><o:p></o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New"'><SPAN
- style="mso-spacerun:yes"> </SPAN>*/<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN class="GramE"><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'>public</SPAN></SPAN><SPAN
- style='font-size:8.0pt;font-family:"Courier New"'> IFigure
-createFigure() {<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:1.0in"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New"'>ResizableCompartmentFigure
-rcf = (ResizableCompartmentFigure) <SPAN class="GramE">super.createFigure(</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN>FlowLayout layout = new <SPAN
- class="GramE">FlowLayout(</SPAN>);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="GramE">layout.setMajorSpacing(</SPAN>MapMode.DPtoLP(5));<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="GramE">layout.setMinorSpacing(</SPAN>MapMode.DPtoLP(5));<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="GramE">rcf.getContentPane(</SPAN>).setLayoutManager(layout);<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New"'><SPAN
- style="mso-tab-count:1">       </SPAN><SPAN class="GramE">return</SPAN>
-rcf;<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><SPAN
- style='font-size:8.0pt;
-font-family:"Courier New"'>}<o:p></o:p></SPAN></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><o:p>&nbsp;</o:p></P>
-
-<P class="MsoNormal" style="margin-left:.5in"><o:p>&nbsp;</o:p></P>
-
-<H3><A name="_Toc104273269">Example
-Logic Flow Container structure:</A><BR>
-<IMG border="0" width="623" height="614" src="flowStructure.gif"
- v:shapes="_x0000_i1033">
-</H3><P class="MsoNormal"></P>
-
-<P class="MsoNormal"></P><div class=MsoNormal align=center style='text-align:center'>
-
-<hr size=2 width="100%" align=center>
-
-</div>
-
-<h2><A name="summary">Summary</A></h2>
-
-<p><span style='font-size:10.0pt'>[<a href="#top"><span class=GramE>back</span>
-to top</a>]</span></p>
-
-<P>In this tutorial, we did the following:</P>
-<OL>
- <LI>Initialized the flow container class to support a custom layout type that automatically laid-out it's children.</LI></OL>
-
-
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
-
-</div>
+<br />
+<br />
+<p><a href="http://www.eclipse.org/legal/epl-v10.html">Copyright
+(c) 2000,2005 IBM Corporation and others. All Rights
+Reserved.</a></p>
+<br />
+ <br />
</body>
+</html>
-</html> \ No newline at end of file
diff --git a/doc/org.eclipse.gmf.doc/tutorials/diagram/connectionCreationAssistantTutorial.html b/doc/org.eclipse.gmf.doc/tutorials/diagram/connectionCreationAssistantTutorial.html
index 552a314f0..245267c0e 100644
--- a/doc/org.eclipse.gmf.doc/tutorials/diagram/connectionCreationAssistantTutorial.html
+++ b/doc/org.eclipse.gmf.doc/tutorials/diagram/connectionCreationAssistantTutorial.html
@@ -1,672 +1,470 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml"
-xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
-xmlns="http://www.w3.org/TR/REC-html40">
-
+<!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=iso-8859-1">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 10">
-<meta name=Originator content="Microsoft Word 10">
-<link rel=File-List href="Tutorial_files/filelist.xml">
-<link rel=Edit-Time-Data href="Tutorial_files/editdata.mso">
-<!--[if !mso]>
-<style>
-v\:* {behavior:url(#default#VML);}
-o\:* {behavior:url(#default#VML);}
-w\:* {behavior:url(#default#VML);}
-.shape {behavior:url(#default#VML);}
-</style>
-<![endif]-->
-<title>Tutorial: Connection Creation Assistants</title>
-<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
- name="City"/>
-<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
- name="place"/>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Author>jcorchis</o:Author>
- <o:LastAuthor>jcorchis</o:LastAuthor>
- <o:Revision>7</o:Revision>
- <o:TotalTime>111</o:TotalTime>
- <o:Created>2005-04-21T14:33:00Z</o:Created>
- <o:LastSaved>2005-04-21T18:18:00Z</o:LastSaved>
- <o:Pages>1</o:Pages>
- <o:Words>636</o:Words>
- <o:Characters>3627</o:Characters>
- <o:Company>Rational Software</o:Company>
- <o:Lines>30</o:Lines>
- <o:Paragraphs>8</o:Paragraphs>
- <o:CharactersWithSpaces>4255</o:CharactersWithSpaces>
- <o:Version>10.6735</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:SpellingState>Clean</w:SpellingState>
- <w:GrammarState>Clean</w:GrammarState>
- <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
- </w:WordDocument>
-</xml><![endif]--><!--[if !mso]><object
- classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
-<style>
-st1\:*{behavior:url(#ieooui) }
-</style>
-<![endif]-->
-<link rel=Stylesheet type="text/css" media=all href=technote.css>
-<style>
-<!--
- /* Font Definitions */
- @font-face
- {font-family:Wingdings;
- panose-1:5 0 0 0 0 0 0 0 0 0;
- mso-font-charset:2;
- mso-generic-font-family:auto;
- mso-font-pitch:variable;
- mso-font-signature:0 268435456 0 0 -2147483648 0;}
- /* Style Definitions */
- p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-h1
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:1;
- font-size:24.0pt;
- font-family:"Times New Roman";
- font-weight:bold;}
-h2
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:2;
- font-size:18.0pt;
- font-family:"Times New Roman";
- font-weight:bold;}
-h3
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:3;
- font-size:13.5pt;
- font-style:italic;}
-a:link, span.MsoHyperlink
- {color:blue;
- text-decoration:underline;
- text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
- {color:blue;
- text-decoration:underline;
- text-underline:single;}
-p
- {mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-code
- {font-family:"Courier New";
- mso-ascii-font-family:"Courier New";
- mso-fareast-font-family:"Times New Roman";
- mso-hansi-font-family:"Courier New";
- mso-bidi-font-family:"Courier New";}
-pre
- {margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:24.0pt;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
- font-size:10.0pt;
- font-family:"Courier New";
- mso-fareast-font-family:"Times New Roman";}
-p.notabene, li.notabene, div.notabene
- {mso-style-name:notabene;
- mso-margin-top-alt:auto;
- margin-right:48.0pt;
- mso-margin-bottom-alt:auto;
- margin-left:48.0pt;
- mso-pagination:widow-orphan;
- border:none;
- mso-border-top-alt:solid windowtext .75pt;
- mso-border-bottom-alt:solid windowtext .75pt;
- padding:0in;
- mso-padding-alt:4.0pt 0in 4.0pt 0in;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.question, li.question, div.question
- {mso-style-name:question;
- mso-margin-top-alt:auto;
- margin-right:48.0pt;
- mso-margin-bottom-alt:auto;
- margin-left:48.0pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";
- font-style:italic;}
-p.backto, li.backto, div.backto
- {mso-style-name:backto;
- mso-margin-top-alt:auto;
- margin-right:0in;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-span.SpellE
- {mso-style-name:"";
- mso-spl-e:yes;}
-span.GramE
- {mso-style-name:"";
- mso-gram-e:yes;}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:35.4pt;
- mso-footer-margin:35.4pt;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
- /* List Definitions */
- @list l0
- {mso-list-id:1754820217;
- mso-list-template-ids:-806848416;}
-@list l0:level1
- {mso-level-number-format:bullet;
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Symbol;}
-ol
- {margin-bottom:0in;}
-ul
- {margin-bottom:0in;}
--->
-</style>
-<!--[if gte mso 10]>
-<style>
- /* Style Definitions */
- table.MsoNormalTable
- {mso-style-name:"Table Normal";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-noshow:yes;
- mso-style-parent:"";
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;}
-</style>
-<![endif]-->
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<title></title>
</head>
+<body>
+<p><img src="../../logo.gif" /></p>
+
+<h1>Tutorial: Connection Creation Assistants</h1>
+
+<table border="0">
+<tr>
+<td>
+<p>Version: 1.0</p>
+</td>
+<td>
+<p>Date: January 11, 2006</p>
+</td>
+</tr>
+</table>
-<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
+<h2>Contents</h2>
-<div class=Section1>
+<p>&middot; <a href="#_Overview">Overview</a></p>
-<p class=MsoNormal><img id="_x0000_i1025"
-src="../../logo.gif"></p>
+<p>&middot; <a href="#_References">References</a></p>
-<h1 align=center style='text-align:center'>Tutorial: Connection Creation Assistants</h1>
+<p>&middot; <a href="#_Introduction">Introduction</a></p>
-<table class=MsoNormalTable border=0 cellspacing=8 cellpadding=0
- style='mso-cellspacing:6.0pt;margin-left:24.0pt'>
- <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'>
- <td style='padding:.75pt .75pt .75pt .75pt'>
- <p class=MsoNormal>Version: 1.0</p>
- </td>
- <td style='padding:.75pt .75pt .75pt .75pt'>
- <p class=MsoNormal>Date: January 11, 2006</p>
- </td>
- </tr>
-</table>
+<p>&middot; <a
+href="#_CreatingTheModelingAssistantProvider">Creating the Modeling
+Assistant Provider</a></p>
-<h2>Contents</h2>
+<p>&middot; <a href="#_ConnectionHandles">Adding Support for
+Connection Creation with Connection Handles</a></p>
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_Overview">Overview</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_References">References</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_Introduction">Introduction</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_CreatingTheModelingAssistantProvider">Creating the Modeling Assistant Provider</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_ConnectionHandles">Adding Support for Connection Creation with Connection Handles</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_ConnectionCreationToUnspecified">Adding Support for Connection Creation to an Unspecified Source or
+<p>&middot; <a href="#_ConnectionCreationToUnspecified">Adding
+Support for Connection Creation to an Unspecified Source or
Target</a></p>
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_SelectingAnExistingElement">Adding Support for Selecting an Existing Element as the Source or Target</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_ShowingRelatedElements">Adding Support for Showing Related Elements with the Connection Handles</a></p>
-
-<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
-margin-left:48.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
-style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
-mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><a
-href="#_Summary">Summary</a></p>
-
-<div class=MsoNormal align=center style='text-align:center'>
-
-<hr size=2 width="100%" align=center></div>
-
-<h2><a name="_Overview"></a>Overview</h2>
-
-<p class=backto><span style='font-size:10.0pt'>[<a href="#top"><span
-class=GramE>back</span> to top</a>]</span></p>
-
-<p>This tutorial provides the reader with the steps required to contribute to options available on the connection handle popups and to support connnection completion to an unknown source or target.</p>
-
-<h2><a name="_References"></a>References</h2>
-
-<p class=backto><span style='font-size:10.0pt'>[<a href="#top"><span
-class=GramE>back</span> to top</a>]</span></p>
-<P class="backto"><BR>
-This tutorial references the following extension point:</P>
-<DIV
- style="border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:48.0pt;margin-right:24.0pt"><PRE
- style="margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt"><SPAN
- class="GramE"><SPAN style="color:navy">
-org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders</SPAN></SPAN></PRE></DIV>
-<P>More information about this extension point can be found in the SDK
-documentation.<BR>
-<BR>This tutorial assumes the connections and shapes to be created can already be created via a palette tool if such a tool existed. For more information about supporting the creation of a shape and connector see the following tutorials:
-</P>
-<UL>
- <LI><A href="createShape.html">Creating a Shape</A></LI>
- <LI><A href="createConnection.html">Creating a Connection</A></LI>
-
-</UL>
-<BR>This tutorial uses the Geoshapes Example
-
-
-whose guide is available here: <A
- href="../../examples-guide/diagram/logicExample.html"> Geometric Shapes
-Example Guide</A>.<BR>
-<h2><a name="_Introduction"></a>Introduction</h2>
-
-<p class=backto><span style='font-size:10.0pt'>[<a href="#top"><span
-class=GramE>back</span> to top</a>]</span></p>
-The connection assistant mechanisms to be described make it easier for a user to create connections than the traditional palette approach. These gestures require less mouse movement and mouse clicks from the user. They can also provide contextual specific suggestions as to what type of connection the user may wish to create.<BR>
-<BR>
-This tutorial will discuss two connection assistant mechanisms:
-<OL>
- <LI>Connection Handles
- </LI>
- <LI>Connection Completion to an Unspecified Target or Source</LI>
-
-
- </OL>
-<BR>
-<B>1. Connection Handles</B><BR>
-<BR>
-<B>Use Case:</B><BR>
-<BR>The connection handles appear when hovering over a shape.<BR>
-<IMG border="0" src="connectionHandles1.jpg" width="155" height="81" align="middle"><BR>
-The user selects the incoming or outgoing connection handle and drags the connection to another shape. Upon release of the mouse button, a popup appears listing the possible connection typess that can be created from which the user may select one.<BR>
-<IMG border="0" src="connectionHandles2.jpg" width="444" height="111" align="middle"><BR>
-<B>Benefits:</B>
-<UL>
- <LI>The user does not have to go back and forth to the palette to
- create connections.</LI>
- <LI>The user can create a connection from source to target or from
- target to source depending on what is most convenient based on their
- current focus in the diagram.</LI>
- <LI>The diagram application can list the suggested or most common
- connection types to be created based on the source and target thus
- assisting the user in narrowing down the many choices often available
- on the palette.</LI>
-
-</UL>
-<BR>
-<B>2. Connection Completion to an Unspecified Target or Source </B><BR>
-<BR>
-<B>Use Case</B>:<BR>
-<BR>
-The user begins a connection at the source or target shape using either a connection handle or a palette connection tool. The user releases the mouse button on empty diagram space and is presented with the option to create a new element for the shape on the other end of the connection or to use an existing element for this shape.<BR>
-<IMG
- border="0" src="outgoingUnspecified.jpg" width="610" height="304" align="middle"><BR>
-<BR>
-<B>Benefits:</B>
-<UL>
- <LI>The user can create a connection to a shape not on the diagram in one step.</LI>
-</UL>
-<BR>
-We will use the Geometric Shapes Example to illustrate
-how to contribute to the popups when using the connection handles or upon connection completion to an unspecified target or source. To gain familiarity with the
-Geometric Shapes Example, refer to the <A
- href="../../examples-guide/diagram/logicExample.html"> Geometric Shapes
-Example Guide</A>.<BR><H2><a name="_CreatingTheModelingAssistantProvider"></a>Creating the Modeling Assistant Provider</H2>
-
-<P class="backto"><SPAN style="font-size:10.0pt">[<A href="#top"><SPAN
- class="GramE">back</SPAN> to top</A>]</SPAN></P>
-The Modeling Assistant service is queried to get the list of connection types and shape types when creation connections to an unspecified source or target or when using the connection handles. Therefore, the first step is to create a Modeling Assistant provider. If your plug-in already has a Modeling Assistant provider for another reason, then the same provider can be used.<BR>
-<BR>
-Create the Modeling Assistant provider class. The abstract <FONT
- color="navy">ModelingAssistantProvider</FONT> provides stubs for the methods in the <FONT
- color="navy">IModelingAssistantProvider</FONT> so that each method need not be implemented.<BR>
-<IMG border="0" src="modelingAssistantProvider.jpg" width="429"
- height="366" align="middle"><BR><BR>
-Create an extension of the <SPAN class="GramE"><SPAN style="color:navy">org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders</SPAN></SPAN> extension point.<BR>
-<BR>
-<DIV
- style="border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:48.0pt;margin-right:24.0pt"><PRE
- style="margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt"><SPAN
- class="GramE"><SPAN style="color:navy">&lt;extension
- id=&quot;GeoshapeModelingAssistantProvider&quot;
- name=&quot;%ext.modelingAssistantProvider&quot;
- point=&quot;org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders&quot;&gt;
- &lt;modelingAssistantProvider class=&quot;org.eclipse.gmf.runtime.diagram.ui.geoshapes.internal.providers.GeoshapeModelingAssistantProvider&quot;&gt;
- &lt;Priority name=&quot;Lowest&quot;/&gt;
- &lt;object
- class=&quot;org.eclipse.gmf.runtime.diagram.ui.geoshapes.internal.editparts.GeoShapeEditPart(org.eclipse.gmf.runtime.diagram.ui.geoshapes)&quot;
- id=&quot;GEOSHAPE&quot;&gt;
- &lt;/object&gt;
- &lt;context
- elements=&quot;GEOSHAPE&quot;&gt;
- &lt;/context&gt;
- &lt;/modelingAssistantProvider&gt;
-&lt;/extension&gt;</SPAN></SPAN></PRE></DIV>
-<BR>Here is a brief description of the attributes in the modelingAssistantProvider extension point:<TABLE border="1">
- <TBODY>
- <TR>
- <TD>class</TD>
- <TD>The modeling assistant provider class that has been created.</TD>
- </TR>
- <TR>
- <TD>priority</TD>
- <TD>The priority of this modeling assistant provider. The Modeling Assistant Service collects a list of types from all providers in order of highest priority to lowest priority.</TD>
- </TR>
- <TR>
- <TD>object definition</TD>
- <TD>Defines an object that will be used to describe the shapes that this provider is interested in providing for. In this example, we are defining a geoshape.</TD>
- </TR>
- <TR>
- <TD>context</TD>
- <TD>Lists the elements defined above by their id to indicate that this provider wishes to provide for these types.</TD>
- </TR>
- </TBODY>
-</TABLE>
-<BR>
-For more information, see the extension point documentation:
-
-<A
- href="../../reference/extension-points/org_eclipse_gmf_runtime_emf_ui_modelingAssistantProviders.html">org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders</A>
-<H2><a name="_ConnectionHandles"></a>Adding Support for Connection Creation with Connection Handles</H2>
-<P class="backto"><SPAN style="font-size:10.0pt">[<A href="#top"><SPAN
- class="GramE">back</SPAN> to top</A>]</SPAN><BR>
-<BR>The <FONT color="navy">getRelTypesOnSourceAndTarget()</FONT> method determines which connection types can be created between a given source and target when using the connection handles.<BR>
-<BR>
-<IMG border="0" src="connectionHandles2.jpg" width="444" height="111"> <BR>The <FONT color="navy">getRelTypesOnSource()</FONT> method determines which connection types can be created between a given source and an unspecified target shape using the outgoing connection handle. <BR>
-<BR>
-This method is also needed to make the outgoing connection handle support connection creation when the <FONT
- color="navy">getRelTypesOnSourceAndTarget()</FONT> method is being implemented. That is, if there are no providers that return types in the <FONT
- color="navy">getRelTypesOnSource()</FONT> method for a given source, then the outgoing connection handle will not support connection creation and may not even appear on that shape.<BR><IMG border="0" src="incomingUnspecifiedConnections.jpg" width="587"
- height="265">
-<BR>
-Similarly, the <FONT color="navy">getRelTypesOnTarget()</FONT> method determines which connection types can be created between a given target and an unspecified source shape using the incoming connection handle and determines if the incoming connection handle should support connection creation.<BR>
-<BR>
-The code for the geoshapes example is quite simple. Since the line connection type is bidirectional the result will be the same when creating lines using the incoming or outgoing connection handle. If the desired behavior was for only the outgoing connection handle to appear, then <FONT
- color="navy">getRelTypesOnTarget()</FONT> would not be overridden.<BR>
-</P>
-<DIV
- style="border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:48.0pt;margin-right:24.0pt"><PRE
- style="margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt"><FONT
- color="navy">public boolean provides(IOperation operation) {
- if (operation instanceof GetRelTypesOnSourceOperation
- || operation instanceof GetRelTypesOnTargetOperation
- || operation instanceof GetRelTypesOnSourceAndTargetOperation) {
- return super.provides(operation);
- }
- return false;
-}
-
-public List </FONT><FONT color="red">getRelTypesOnSource</FONT><FONT
- color="navy">(IAdaptable source) {
- return Collections.singletonList(GeoshapeType.LINE);
-}
-
-public List </FONT><FONT color="red">getRelTypesOnTarget</FONT><FONT
- color="navy">(IAdaptable target) {
- return Collections.singletonList(GeoshapeType.LINE);
-}
-
-public List </FONT><FONT color="red">getRelTypesOnSourceAndTarget</FONT><FONT
- color="navy">(IAdaptable source, IAdaptable target) {
- return Collections.singletonList(GeoshapeType.LINE);
-}</FONT></PRE></DIV>
-<P class="backto"><SPAN style="font-size:10.0pt"></SPAN><BR>
-<B>Notes:</B></P>
-<UL>
- <LI>When showing the connection handles, the Modeling Assistant service asks all providers to contribute to the list of types that appear in the connection handle popups. In the case of the Geoshapes example, the &quot;Line&quot; type is contributed by the <FONT
- color="navy">GeoshapeModelingAssistantProvider</FONT> and the &quot;Note Attachment&quot; type is contributed by the <FONT
- color="navy">DiagramModelingAssistantProvider</FONT>.</LI>
- <LI>Prior to showing the popup menus, each type is tested to see if it possible to create the connection between the source and target. If it is not possible to create the connection then that type will not appear on the popup. For example, if it was impossible to create a line between a geoshape circle and a cylinder, then even though line is being contributed to the connection handle popup between a circle and a cylinder it would not appear as an option for the user to choose. This avoids having to duplicate the enablement criteria in the Modeling Assistant provider that already exists elsewhere (e.g. in the edit helpers or view providers).</LI>
-</UL>
-<UL>
-</UL>
-<H2><a name="_ConnectionCreationToUnspecified"></a>Adding Support for Connection Creation to an Unspecified Source or
-Target</H2>
-<P class="backto"><SPAN style="font-size:10.0pt">[<A href="#top"><SPAN
- class="GramE">back</SPAN> to top</A>]</SPAN><BR>
-<BR>The <FONT color="navy">getTypesForTarget()</FONT> and <FONT color="navy">getTypesForSource()</FONT>
-methods determines the shape types that will appear when creating a
-connection to an unspecified source or target using any connection
-creation mechanism (e.g. a palette connection tool).<BR><IMG border="0" src="paletteUnspecifiedTarget.jpg" width="548"
- height="293"> <BR>
-<BR>
-Add the shape types that can be created as the target type when creating
-a connection from source to target using the <FONT color="navy">getTypesForTarget()</FONT>
-method. This may be based on both the source type and the connection
-type. Similarly, add the shape types that can be created as the source
-type when creating a connection from target to source using the <FONT
- color="navy">getTypesForSource()</FONT> method. <BR>
-<BR></P>
-<DIV
- style="border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:48.0pt;margin-right:24.0pt"><PRE
- style="margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt"><FONT
- color="navy">
-public List </FONT><FONT color="red">getTypesForSource</FONT><FONT
- color="navy">(IAdaptable target, IElementType relationshipType) {
- if (relationshipType.equals(GeoshapeType.LINE)) {
- return GeoshapeType.getShapeTypes();
- }
-
- return Collections.EMPTY_LIST;
-}
-public List </FONT><FONT color="red">getTypesForTarget</FONT><FONT
- color="navy">(IAdaptable source, IElementType relationshipType) {
- if (relationshipType.equals(GeoshapeType.LINE)) {
- return GeoshapeType.getShapeTypes();
- }
- return Collections.EMPTY_LIST;
-}</FONT></PRE></DIV>
-<P class="backto"><BR>
-<B>Notes:</B></P>
-<UL>
- <LI>It is also necessary to update the <FONT color="navy">provides()</FONT> method appropriately.</LI>
- <LI>When showing the shape types that can be created, the Modeling
- Assistant service asks all providers to contribute to the list of shape
- types.</LI>
- <LI>Prior to showing the popup menus, each type is tested to see if it
- possible to create that shape type. If it
- is not possible to create the shape then that type will not appear
- on the popup.</LI></UL>
-<BR>
-<H2><a name="_SelectingAnExistingElement"></a>Adding Support for Selecting an Existing Element as the Source or Target</H2>
-<P class="backto"><SPAN style="font-size:10.0pt">[<A href="#top"><SPAN
- class="GramE">back</SPAN> to top</A>]</SPAN><BR>
-<BR>Although the Geoshapes Example does not implement this, it is also possible to create a connection to an existing element that may or may not appear on the diagram.<BR>
-<BR>
-<IMG border="0" src="selectExistingElement.jpg" width="432" height="304"> <BR>By providing for the <FONT
- color="navy">SelectExistingElementForTargetOperation</FONT>, the circled entry will appear when creating a connection to an unspecified target. Similarly, by providing for the<FONT
- color="navy"> SelectExistingElementForSourceOperation</FONT>, the circled entry will appear when creating a connection to an unspecified source. When the user selects this entry, the <FONT
- color="navy">selectExistingElementForSource()</FONT> method or <FONT
- color="navy">selectExistingElementForTarget()</FONT> method will be called in the provider that provided for this operation with the highest priority.
-</P>
-<DIV
- style="border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:48.0pt;margin-right:24.0pt"><PRE
- style="margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt"><FONT
- color="navy">public EObject </FONT><FONT color="red">selectExistingElementForSource</FONT><FONT
- color="navy">(IAdaptable target, IElementType relationshipType) {
- // Show a dialog from which the user can select an existing element.
- // Return the element.
-}
-public EObject </FONT><FONT color="red">selectExistingElementForTarget</FONT><FONT
- color="navy">(IAdaptable source, IElementType relationshipType) {
- // Show a dialog from which the user can select an existing element.
- // Return the element.
-}</FONT></PRE></DIV>
-<P class="backto"><SPAN style="font-size:10.0pt"></SPAN></P><BR>
-<B>Notes:</B>
-<UL>
- <LI>It is also necessary to update the <FONT color="navy">provides()</FONT>
- method appropriately.</LI>
-</UL><P class="backto"><BR>
-</P>
-<H2><A name="_ShowingRelatedElements"></A>Adding Support for Showing Related Elements with the Connection Handles</H2>
-<P class="backto"><BR>
-
-<SPAN style="font-size:10.0pt">[<A href="#top"><SPAN class="GramE">back</SPAN>
-to top</A>]</SPAN></P>
-<P class="backto"><BR>Although the Geoshapes Example does not implement this as there is no semantic model, it is also possible to support showing related elements when double-clicking a connection handle.<BR>
-<IMG border="0" src="showRelatedElementsTooltip.jpg" width="401"
- height="99">
-<BR>
-By providing for the <FONT color="navy">GetRelTypesForSREOnSourceOperation</FONT> and returning a list of types in the <FONT
- color="navy">getRelTypesForSREOnSource()</FONT> method,
-the above tooltip will appear when hovering over the outgoing connection handle. When the user double-clicks, the list of types given in the <FONT
- color="navy">getRelTypesForSREOnSource()</FONT> method will appear. After the user selects a type, the elements related to the source shape in the manner selected will appear with connections to the source shape.<BR>
-<BR>The expanding of related shapes is not supported generically in GMF. The client application must respond to the org.eclipse.gmf.runtime.diagram.ui.requests.ShowRelatedElementsRequest by returning the related elements.
-<BR>
-<BR>
-Similarly, by providing for the<FONT color="navy">
-GetRelTypesForSREOnTargetOperation</FONT> and returning a list of types in the <FONT
- color="navy">getRelTypesForSREOnTarget()</FONT> method, this gesture will also be supported on the incoming connection handle.</P>
-<DIV
- style="border:solid windowtext 1.0pt;mso-border-alt:solid windowtext .75pt;
-padding:4.0pt 4.0pt 4.0pt 4.0pt;margin-left:48.0pt;margin-right:24.0pt"><PRE
- style="margin-left:0in;border:none;mso-border-alt:solid windowtext .75pt;
-padding:0in;mso-padding-alt:4.0pt 4.0pt 4.0pt 4.0pt"><FONT color="navy">public List </FONT><FONT
- color="red">getRelTypesForSREOnSource</FONT><FONT color="navy">(IAdaptable source) {
- // return relationship types that could be expanded to show related elements
-}
-
-public List </FONT><FONT color="red">getRelTypesForSREOnTarget</FONT><FONT
- color="navy">(IAdaptable target) {
- // return relationship types that could be expanded to show related elements
-}</FONT></PRE></DIV>
-<P class="backto"><BR>
-<B>Notes:</B></P>
-<UL>
- <LI>It is also necessary to update the <FONT color="navy">provides()</FONT>
- method appropriately.</LI>
- <LI>When showing the relationship types that can be expanded, the Modeling
- Assistant service asks all providers to contribute to the list of
- types.</LI>
-</UL>
-<div class=MsoNormal align=center style='text-align:center'>
-
-<hr size=2 width="100%" align=center>
-
-</div>
-
-<h2><a name=_Summary></a>Summary</h2>
-
-<p><span style='font-size:10.0pt'>[<a href="#top"><span class=GramE>back</span>
-to top</a>]</span></p>
-
-<P>In this tutorial, we did the following:</P>
-<OL>
- <LI>Created the Modeling Assistant provider.</LI>
- <LI>Added support for connection creation with connection handles.</LI>
- <LI>Added support for connection creation to an unspecified source or
-target.</LI>
- <LI>Added support for selecting an existing element as the source or target.</LI>
- <LI>Added support for showing related elements with the connection handles.</LI>
-</OL>
-
-<br/>
-<br/>
-<hr/>
-<P><a href="http://www.eclipse.org/legal/epl-v10.html">
-Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.</a></P>
-
-</div>
+<p>&middot; <a href="#_SelectingAnExistingElement">Adding Support
+for Selecting an Existing Element as the Source or Target</a></p>
+
+<p>&middot; <a href="#_ShowingRelatedElements">Adding Support for
+Showing Related Elements with the Connection Handles</a></p>
+
+<p>&middot; <a href="#_Summary">Summary</a></p>
+
+<h2><a id="_Overview" name="_Overview"></a>Overview</h2>
+
+<p>[<a href="#top">back to top</a>]</p>
+
+<p>This tutorial provides the reader with the steps required to
+contribute to options available on the connection handle popups and
+to support connnection completion to an unknown source or
+target.</p>
+
+<h2><a id="_References" name="_References"></a>References</h2>
+
+<p>[<a href="#top">back to top</a>]</p>
+
+<p><br />
+ This tutorial references the following extension point:</p>
+
+org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders
+
+<p>More information about this extension point can be found in the
+SDK documentation.<br />
+<br />
+This tutorial assumes the connections and shapes to be created can
+already be created via a palette tool if such a tool existed. For
+more information about supporting the creation of a shape and
+connector see the following tutorials:</p>
+
+<ul>
+<li><a href="createShape.html">Creating a Shape</a></li>
+
+<li><a href="createConnection.html">Creating a Connection</a></li>
+</ul>
+
+<br />
+This tutorial uses the Geoshapes Example whose guide is available
+here: <a
+href="