<br style="clear:both;height:1em;"> | |
<div id="leftcol"> | |
<div class="nav-logo"> | |
<a href="index.php"><img src="logo.png" style="margin-left:10px; width:155px"/></a> | |
</div> | |
<ul id="leftnav"> | |
<li class="partentry" > | |
Documentation | |
</li> | |
<li class="separator"><div class="separator"> | |
<img src="triangle.gif" style="height:12px; margin-right: 2px; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" /> | |
<a href="01-Introduction.php">Introduction</a></div> | |
<ul style="display: none;" id="subToc_01-Introduction.html"> | |
<li id="01-Introduction.html#Customizations.html" ><a href="01-Introduction.php#Customizations.php" >Customizations</a></li> | |
<li id="01-Introduction.html#Customizations_TheEasyWay.html" ><a href="01-Introduction.php#Customizations_TheEasyWay.php" >the Easy way</a></li> | |
<li id="01-Introduction.html#Customitations_TheHardWay.html" ><a href="01-Introduction.php#Customitations_TheHardWay.php" >the Hard way</a></li> | |
</ul> | |
</li> | |
<li class="separator"><div class="separator"> | |
<img src="triangle.gif" style="height:12px; margin-right: 2px; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" /> | |
<a href="02-GettingStarted.php">Getting Started</a></div> | |
<ul style="display: none;" id="subToc_02-GettingStarted.html"> | |
<li id="02-GettingStarted.html#Installation.html" ><a href="02-GettingStarted.php#Installation.php" >Installation</a></li> | |
<li id="02-GettingStarted.html#FirstExample.html" ><a href="02-GettingStarted.php#FirstExample.php" >First Example</a></li> | |
<li id="02-GettingStarted.html#RCPMail.html" ><a href="02-GettingStarted.php#RCPMail.php" >RCP Mail Example</a></li> | |
</ul> | |
</li> | |
<li class="separator"><div class="separator"> | |
<img src="triangle.gif" style="height:12px; margin-right: 2px; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" /> | |
<a href="03-Components.php">Components</a></div> | |
<ul style="display: none;" id="subToc_03-Components.html"> | |
<li id="03-Components.html#FormComponent.html" ><a href="03-Components.php#FormComponent.php" >Form Component</a></li> | |
<li id="03-Components.html#TreeComponent.html" ><a href="03-Components.php#TreeComponent.php" >Tree Component</a></li> | |
<li id="03-Components.html#TreeFormComponent.html" ><a href="03-Components.php#TreeFormComponent.php" >Tree Form Component</a></li> | |
<li id="03-Components.html#TableComponent.html" ><a href="03-Components.php#TableComponent.php" >Table Component</a></li> | |
</ul> | |
</li> | |
<li class="separator"><div class="separator"> | |
<img src="triangle.gif" style="height:12px; margin-right: 2px; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" /> | |
<a href="04-Customization.php">Customization</a></div> | |
<ul style="display: none;" id="subToc_04-Customization.html"> | |
<li id="04-Customization.html#ResourceManagers.html" ><a href="04-Customization.php#ResourceManagers.php" >Managing Resources</a></li> | |
<li id="04-Customization.html#Providers.html" ><a href="04-Customization.php#Providers.php" >Providers</a></li> | |
<li id="04-Customization.html#SelectionAndMenu.html" ><a href="04-Customization.php#SelectionAndMenu.php" >Selection And Menu</a></li> | |
<li id="04-Customization.html#Builders.html" ><a href="04-Customization.php#Builders.php" >Builders</a></li> | |
<li id="04-Customization.html#Factories.html" ><a href="04-Customization.php#Factories.php" >Factories</a></li> | |
<li id="04-Customization.html#Viewers.html" ><a href="04-Customization.php#Viewers.php" >Viewers</a></li> | |
</ul> | |
</li> | |
<li class="separator"><div class="separator"> | |
<img src="triangle.gif" style="height:12px; margin-right: 2px; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" /> | |
<a href="05-DSL.php">EMF Parsley DSL</a></div> | |
<ul style="display: none;" id="subToc_05-DSL.html"> | |
<li id="05-DSL.html#xbase.html" ><a href="05-DSL.php#xbase.php" >Xbase features</a></li> | |
</ul> | |
</li> | |
<li class="separator"><div class="separator"> | |
<img src="triangle.gif" style="height:12px; margin-right: 2px; display:none" /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" /> | |
<a href="06-AdvancedComponents.php">Advanced Components</a></div> | |
</li> | |
<li class="separator"><div class="separator"> | |
<img src="triangle.gif" style="height:12px; margin-right: 2px; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" /> | |
<a href="07-Eclipse4.php">Eclipse 4</a></div> | |
<ul style="display: none;" id="subToc_07-Eclipse4.html"> | |
<li id="07-Eclipse4.html#GetFirstExample.html" ><a href="07-Eclipse4.php#GetFirstExample.php" >First Example Setup</a></li> | |
<li id="07-Eclipse4.html#PrepareForEclipse4Application.html" ><a href="07-Eclipse4.php#PrepareForEclipse4Application.php" >Preparing for a pure Eclipse 4 Application</a></li> | |
<li id="07-Eclipse4.html#CreateEclipse4Application.html" ><a href="07-Eclipse4.php#CreateEclipse4Application.php" >Create an Eclipse 4 Application</a></li> | |
<li id="07-Eclipse4.html#Eclipse4ApplicationAndEMFParsley.html" ><a href="07-Eclipse4.php#Eclipse4ApplicationAndEMFParsley.php" >Using an EMF Parsley TreeComposite into an Eclipse 4 Part</a></li> | |
<li id="07-Eclipse4.html#Eclipse4Save.html" ><a href="07-Eclipse4.php#Eclipse4Save.php" >Adding the dirty state and Save command</a></li> | |
</ul> | |
</li> | |
<li class="partentry" > | |
Appendix | |
</li> | |
<li class="separator"><div class="separator"> | |
<img src="triangle.gif" style="height:12px; margin-right: 2px; display:none" /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" /> | |
<a href="GettingSources.php">Getting Sources</a></div> | |
</li> | |
<li class="separator"><div class="separator"> | |
<img src="triangle.gif" style="height:12px; margin-right: 2px; display:none" /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" /> | |
<a href="Downloads.php">EMF Parsley - Downloads</a></div> | |
</li> | |
</ul> | |
</div> | |
<div id="midcolumn"> | |
<a name="Customization" ></a> | |
<h1>Customization</h1> | |
<div class="toc"> | |
<ul> | |
<li><a href="04-Customization.php#ResourceManagers.php" >Managing Resources</a></li> | |
<li><a href="04-Customization.php#Providers.php" >Providers</a></li> | |
<li><a href="04-Customization.php#SelectionAndMenu.php" >Selection And Menu</a></li> | |
<li><a href="04-Customization.php#Builders.php" >Builders</a></li> | |
<li><a href="04-Customization.php#Factories.php" >Factories</a></li> | |
<li><a href="04-Customization.php#Viewers.php" >Viewers</a></li> | |
</ul> | |
</div> | |
<a name="ResourceManagers" ></a> | |
<span style="float:left; border-top: 1px dotted #d4d4dd; margin-left: 0; margin-top: 5px; | |
padding: 5px 0; | |
padding-top: 5px;"></span><a style="float: right" href="#">Top</a> | |
<br style="clear:both"></br> | |
<h1>Managing Resources</h1> | |
<div class="toc"> | |
<ul> | |
<li><a href="04-Customization.php#ResourceLoader.php" >Resource Loader</a></li> | |
<li><a href="04-Customization.php#EmptyResourceInitializer.php" >Empty Resource Initializer</a></li> | |
<li><a href="04-Customization.php#EditingDomainFinder.php" >Editing Domain Finder</a></li> | |
<li><a href="04-Customization.php#ResourceSaveManager.php" >Resource Save Manager</a></li> | |
</ul> | |
</div> | |
<a name="ResourceLoader" ></a> | |
<h2>Resource Loader</h2> | |
<p> | |
The class <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/resource/ResourceLoader.html" title="org.eclipse.emf.parsley.resource.ResourceLoader">ResourceLoader</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/resource/ResourceLoader.java" title="View Source Code" >(src)</a> can be used to handle resource loading. | |
This class uses internally the <a href="04-Customization.php#EmptyResourceInitializer.php" title="Go to "Empty Resource Initializer"">Empty Resource Initializer</a>. | |
</p> | |
<a name="EmptyResourceInitializer" ></a> | |
<h2>Empty Resource Initializer</h2> | |
<p> | |
If you need to initialize your model, for the first use, you can define an implementation of <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/resource/EmptyResourceInitializer.html" title="org.eclipse.emf.parsley.resource.EmptyResourceInitializer">EmptyResourceInitializer</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/resource/EmptyResourceInitializer.java" title="View Source Code" >(src)</a>. | |
When the main resource will be found empty, your code will be executed. | |
</p> | |
<a name="EditingDomainFinder" ></a> | |
<h2>Editing Domain Finder</h2> | |
<p> | |
The class <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/edit/EditingDomainFinder.html" title="org.eclipse.emf.parsley.edit.EditingDomainFinder">EditingDomainFinder</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/edit/EditingDomainFinder.java" title="View Source Code" >(src)</a> can be inherited to provide a specific | |
way to find the editign domain. | |
</p> | |
<a name="ResourceSaveManager" ></a> | |
<h2>Resource Save Manager</h2> | |
<p> | |
Resource saving is delegated to <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/edit/ResourceSaveManager.html" title="org.eclipse.emf.parsley.edit.ResourceSaveManager">ResourceSaveManager</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/edit/ResourceSaveManager.java" title="View Source Code" >(src)</a> | |
which, by defaults only saves the passed <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/Resource.html" title="org.eclipse.emf.ecore.resource.Resource">Resource</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/resource/Resource.java" title="View Source Code" >(src)</a>. | |
You can inject your own save manager and implement the method <span class="inlinecode">precondition(Resource)</span>, for | |
instance, you may want to validate the resource before saving, and in case the validation | |
fails to return <span class="inlinecode">false</span>. If the precondition is <span class="inlinecode">false</span> the default implementation | |
will not save the resource (and in turn will return <span class="inlinecode">false</span>). | |
</p> | |
<a name="ValidateResourceSaveManager" ></a> | |
<h3>Validate Resource Save Manager</h3> | |
<p> | |
We provide an example of custom resource save manager: <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/edit/ValidateResourceSaveManager.html" title="org.eclipse.emf.parsley.edit.ValidateResourceSaveManager">ValidateResourceSaveManager</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/edit/ValidateResourceSaveManager.java" title="View Source Code" >(src)</a>, | |
we show here only relevant parts to give an example: | |
</p> | |
<p> | |
<div class="literallayout"> | |
<div class="incode"> | |
<p class="code"> | |
<span class="keyword">public</span> <span class="keyword">class</span> ValidateResourceSaveManager <span class="keyword">extends</span> ResourceSaveManager {<br/> | |
@Override<br/> | |
<span class="keyword">protected</span> <span class="keyword">boolean</span> precondition(Resource resource) {<br/> | |
<span class="keyword">return</span> <span class="keyword">super</span>.precondition(resource) && validateModel(resource);<br/> | |
}<br/> | |
<span class="keyword">protected</span> <span class="keyword">boolean</span> validateModel(Resource resource) {<br/> | |
<span class="keyword">for</span> (EObject eObject : resource.getContents()) {<br/> | |
Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject);<br/> | |
<span class="keyword">if</span> (diagnostic.getSeverity() == Diagnostic.ERROR) {<br/> | |
<span class="comment">// SKIPPED: present the errors<br/> | |
</span> <span class="keyword">return</span> false;<br/> | |
} <span class="keyword">else</span> <span class="keyword">if</span> (diagnostic.getSeverity() == Diagnostic.WARNING) {<br/> | |
<span class="comment">// SKIPPED: present the warnings<br/> | |
</span> }<br/> | |
}<br/> | |
<span class="keyword">return</span> true;<br/> | |
}<br/> | |
} | |
</p> | |
</div> | |
</div> | |
</p> | |
<a name="Providers" ></a> | |
<span style="float:left; border-top: 1px dotted #d4d4dd; margin-left: 0; margin-top: 5px; | |
padding: 5px 0; | |
padding-top: 5px;"></span><a style="float: right" href="#">Top</a> | |
<br style="clear:both"></br> | |
<h1>Providers</h1> | |
<div class="toc"> | |
<ul> | |
<li><a href="04-Customization.php#FeaturesProvider.php" >Features Provider</a></li> | |
<li><a href="04-Customization.php#PropertyDescriptionProvider.php" >Feature Caption Provider</a></li> | |
<li><a href="04-Customization.php#ViewerLabelProvider.php" >Viewer Label Provider</a></li> | |
<li><a href="04-Customization.php#ViewerContentProvider.php" >Viewer Content Provider</a></li> | |
<li><a href="04-Customization.php#ProposalProvider.php" >Proposal Provider</a></li> | |
<li><a href="04-Customization.php#ViewerContextMenuFactory.php" >Viewer Context Menu Factory</a></li> | |
<li><a href="04-Customization.php#TableColumnLabelProvider.php" >Table Column Label Provider</a></li> | |
</ul> | |
</div> | |
<a name="FeaturesProvider" ></a> | |
<h2>Features Provider</h2> | |
<p> | |
<em>This can be done with Parsley DSL too!</em> | |
<div class="todo" > | |
TODO: merge delle 2 versioni | |
</div> | |
</p> | |
<a name="FeatureProvider1" ></a> | |
<h3>Prima versione</h3> | |
<p> | |
To customize the <em>feature list</em> it can be injected a <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/ui/provider/FeaturesProvider.html" title="org.eclipse.emf.parsley.ui.provider.FeaturesProvider">FeaturesProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/FeaturesProvider.java" title="View Source Code" >(src)</a>. | |
The default is to return the list of all the features in the EClass, but the programmer can customize it (for instance, | |
by returning only a superset, or using a different order) on an EClass-based strategy. The customization can be done | |
redefining buildMap and adding mappings. | |
</p> | |
<p> | |
<div class="literallayout"> | |
<div class="incode"> | |
<p class="code"> | |
<span class="keyword">protected</span> <span class="keyword">void</span> buildMap(EClassToEStructuralFeatureMap map) {<br/> | |
<span class="keyword">super</span>.buildMap(map);<br/> | |
map.mapTo(LIBRARY,LIBRARY__NAME, ADDRESSABLE__ADDRESS);<br/> | |
} | |
</p> | |
</div> | |
</div> | |
</p> | |
<p> | |
In the example we specify that for the EClass <em>Library</em> the feature that are to be displayed are <em>name</em> | |
and <em>address</em>. | |
</p> | |
<a name="FeatureProvider2" ></a> | |
<h3>Seconda versione</h3> | |
<p> | |
When the framework builds components according to the | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/EStructuralFeature.html" title="org.eclipse.emf.ecore.EStructuralFeature">EStructuralFeature</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EStructuralFeature.java" title="View Source Code" >(src)</a>s of a given | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/EClass.html" title="org.eclipse.emf.ecore.EClass">EClass</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EClass.java" title="View Source Code" >(src)</a> it relies on an injected | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/ui/provider/FeaturesProvider.html" title="org.eclipse.emf.parsley.ui.provider.FeaturesProvider">FeaturesProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/FeaturesProvider.java" title="View Source Code" >(src)</a>. | |
The default behavior is to simply return all the features of the a given EClass, | |
in the order they are defined in the EClass; | |
you may want to provide a custom implementation by redefining | |
the method <span class="inlinecode">List<EStructuralFeature> getFeatures(EClass)</span>, or | |
<span class="inlinecode">List<EStructuralFeature> getFeatures(EObject)</span>, | |
for instance by returning the features ordered according to their name | |
(the following snippet uses an utility class from the framework) | |
</p> | |
<p> | |
<div class="literallayout"> | |
<div class="incode"> | |
<p class="code"> | |
<span class="keyword">public</span> <span class="keyword">class</span> OrderedEStructuralFeaturesProvider <br/> | |
<span class="keyword">extends</span> FeaturesProvider {<br/> | |
@Inject<br/> | |
EStructuralFeatureNameComparator comparator;<br/> | |
<br/> | |
@Override<br/> | |
<span class="keyword">public</span> List<EStructuralFeature> getFeatures(EClass eClass) {<br/> | |
List<EStructuralFeature> features = <span class="keyword">super</span>.getFeatures(eClass);<br/> | |
Collections.sort(features, <br/> | |
<span class="keyword">new</span> EStructuralFeatureNameComparator());<br/> | |
<span class="keyword">return</span> features;<br/> | |
}<br/> | |
} | |
</p> | |
</div> | |
</div> | |
</p> | |
<p> | |
Alternatively, you can set the mappings, i.e., specify the structural | |
features you want to be used given an EClass, by implementing | |
the method <span class="inlinecode">buildMap</span>, which receives the | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/ui/provider/FeaturesProvider.EClassToEStructuralFeatureMap.html" title="org.eclipse.emf.parsley.ui.provider.FeaturesProvider.EClassToEStructuralFeatureMap">FeaturesProvider.EClassToEStructuralFeatureMap</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/FeaturesProvider.java" title="View Source Code" >(src)</a> | |
that can be filled with the method <span class="inlinecode">mapTo</span>; | |
for instance, using the EMF extended library | |
example, this customization will return only the <em>name</em> and <em>address</em> features | |
for <span class="inlinecode">Library</span>, the <em>firstName</em>, <em>lastName</em> and <em>address</em> for | |
<span class="inlinecode">Person</span>, and the <em>firstName</em>, <em>lastName</em> and <em>books</em> (but | |
not <em>address</em>) for <span class="inlinecode">Writer</span> (which inherits from <span class="inlinecode">Person</span>). | |
</p> | |
<p> | |
<div class="literallayout"> | |
<div class="incode"> | |
<p class="code"> | |
<span class="keyword">import</span> <span class="keyword">static</span> org.eclipse.emf.examples.extlibrary.EXTLibraryPackage.Literals.*;<br/> | |
<span class="keyword">import</span> org.eclipse.emf.parsley.ui.provider.EStructuralFeaturesProvider;<br/> | |
<span class="keyword">public</span> <span class="keyword">class</span> LibraryEStructuralFeaturesProvider <span class="keyword">extends</span><br/> | |
FeaturesProvider {<br/> | |
@Override<br/> | |
<span class="keyword">protected</span> <span class="keyword">void</span> buildMap(EClassToEStructuralFeatureMap map) {<br/> | |
<span class="keyword">super</span>.buildMap(map);<br/> | |
map.mapTo(LIBRARY,<br/> | |
LIBRARY__NAME, ADDRESSABLE__ADDRESS);<br/> | |
map.mapTo(PERSON,<br/> | |
PERSON__FIRST_NAME, PERSON__LAST_NAME,<br/> | |
ADDRESSABLE__ADDRESS);<br/> | |
map.mapTo(WRITER,<br/> | |
PERSON__FIRST_NAME, PERSON__LAST_NAME,<br/> | |
WRITER__BOOKS);<br/> | |
}<br/> | |
} | |
</p> | |
</div> | |
</div> | |
</p> | |
<p> | |
Another possibility is to build a map which relies on Strings | |
both for the <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/EClass.html" title="org.eclipse.emf.ecore.EClass">EClass</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EClass.java" title="View Source Code" >(src)</a> and for | |
the list of <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/EStructuralFeature.html" title="org.eclipse.emf.ecore.EStructuralFeature">EStructuralFeature</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EStructuralFeature.java" title="View Source Code" >(src)</a>; | |
note that the name of the <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/EClass.html" title="org.eclipse.emf.ecore.EClass">EClass</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EClass.java" title="View Source Code" >(src)</a> should | |
be obtained by using <span class="inlinecode">getInstanceClassName()</span>; you can also | |
combine the two approaches (in that case the map built with | |
<span class="inlinecode">buildMap</span> has the precedence): | |
</p> | |
<p> | |
<div class="literallayout"> | |
<div class="incode"> | |
<p class="code"> | |
<span class="keyword">import</span> <span class="keyword">static</span> org.eclipse.emf.examples.extlibrary.EXTLibraryPackage.Literals.*;<br/> | |
<span class="keyword">import</span> org.eclipse.emf.parsley.ui.provider.FeaturesProvider;<br/> | |
<span class="keyword">public</span> <span class="keyword">class</span> LibraryEStructuralFeaturesAsStringsProvider <span class="keyword">extends</span><br/> | |
FeaturesProvider {<br/> | |
@Override<br/> | |
<span class="keyword">protected</span> <span class="keyword">void</span> buildMap(EClassToEStructuralFeatureMap map) {<br/> | |
<span class="keyword">super</span>.buildMap(map);<br/> | |
map.mapTo(LIBRARY, LIBRARY__NAME, ADDRESSABLE__ADDRESS);<br/> | |
}<br/> | |
@Override<br/> | |
<span class="keyword">protected</span> <span class="keyword">void</span> buildStringMap(<br/> | |
EClassToEStructuralFeatureAsStringsMap stringMap) {<br/> | |
<span class="keyword">super</span>.buildStringMap(stringMap);<br/> | |
stringMap.mapTo(PERSON.getInstanceClassName(), <span class="string">"firstName"</span>, <span class="string">"lastName"</span>,<br/> | |
<span class="string">"address"</span>);<br/> | |
stringMap.mapTo(WRITER.getInstanceClassName(), <span class="string">"firstName"</span>, <span class="string">"lastName"</span>,<br/> | |
<span class="string">"books"</span>);<br/> | |
}<br/> | |
} | |
</p> | |
</div> | |
</div> | |
</p> | |
<a name="TableFeaturesProvider" ></a> | |
<h3>Table Features Provider</h3> | |
<p> | |
As an extension, you can use the <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/ui/provider/TableFeaturesProvider.html" title="org.eclipse.emf.parsley.ui.provider.TableFeaturesProvider">TableFeaturesProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/TableFeaturesProvider.java" title="View Source Code" >(src)</a>: | |
the customizations will be applied only to <a href="03-Components.php#TableComponent.php" title="Go to "Table Component"">tables</a>, not to <a href="03-Components.php#FormComponent.php" title="Go to "Form Component"">Forms</a>. | |
</p> | |
<a name="PropertyDescriptionProvider" ></a> | |
<h2>Feature Caption Provider</h2> | |
<p> | |
<em>This can be done with Parsley DSL too!</em> | |
The <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/ui/provider/FeatureCaptionProvider.html" title="org.eclipse.emf.parsley.ui.provider.FeatureCaptionProvider">FeatureCaptionProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/FeatureCaptionProvider.java" title="View Source Code" >(src)</a> provides captions for | |
the features. It can be customized, with injection (see Injection paragraph), to customize the caption label on the | |
left of each control in a form and the headers in a table's columns. | |
The framework use a polimorphic mechanism to find customizations, so that It can | |
be written a method with a specific signature build by the keyword <em>'text'</em> followed by the EClass and the EStructuralFeature. | |
All parts of the name are separated by an underscore character and the method must accept a parameter of type EStructuralFeature. | |
</p> | |
<p> | |
In the following example we specify the caption text for the feature 'Author' of Book and the feature 'Name' for | |
Writer. | |
</p> | |
<p> | |
<div class="literallayout"> | |
<div class="incode"> | |
<p class="code"> | |
<span class="keyword">public</span> String text_Book_author(<span class="keyword">final</span> EStructuralFeature feature) {<br/> | |
<span class="keyword">return</span> <span class="string">"Wrote by:"</span>;<br/> | |
}<br/> | |
<span class="keyword">public</span> String text_Writer_name(<span class="keyword">final</span> EStructuralFeature feature) {<br/> | |
<span class="keyword">return</span> <span class="string">"Name:"</span>;<br/> | |
} | |
</p> | |
</div> | |
</div> | |
</p> | |
<a name="FormPropertyDescriptionProvider" ></a> | |
<h3>Form Feature Caption Provider</h3> | |
<p> | |
The <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/ui/provider/FormFeatureCaptionProvider.html" title="org.eclipse.emf.parsley.ui.provider.FormFeatureCaptionProvider">FormFeatureCaptionProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/FormFeatureCaptionProvider.java" title="View Source Code" >(src)</a> can be used if you want | |
to define the description only for the form. For example using the <a href="03-Components.php#TreeFormComponent.php" title="Go to "Tree Form Component"">Tree | |
Form</a> your definition will not be used in the tree. | |
</p> | |
<p> | |
In this case you can also define a method the returns directly the control, like in the example | |
below. In such methods there is another parameter that is the parent composite. | |
</p> | |
<p> | |
<div class="literallayout"> | |
<div class="incode"> | |
<p class="code"> | |
<span class="keyword">public</span> Label label_Writer_name(Composite parent, EStructuralFeature feature) {<br/> | |
Label label = defaultLabel(parent, feature);<br/> | |
label.setBackground(getFormToolkit().getColors().getColor(IFormColors.TITLE));<br/> | |
<span class="keyword">return</span> label;<br/> | |
} | |
</p> | |
</div> | |
</div> | |
</p> | |
<a name="ViewerLabelProvider" ></a> | |
<h2>Viewer Label Provider</h2> | |
<p> | |
The Label Provider can be customized by providing a specific implementation of <a class="jdoc" href="http://help.eclipse.org/helios/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ILabelProvider.html" title="org.eclipse.jface.viewers.ILabelProvider">ILabelProvider</abbr></a> | |
and injecting it in the spefic module <em>(TODO)</em>. | |
EMF Parsley provides such an implementation with the class <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/ui/provider/ViewerLabelProvider.html" title="org.eclipse.emf.parsley.ui.provider.ViewerLabelProvider">ViewerLabelProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/ViewerLabelProvider.java" title="View Source Code" >(src)</a> | |
that is inteded to be surclassed by the programmer to provides specific implementations like in the example below. | |
</p> | |
<p> | |
<div class="literallayout"> | |
<div class="incode"> | |
<p class="code"> | |
<span class="keyword">public</span> <span class="keyword">class</span> CustomLibraryLabelProvider <span class="keyword">extends</span> ViewerLabelProvider {<br/> | |
@Inject<br/> | |
<span class="keyword">public</span> CustomLibraryLabelProvider(AdapterFactoryLabelProvider delegate) {<br/> | |
<span class="keyword">super</span>(delegate);<br/> | |
}<br/> | |
<span class="keyword">public</span> String text(Book book) {<br/> | |
<span class="keyword">return</span> <span class="string">"Book: "</span> + book.getTitle();<br/> | |
}<br/> | |
<span class="keyword">public</span> String image(Book book) {<br/> | |
<span class="keyword">return</span> <span class="string">"book2.png"</span>;<br/> | |
}<br/> | |
<span class="keyword">public</span> String text(Borrower b) {<br/> | |
<span class="keyword">return</span> <span class="string">"Borrower: "</span> + b.getFirstName();<br/> | |
}<br/> | |
} | |
</p> | |
</div> | |
</div> | |
</p> | |
<a name="ViewerContentProvider" ></a> | |
<h2>Viewer Content Provider</h2> | |
<p> | |
The programmer can provide a specific implementation of <a class="jdoc" href="http://help.eclipse.org/helios/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/IContentProvider.html" title="org.eclipse.jface.viewers.IContentProvider">IContentProvider</abbr></a> | |
by injecting it in the spefic module <em>(TODO)</em>. EMF Parsley provides an implementation with the class | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/edit/ui/provider/ViewerContentProvider.html" title="org.eclipse.emf.parsley.edit.ui.provider.ViewerContentProvider">ViewerContentProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/edit/ui/provider/ViewerContentProvider.java" title="View Source Code" >(src)</a> that can be easily used to | |
specify the children of all object on the tree, like in the example below. | |
</p> | |
<p> | |
<div class="literallayout"> | |
<div class="incode"> | |
<p class="code"> | |
<span class="keyword">public</span> <span class="keyword">class</span> CustomLibraryViewerContentProvider <span class="keyword">extends</span> ViewerContentProvider {<br/> | |
@Inject<br/> | |
<span class="keyword">public</span> CustomLibraryViewerContentProvider(AdapterFactory adapterFactory) {<br/> | |
<span class="keyword">super</span>(adapterFactory);<br/> | |
}<br/> | |
<span class="keyword">public</span> Object children(Library library) {<br/> | |
<span class="keyword">return</span> library.getBooks();<br/> | |
}<br/> | |
<span class="keyword">public</span> Object children(Book book) {<br/> | |
ArrayList<Object> children = <span class="keyword">new</span> ArrayList<Object>();<br/> | |
Writer author = book.getAuthor();<br/> | |
<span class="keyword">if</span> (author != null) {<br/> | |
children.add(author);<br/> | |
}<br/> | |
children.addAll(book.getBorrowers());<br/> | |
<span class="keyword">return</span> children;<br/> | |
}<br/> | |
} | |
</p> | |
</div> | |
</div> | |
</p> | |
<a name="ProposalProvider" ></a> | |
<h2>Proposal Provider</h2> | |
<p> | |
<em>This can be done with Parsley DSL too!</em> | |
Some controls use a list of proposal to help the end user experince: for example the combo box has a | |
list of proposal, but also the simple text can use the proposal to assist and correct the hand-writed | |
values. For each feature it can be specified a list of proposals using a method that starts with the | |
keyword <em>'proposals'</em> followed byt the EClass and Feature undescore-character-separated. | |
</p> | |
<p> | |
<div class="literallayout"> | |
<div class="incode"> | |
<p class="code"> | |
<span class="keyword">public</span> List<?> proposals_Book_author(Book book) {<br/> | |
List<Object> proposals = <span class="keyword">new</span> LinkedList<Object>();<br/> | |
Writer writer = EXTLibraryFactory.eINSTANCE.createWriter();<br/> | |
writer.setFirstName(<span class="string">"Fake"</span>);<br/> | |
writer.setLastName(<span class="string">"Writer"</span>);<br/> | |
proposals.add(writer);<br/> | |
writer = EXTLibraryFactory.eINSTANCE.createWriter();<br/> | |
writer.setFirstName(<span class="string">"Fake"</span>);<br/> | |
writer.setLastName(<span class="string">"Writer2"</span>);<br/> | |
proposals.add(writer);<br/> | |
<span class="keyword">return</span> proposals;<br/> | |
} | |
</p> | |
</div> | |
</div> | |
</p> | |
<a name="ViewerContextMenuFactory" ></a> | |
<h2>Viewer Context Menu Factory</h2> | |
<p> | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/menus/ViewerContextMenuFactory.html" title="org.eclipse.emf.parsley.menus.ViewerContextMenuFactory">ViewerContextMenuFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/menus/ViewerContextMenuFactory.java" title="View Source Code" >(src)</a> | |
</p> | |
<a name="TableColumnLabelProvider" ></a> | |
<h2>Table Column Label Provider</h2> | |
<p> | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/ui/provider/TableColumnLabelProvider.html" title="org.eclipse.emf.parsley.ui.provider.TableColumnLabelProvider">TableColumnLabelProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/TableColumnLabelProvider.java" title="View Source Code" >(src)</a> | |
</p> | |
<a name="SelectionAndMenu" ></a> | |
<span style="float:left; border-top: 1px dotted #d4d4dd; margin-left: 0; margin-top: 5px; | |
padding: 5px 0; | |
padding-top: 5px;"></span><a style="float: right" href="#">Top</a> | |
<br style="clear:both"></br> | |
<h1>Selection And Menu</h1> | |
<div class="toc"> | |
<ul> | |
<li><a href="04-Customization.php#EmfSelectionHelper.php" >Emf Selection Helper</a></li> | |
</ul> | |
</div> | |
<a name="EmfSelectionHelper" ></a> | |
<h2>Emf Selection Helper</h2> | |
<p> | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/util/EmfSelectionHelper.html" title="org.eclipse.emf.parsley.util.EmfSelectionHelper">EmfSelectionHelper</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/util/EmfSelectionHelper.java" title="View Source Code" >(src)</a> | |
</p> | |
<a name="Builders" ></a> | |
<span style="float:left; border-top: 1px dotted #d4d4dd; margin-left: 0; margin-top: 5px; | |
padding: 5px 0; | |
padding-top: 5px;"></span><a style="float: right" href="#">Top</a> | |
<br style="clear:both"></br> | |
<h1>Builders</h1> | |
<div class="toc"> | |
<ul> | |
<li><a href="04-Customization.php#TableViewerBuilder.php" >Table Viewer Builder</a></li> | |
<li><a href="04-Customization.php#TableViewerColumnBuilder.php" >Table Viewer Column Builder</a></li> | |
</ul> | |
</div> | |
<a name="TableViewerBuilder" ></a> | |
<h2>Table Viewer Builder</h2> | |
<p> | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/builders/TableViewerBuilder.html" title="org.eclipse.emf.parsley.viewers.TableViewerBuilder">TableViewerBuilder</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/builders/TableViewerBuilder.java" title="View Source Code" >(src)</a> | |
</p> | |
<p> | |
<ul> | |
<li><a href="04-Customization.php#TableViewerColumnBuilder.php" title="Go to "Table Viewer Column Builder"">TableViewerColumnBuilder</a></li> | |
<li><a href="04-Customization.php#ViewerInitializer.php" title="Go to "Viewer Initializer"">ViewerInitializer</a></li> | |
</ul> | |
</p> | |
<a name="TableViewerColumnBuilder" ></a> | |
<h2>Table Viewer Column Builder</h2> | |
<p> | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/builders/TableViewerColumnBuilder.html" title="org.eclipse.emf.parsley.viewers.TableViewerColumnBuilder">TableViewerColumnBuilder</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/builders/TableViewerColumnBuilder.java" title="View Source Code" >(src)</a> | |
</p> | |
<p> | |
<ul> | |
<li><a href="04-Customization.php#JfaceProviderFactory.php" title="Go to "Jface Provider Factory"">JfaceProviderFactory</a></li> | |
<li><a href="04-Customization.php#PropertyDescriptionProvider.php" title="Go to "Feature Caption Provider"">PropertyDescriptionProvider</a></li> | |
<li><a href="04-Customization.php#FeaturesProvider.php" title="Go to "Features Provider"">FeaturesProvider</a></li> | |
</ul> | |
</p> | |
<a name="TableViewerEditableColumnBuilder" ></a> | |
<h3>Table Viewer Editable Column Builder</h3> | |
<p> | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/builders/TableViewerEditableColumnBuilder.html" title="org.eclipse.emf.parsley.viewers.TableViewerEditableColumnBuilder">TableViewerEditableColumnBuilder</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/builders/TableViewerEditableColumnBuilder.java" title="View Source Code" >(src)</a> | |
</p> | |
<a name="Factories" ></a> | |
<span style="float:left; border-top: 1px dotted #d4d4dd; margin-left: 0; margin-top: 5px; | |
padding: 5px 0; | |
padding-top: 5px;"></span><a style="float: right" href="#">Top</a> | |
<br style="clear:both"></br> | |
<h1>Factories</h1> | |
<div class="toc"> | |
<ul> | |
<li><a href="04-Customization.php#FormFactory.php" >Form Factory</a></li> | |
<li><a href="04-Customization.php#JfaceProviderFactory.php" >Jface Provider Factory</a></li> | |
<li><a href="04-Customization.php#FormControlFactory.php" >Form Control Factory</a></li> | |
<li><a href="04-Customization.php#TreeFormFactory.php" >Tree Form Factory</a></li> | |
<li><a href="04-Customization.php#ViewerFactory.php" >Viewer Factory</a></li> | |
<li><a href="04-Customization.php#AdapterFactoryEditingDomain.php" >Viewer Factory</a></li> | |
</ul> | |
</div> | |
<a name="FormFactory" ></a> | |
<h2>Form Factory</h2> | |
<p> | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/factories/FormFactory.html" title="org.eclipse.emf.parsley.composite.FormFactory">FormFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/factories/FormFactory.java" title="View Source Code" >(src)</a> | |
</p> | |
<p> | |
<ul> | |
<li><a href="04-Customization.php#FormPropertyDescriptionProvider.php" title="Go to "Form Feature Caption Provider"">FormPropertyDescriptionProvider</a></li> | |
<li><a href="04-Customization.php#FormControlFactory.php" title="Go to "Form Control Factory"">Form Control Factory</a></li> | |
<li><a href="04-Customization.php#EditingDomainFinder.php" title="Go to "Editing Domain Finder"">EditingDomainFinder</a></li> | |
<li><a href="04-Customization.php#JfaceProviderFactory.php" title="Go to "Jface Provider Factory"">JfaceProviderFactory</a></li> | |
<li><a href="04-Customization.php#FeaturesProvider.php" title="Go to "Features Provider"">FeaturesProvider</a></li> | |
</ul> | |
</p> | |
<a name="JfaceProviderFactory" ></a> | |
<h2>Jface Provider Factory</h2> | |
<p> | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/factories/ColumnLabelProviderFactory.html" title="org.eclipse.emf.parsley.viewers.ColumnLabelProviderFactory">ColumnLabelProviderFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/factories/ColumnLabelProviderFactory.java" title="View Source Code" >(src)</a> | |
</p> | |
<p> | |
<ul> | |
<li><a href="04-Customization.php#ViewerLabelProvider.php" title="Go to "Viewer Label Provider"">ViewerLabelProvider</a></li> | |
<li><a href="04-Customization.php#TableColumnLabelProvider.php" title="Go to "Table Column Label Provider"">TableColumnLabelProvider</a></li> | |
</ul> | |
</p> | |
<a name="FormControlFactory" ></a> | |
<h2>Form Control Factory</h2> | |
<p> | |
<em>This can be done with Parsley DSL too!</em> | |
If you want to customize the controls on the right, it can be injected a specification of the class <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/binding/FormControlFactory.html" title="org.eclipse.emf.parsley.composite.FormControlFactory">FormControlFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/binding/FormControlFactory.java" title="View Source Code" >(src)</a>. | |
Using the same polimorphic mechanism of the labels, the programmer can write a method with the keyword <em>'control'</em> | |
followed by the EClass and EStructuralFeature undescore-character-separated. In the signature of the | |
method must be both the <em>DataBinding Context</em> and the <em>Feature Observable</em> that can be used for databinding. | |
</p> | |
<p> | |
<div class="literallayout"> | |
<div class="incode"> | |
<p class="code"> | |
<span class="keyword">public</span> Control control_Writer_name(DataBindingContext dbc,IObservableValue featureObservable) {<br/> | |
<span class="comment">//Creating the control<br/> | |
</span> Text text = getToolkit().createText(getParent(), <span class="string">""</span>);<br/> | |
text.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TREE_BORDER);<br/> | |
text.setBackground(getToolkit().getColors().getColor(IFormColors.TITLE));<br/> | |
<span class="comment">//Binding the control to the feature observable<br/> | |
</span> dbc.bindValue(SWTObservables.observeText(text, SWT.Modify), featureObservable);<br/> | |
<span class="keyword">return</span> text;<br/> | |
} | |
</p> | |
</div> | |
</div> | |
</p> | |
<p> | |
For more info, see the other parts that are used internally by the <em>Form Control Factory</em>: | |
</p> | |
<p> | |
<ul> | |
<li><a href="04-Customization.php#JfaceProviderFactory.php" title="Go to "Jface Provider Factory"">JfaceProviderFactory</a></li> | |
</ul> | |
</p> | |
<a name="TreeFormFactory" ></a> | |
<h2>Tree Form Factory</h2> | |
<p> | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/factories/TreeFormFactory.html" title="org.eclipse.emf.parsley.composite.TreeFormFactory">TreeFormFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/factories/TreeFormFactory.java" title="View Source Code" >(src)</a> | |
</p> | |
<p> | |
<ul> | |
<li><a href="04-Customization.php#ViewerInitializer.php" title="Go to "Viewer Initializer"">ViewerInitializer</a></li> | |
<li><a href="04-Customization.php#FormFactory.php" title="Go to "Form Factory"">FormFactory</a></li> | |
</ul> | |
</p> | |
<a name="ViewerFactory" ></a> | |
<h2>Viewer Factory</h2> | |
<p> | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/factories/ViewerFactory.html" title="org.eclipse.emf.parsley.viewers.ViewerFactory">ViewerFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/factories/ViewerFactory.java" title="View Source Code" >(src)</a> | |
</p> | |
<p> | |
<ul> | |
<li><a href="04-Customization.php#TableViewerBuilder.php" title="Go to "Table Viewer Builder"">TableViewerBuilder</a></li> | |
<li><a href="04-Customization.php#ViewerInitializer.php" title="Go to "Viewer Initializer"">ViewerInitializer</a></li> | |
</ul> | |
</p> | |
<a name="AdapterFactoryEditingDomain" ></a> | |
<h2>Viewer Factory</h2> | |
<p> | |
AdapterFactoryEditingDomain | |
</p> | |
<p> | |
AdapterFactory | |
</p> | |
<a name="Viewers" ></a> | |
<span style="float:left; border-top: 1px dotted #d4d4dd; margin-left: 0; margin-top: 5px; | |
padding: 5px 0; | |
padding-top: 5px;"></span><a style="float: right" href="#">Top</a> | |
<br style="clear:both"></br> | |
<h1>Viewers</h1> | |
<div class="toc"> | |
<ul> | |
<li><a href="04-Customization.php#ViewerInitializer.php" >Viewer Initializer</a></li> | |
</ul> | |
</div> | |
<a name="ViewerInitializer" ></a> | |
<h2>Viewer Initializer</h2> | |
<p> | |
<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/parsley/viewers/ViewerInitializer.html" title="org.eclipse.emf.parsley.viewers.ViewerInitializer">ViewerInitializer</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_9_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/viewers/ViewerInitializer.java" title="View Source Code" >(src)</a> | |
</p> | |
<p> | |
<ul> | |
<li><em>AdapterFactoryEditingDomain</em></li> | |
<li><a href="04-Customization.php#ViewerContextMenuFactory.php" title="Go to "Viewer Context Menu Factory"">AdapterFactory</a></li> | |
<li><em>ILabelProvider</em></li> | |
<li><em>IContentProvider</em></li> | |
</ul> | |
</p> | |
<div id="disqus_thread"></div> | |
<script type="text/javascript" src="documentationRoot.js"></script> | |
<script type="text/javascript"> | |
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ | |
var disqus_shortname = 'xtext'; // required: replace example with your forum shortname | |
// The following are highly recommended additional parameters. Remove the slashes in front to use. | |
var disqus_identifier = 'Customization'; | |
var disqus_url = documentationRoot+'04-Customization.php'; | |
/* * * DON'T EDIT BELOW THIS LINE * * */ | |
(function() { | |
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | |
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; | |
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); | |
})(); | |
</script> | |
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> | |
</div> | |
<br style="clear:both;height:1em;"> |