blob: 6aabb5b9e6ad756718dc5f250355c4b7b4a290b6 [file] [log] [blame]
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=Generator content="Microsoft Word 12 (filtered)">
<title>Contributing to the property sheet</title>
<link rel=Stylesheet type="text/css" media=all href="../book.css">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
h1
{mso-style-link:"Überschrift 1 Zchn";
margin-top:12.0pt;
margin-right:0cm;
margin-bottom:3.0pt;
margin-left:0cm;
page-break-after:avoid;
font-size:16.0pt;
font-family:"Times New Roman","serif";
font-weight:bold;}
h2
{mso-style-link:"Überschrift 2 Zchn";
margin-top:12.0pt;
margin-right:0cm;
margin-bottom:3.0pt;
margin-left:0cm;
page-break-after:avoid;
font-size:14.0pt;
font-family:"Times New Roman","serif";
font-weight:bold;
font-style:italic;}
h3
{mso-style-link:"Überschrift 3 Zchn";
margin-top:12.0pt;
margin-right:0cm;
margin-bottom:3.0pt;
margin-left:0cm;
page-break-after:avoid;
font-size:13.0pt;
font-family:"Times New Roman","serif";
font-weight:bold;}
h4
{mso-style-link:"Überschrift 4 Zchn";
margin-top:11.25pt;
margin-right:0cm;
margin-bottom:1.7pt;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";
font-weight:bold;
font-style:italic;}
h5
{mso-style-link:"Überschrift 5 Zchn";
margin-right:0cm;
margin-left:0cm;
font-size:10.0pt;
font-family:"Times New Roman","serif";
font-weight:bold;}
h6
{mso-style-link:"Überschrift 6 Zchn";
margin-right:0cm;
margin-left:0cm;
font-size:7.5pt;
font-family:"Times New Roman","serif";
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p
{margin-top:5.65pt;
margin-right:0cm;
margin-bottom:5.65pt;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
pre
{mso-style-link:"HTML Vorformatiert Zchn";
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:3.4pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-link:"Sprechblasentext Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.berschrift1Zchn
{mso-style-name:"Überschrift 1 Zchn";
mso-style-link:"Überschrift 1";
font-family:"Cambria","serif";
color:#365F91;
font-weight:bold;}
span.berschrift2Zchn
{mso-style-name:"Überschrift 2 Zchn";
mso-style-link:"Überschrift 2";
font-family:"Cambria","serif";
color:#4F81BD;
font-weight:bold;}
span.berschrift3Zchn
{mso-style-name:"Überschrift 3 Zchn";
mso-style-link:"Überschrift 3";
font-family:"Cambria","serif";
color:#4F81BD;
font-weight:bold;}
span.berschrift4Zchn
{mso-style-name:"Überschrift 4 Zchn";
mso-style-link:"Überschrift 4";
font-family:"Cambria","serif";
color:#4F81BD;
font-weight:bold;
font-style:italic;}
span.berschrift5Zchn
{mso-style-name:"Überschrift 5 Zchn";
mso-style-link:"Überschrift 5";
font-family:"Cambria","serif";
color:#243F60;}
span.berschrift6Zchn
{mso-style-name:"Überschrift 6 Zchn";
mso-style-link:"Überschrift 6";
font-family:"Cambria","serif";
color:#243F60;
font-style:italic;}
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-link:"HTML Vorformatiert";
font-family:"Consolas","serif";}
span.SprechblasentextZchn
{mso-style-name:"Sprechblasentext Zchn";
mso-style-link:Sprechblasentext;
font-family:"Tahoma","sans-serif";}
p.code, li.code, div.code
{mso-style-name:code;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:15.0pt;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.note, li.note, div.note
{mso-style-name:note;
margin-top:19.5pt;
margin-right:0cm;
margin-bottom:19.5pt;
margin-left:30.0pt;
font-size:13.0pt;
font-family:"Times New Roman","serif";
font-style:italic;}
p.comment, li.comment, div.comment
{mso-style-name:comment;
margin-top:5.65pt;
margin-right:0cm;
margin-bottom:5.65pt;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";
font-weight:bold;}
span.code1
{mso-style-name:code1;
font-style:italic;}
.MsoChpDefault
{font-size:10.0pt;}
@page Section1
{size:595.45pt 841.7pt;
margin:72.0pt 89.85pt 72.0pt 89.85pt;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body bgcolor=white lang=DE link=blue vlink=purple style='margin-bottom:12.0pt'>
<div class=Section1>
<h1><span lang=EN-GB>Contributing to the Property Sheet</span></h1>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<h2><span lang=EN-GB>Prerequisite</span></h2>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>Contributing to the
property sheet is platform dependent (e.g. Eclipse specific). </span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>Add a dependency to the
plugin </span><span class=code1><span lang=EN-US style='color:black'>org.eclipse.ui.views.properties.tabbed</span></span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
class=code1><span lang=EN-US style='color:black;font-style:normal'>in the
plugin.xml resp. manifest.mf</span></span><span lang=EN-GB style='color:black'>,
which contains eclipse functionality for property sheets. </span></p>
<p class=MsoNormal><span lang=EN-US style='color:black'>&nbsp;</span></p>
<h2><span lang=EN-GB>Contributing to the Property Sheet</span></h2>
<p class=MsoNormal><span lang=EN-US style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>Contributing to the
property sheet is easy if you are familiar with the Eclipse property sheet
concept. <b>If not please read the following <a
href="http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html">article</a>.</b></span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>First you have to add
some declarations to your plugin.xml.</span></p>
<p class=MsoNormal><span lang=EN-US style='color:black'>&nbsp;</span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=851
style='width:18.0cm;border-collapse:collapse'>
<tr>
<td width=851 valign=top style='width:18.0cm;border:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New";color:navy'>&nbsp;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:navy'>&lt;extension</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:navy'>point=</span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;org.eclipse.ui.views.properties.tabbed.propertyContributor&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:navy'>&lt;propertyContributor</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>contributorId=</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;mytutorial.PropertyContributor&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:navy'>&lt;propertyCategory</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>category=</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;Graphiti&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:navy'>&lt;/propertyCategory&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:navy'>&lt;/propertyContributor&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:navy'>&lt;/extension&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:navy'>&lt;extension</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:navy'>point=</span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;org.eclipse.ui.views.properties.tabbed.propertyTabs&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:navy'>&lt;propertyTabs</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>contributorId=</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;mytutorial.PropertyContributor&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:navy'>&lt;propertyTab</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>label=</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;Main&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>category=</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;Graphiti&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>id=</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;graphiti.main.tab&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:navy'>&lt;/propertyTab&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:navy'>&lt;/propertyTabs&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:navy'>&lt;/extension&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:navy'>&lt;extension</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:navy'>point=</span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;org.eclipse.ui.views.properties.tabbed.propertySections&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:navy'>&lt;propertySections</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>contributorId=</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;mytutorial.PropertyContributor&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:navy'>&lt;propertySection</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>tab=</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;graphiti.main.tab&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:navy'>class=</span><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";color:green'>&quot;org.eclipse.graphiti.examples.tutorial.property<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
.MyTutorialEClassSection&quot;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:navy'>filter=</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;org.eclipse.graphiti.examples.tutorial.property<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
.MyTutorialEClassFilter&quot;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:navy'>id=</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;graphiti.main.tab.emfclass&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:navy'>&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:
10.0pt;font-family:"Courier New";color:navy'>&lt;/propertySection&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";
color:navy'>&lt;/propertySections&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:navy'>&lt;/extension&gt;</span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;</span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>The first extension <b>creates
a category</b> with the id “Graphiti”. Categories are used to group tabs.</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>The second extension <b>creates
a tab</b> with the label “Main” in the previously created category. </span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>The third extension <b>creates
a section</b> for the previously defined tab. Sections are the UI blocks of
which a tab consists.</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><b><span lang=EN-GB style='color:black'>It is very
important, that the </span></b><b><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:navy'>contributorId</span></b><b><span
lang=EN-GB style='color:black'> in the plugin.xml is the same, which is
determined internally in Graphiti. The </span></b><b><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New";color:navy'>contributorId</span></b><b><span
lang=EN-GB style='color:black'> is calculated from the diagram-type-id by the
formula: &nbsp;</span></b><b><i><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:black'>Diagram.getDiagramTypeId()</span></i></b><b><span
lang=EN-GB style='color:black'> </span></b><b><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New";color:black'>+ </span></b><b><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;.PropertyContributor&quot;</span></b><b><span
lang=EN-GB style='color:black'>.</span></b></p>
<p class=MsoNormal><b><span lang=EN-GB style='color:black'>In our example this
results in </span></b><b><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New";color:navy'>contributorId=</span></b><b><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;mytutorial.PropertyContributor&quot;</span></b><b><span
lang=EN-GB style='color:black'>. </span></b></p>
<p class=MsoNormal><span lang=EN-US style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>Note that the category
“Graphiti” and the identifiers “graphiti.main.tab” and
“graphiti.main.tab.emfclass” can be chosen freely, as long as they are kept
consistent over all occurrences.</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>In our example the
section should be shown if the selected element represents a EClass. Therefore
we have to implement a property filter class by extending <a
href="../../../javadoc/org/eclipse/graphiti/ui/platform/AbstractPropertySectionFilter.html">AbstractPropertySectionFilter</a>
and overwriting the method <a
href="../../../javadoc/org/eclipse/graphiti/ui/platform/AbstractPropertySectionFilter.html#accept(org.eclipse.graphiti.mm.pictograms.PictogramElement)">accept</a>.</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>You can see the
complete implementation of the property filter here:</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=851
style='width:18.0cm;border-collapse:collapse'>
<tr>
<td width=851 valign=top style='width:18.0cm;border:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal style='text-autospace:none'><b><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>&nbsp;</span></b></p>
<p class=MsoNormal style='text-autospace:none'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>package</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
org.eclipse.graphiti.examples.tutorial.property;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;</span></p>
<p class=MsoNormal style='text-autospace:none'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>public</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>class</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
MyTutorialEClassFilter </span><b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>extends</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
AbstractPropertySectionFilter {</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#646464'>@Override</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;
</span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>protected</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>boolean</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
accept(PictogramElement pe) {</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
EObject eObject =</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Graphiti.getLinkService()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .<i>getBusinessObjectForLinkedPictogramElement</i>(pe);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>if</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> (eObject </span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>instanceof</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
EClass) {</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>return</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>true</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>}</span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>return</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>false</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; }</span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>}</span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;</span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>Finally we have to implement
a property section class which creates the UI shown in the tab using standard
SWT controls (refer to the <a
href="http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html">article</a>
mentioned above). This class should extend <a
href="../../../javadoc/org/eclipse/graphiti/ui/platform/GFPropertySection.html">GFPropertySection</a>,
which offers some convenience methods to retrieve the selected Pictogram
Element or execute Features.</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>In this example we
create a simple UI, which allows displaying and changing the name of a EClass.</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>You can see a very
simple implementation of the property section here: </span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=851
style='width:18.0cm;border-collapse:collapse'>
<tr>
<td width=851 valign=top style='width:18.0cm;border:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal style='text-autospace:none'><b><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>&nbsp;</span></b></p>
<p class=MsoNormal style='text-autospace:none'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>package</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
org.eclipse.graphiti.examples.tutorial.property;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;</span></p>
<p class=MsoNormal style='text-autospace:none'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>public</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>class</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";background:white'>MyTutorialEClassSection</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>extends</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> GFPropertySection
</span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>implements</span></b></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;
ITabbedPropertyConstants {</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;
</span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>private</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> Text </span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>nameText</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#646464'>@Override</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;
</span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>public</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>void</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
createControls(Composite parent,</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
TabbedPropertySheetPage tabbedPropertySheetPage) {</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>super</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'>.createControls(parent, tabbedPropertySheetPage);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
TabbedPropertySheetWidgetFactory factory = getWidgetFactory();</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Composite composite = factory.createFlatFormComposite(parent);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
FormData data;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#0000C0'>nameText</span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> = factory.createText(composite, </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
data = </span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>new</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> FormData();</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
data.</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#0000C0'>left</span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> = </span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
FormAttachment(0, </span><i><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:#0000C0'>STANDARD_LABEL_WIDTH</span></i><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
data.</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#0000C0'>right</span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> = </span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
FormAttachment(100, 0);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
data.</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#0000C0'>top</span><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";color:black'> = </span><b><span lang=EN-US style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
FormAttachment(0, </span><i><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:#0000C0'>VSPACE</span></i><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#0000C0'>nameText</span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'>.setLayoutData(data);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CLabel valueLabel = factory.createCLabel(composite, </span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;Name:&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
data = </span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>new</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> FormData();</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
data.</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#0000C0'>left</span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> = </span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
FormAttachment(0, 0);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
data.</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#0000C0'>right</span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> = </span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
FormAttachment(</span><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";color:#0000C0'>nameText</span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>, -</span><i><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>HSPACE</span></i><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
data.</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#0000C0'>top</span><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";color:black'> = </span><b><span lang=EN-US style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
FormAttachment(</span><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";color:#0000C0'>nameText</span><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>, 0, SWT.</span><i><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>CENTER</span></i><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
valueLabel.setLayoutData(data);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;
}</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#646464'>@Override</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;
</span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>public</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>void</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
refresh() {</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
PictogramElement pe = getSelectedPictogramElement();</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>if</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> (pe != </span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>null</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>) {</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Object bo = Graphiti.getLinkService()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
.<i>getBusinessObjectForLinkedPictogramElement</i>(pe);<br>
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// the filter assured, that it is a EClass</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>            </span><b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>if</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
(bo == </span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>null</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'>)</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>               
</span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>return</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'>;</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
String name = ((EClass) bo).getName();</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#0000C0'>nameText</span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'>.setText(name == </span><b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>null</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> ? </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;&quot;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> :
name);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>}</span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; }</span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>}</span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;</span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<h2><span lang=EN-GB>Test: Verify the Property Sheet for the EClass</span></h2>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>Now start the editor
and create a new EClass. Open the properties view and select the EClass.</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>Verify that the
property sheet tab “Main” is shown, and that the class name is correctly
displayed.</span></p>
<p class=MsoNormal><span lang=EN-US style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>There is currently no
synchronization between the graphical editor and the property sheet. If the
name of the EClass is changed in the editor, the change is not visible in the
property sheet. The same happens vice versa. </span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>&nbsp;</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>The event handling can
be implemented as an exercise.</span></p>
<p class=MsoNormal><span lang=EN-US style='color:black'>&nbsp;</span></p>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=3 width="100%" align=center>
</div>
<p class=MsoNormal><a href="http://www.eclipse.org/legal/epl-v10.html"
shape=rect>Copyright (c) SAP AG 2005, 2010.</a> </p>
</div>
</body>
</html>