Documentation: second try
diff --git a/documentation/00-Main.html b/documentation/00-Main.html
new file mode 100644
index 0000000..8c2dab4
--- /dev/null
+++ b/documentation/00-Main.html
@@ -0,0 +1,161 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
+<title>Emf Parsley Guide</title>
+
+<link href="book.css" rel="stylesheet" type="text/css">
+<link href="code.css" rel="stylesheet" type="text/css">
+<link rel="home" href="00-Main.html" title="">
+</head>
+<body>
+<h1>Emf Parsley Guide</h1>
+<ol><li><a href="00-Main_4.html#Emf%20Parsley%20Guide_4">Documentation</a>
+<ol> <li><a href="01-Introduction.html#Introduction">Introduction</a>
+ <ol> <li><a href="01-Introduction.html#reflectiveComponents">Reflective Components</a>
+ </li>
+ <li><a href="01-Introduction.html#easyToCustomize">Easy to Customize</a>
+ </li>
+ <li><a href="01-Introduction.html#architecture">Architecture</a>
+ </li>
+ </ol></li>
+ <li><a href="02-GettingStarted.html#GettingStarted">Getting Started</a>
+ <ol> <li><a href="02-GettingStarted.html#Installation">Installation</a>
+ </li>
+ <li><a href="02-GettingStarted.html#FirstExample">First Example</a>
+ </li>
+ <li><a href="02-GettingStarted.html#RCPMail">RCP Mail Example</a>
+ </li>
+ </ol></li>
+ <li><a href="03-Components.html#Components">Components</a>
+ <ol> <li><a href="03-Components.html#FormComponent">Form Component</a>
+ <ol> <li><a href="03-Components.html#Form_Customizations">Form Customizations</a>
+ </li>
+ </ol></li>
+ <li><a href="03-Components.html#TreeComponent">Tree Component</a>
+ <ol> <li><a href="03-Components.html#Tree_Customizations">Tree Customizations</a>
+ </li>
+ </ol></li>
+ <li><a href="03-Components.html#TreeFormComponent">Tree Form Component</a>
+ <ol> <li><a href="03-Components.html#TreeForm_Customizations">Tree Form Customization</a>
+ </li>
+ </ol></li>
+ <li><a href="03-Components.html#TableComponent">Table Component</a>
+ </li>
+ </ol></li>
+ <li><a href="04-Customization.html#Customization">Customization</a>
+ <ol> <li><a href="04-Customization.html#ResourceManagers">Managing Resources</a>
+ <ol> <li><a href="04-Customization.html#ResourceLoader">Resource Loader</a>
+ </li>
+ <li><a href="04-Customization.html#EmptyResourceInitializer">Empty Resource Initializer</a>
+ </li>
+ <li><a href="04-Customization.html#EditingDomainFinder">Editing Domain Finder</a>
+ </li>
+ <li><a href="04-Customization.html#ResourceSaveManager">Resource Save Manager</a>
+ <ol> <li><a href="04-Customization.html#ValidateResourceSaveManager">Validate Resource Save Manager</a>
+ </li>
+ </ol></li>
+ </ol></li>
+ <li><a href="04-Customization.html#Providers">Providers</a>
+ <ol> <li><a href="04-Customization.html#FeaturesProvider">Features Provider</a>
+ <ol> <li><a href="04-Customization.html#FeatureProvider1">Prima versione</a>
+ </li>
+ <li><a href="04-Customization.html#FeatureProvider2">Seconda versione</a>
+ </li>
+ <li><a href="04-Customization.html#FeaturesColumnProvider">Features Column Provider</a>
+ </li>
+ </ol></li>
+ <li><a href="04-Customization.html#PropertyDescriptionProvider">Property Description Provider</a>
+ <ol> <li><a href="04-Customization.html#FormPropertyDescriptionProvider">Form Property Description Provider</a>
+ </li>
+ </ol></li>
+ <li><a href="04-Customization.html#ViewerLabelProvider">Viewer Label Provider</a>
+ </li>
+ <li><a href="04-Customization.html#ViewerContentProvider">Viewer Content Provider</a>
+ </li>
+ <li><a href="04-Customization.html#ProposalProvider">Proposal Provider</a>
+ </li>
+ <li><a href="04-Customization.html#ViewerContextMenuFactory">Viewer Context Menu Factory</a>
+ </li>
+ <li><a href="04-Customization.html#TableColumnLabelProvider">Table Column Label Provider</a>
+ </li>
+ </ol></li>
+ <li><a href="04-Customization.html#SelectionAndMenu">Selection And Menu</a>
+ <ol> <li><a href="04-Customization.html#EmfSelectionHelper">Emf Selection Helper</a>
+ </li>
+ </ol></li>
+ <li><a href="04-Customization.html#Builders">Builders</a>
+ <ol> <li><a href="04-Customization.html#TableViewerBuilder">Table Viewer Builder</a>
+ </li>
+ <li><a href="04-Customization.html#TableViewerColumnBuilder">Table Viewer Column Builder</a>
+ <ol> <li><a href="04-Customization.html#TableViewerEditableColumnBuilder">Table Viewer Editable Column Builder</a>
+ </li>
+ </ol></li>
+ </ol></li>
+ <li><a href="04-Customization.html#Factories">Factories</a>
+ <ol> <li><a href="04-Customization.html#FormFactory">Form Factory</a>
+ </li>
+ <li><a href="04-Customization.html#JfaceProviderFactory">Jface Provider Factory</a>
+ </li>
+ <li><a href="04-Customization.html#FormControlFactory">Form Control Factory</a>
+ </li>
+ <li><a href="04-Customization.html#TreeFormFactory">Tree Form Factory</a>
+ </li>
+ <li><a href="04-Customization.html#ViewerFactory">Viewer Factory</a>
+ </li>
+ <li><a href="04-Customization.html#AdapterFactoryEditingDomain">Viewer Factory</a>
+ </li>
+ </ol></li>
+ <li><a href="04-Customization.html#Viewers">Viewers</a>
+ <ol> <li><a href="04-Customization.html#ViewerInitializer">Viewer Initializer</a>
+ </li>
+ </ol></li>
+ </ol></li>
+ <li><a href="05-DSL.html#DSL">EMF Components DSL</a>
+ <ol> <li><a href="05-DSL.html#xbase">Xbase features</a>
+ </li>
+ </ol></li>
+ <li><a href="06-AdvancedComponents.html#AdvancedComponents">Advanced Components</a>
+ </li>
+ <li><a href="07-Eclipse4.html#Eclipse4">Eclipse 4</a>
+ <ol> <li><a href="07-Eclipse4.html#GetFirstExample">First Example Setup</a>
+ </li>
+ <li><a href="07-Eclipse4.html#PrepareForEclipse4Application">Preparing for a pure Eclipse 4 Application</a>
+ </li>
+ <li><a href="07-Eclipse4.html#CreateEclipse4Application">Create an Eclipse 4 Application</a>
+ </li>
+ <li><a href="07-Eclipse4.html#Eclipse4ApplicationAndEMFComponents">Using an EMF Parsley TreeComposite into an Eclipse 4 Part</a>
+ </li>
+ <li><a href="07-Eclipse4.html#Eclipse4Save">Adding the dirty state and Save command</a>
+ </li>
+ </ol></li>
+</ol></li>
+<li><a href="00-Main_5.html#Emf%20Parsley%20Guide_5">Appendix</a>
+<ol> <li><a href="GettingSources.html#GettingSources">Getting Sources</a>
+ <ol> <li><a href="GettingSources.html#InstallBuckminster">Install Buckminster in the IDE</a>
+ </li>
+ <li><a href="GettingSources.html#PrepareTP">Prepare an empty target platform</a>
+ </li>
+ <li><a href="GettingSources.html#MaterializeWP">Materialize the Workspace</a>
+ <ol> <li><a href="GettingSources.html#CustomizeProperties">(Optional) Customize some Properties</a>
+ </li>
+ <li><a href="GettingSources.html#StartMaterialization">Start Materialization</a>
+ </li>
+ </ol></li>
+ </ol></li>
+ <li><a href="samples.html#samples">Xdoc Samples</a>
+ <ol> <li><a href="samples.html#Links">References</a>
+ </li>
+ <li><a href="samples.html#CodeSections">Code Sections</a>
+ </li>
+ <li><a href="samples.html#Lists">Lists and Tables</a>
+ </li>
+ <li><a href="samples.html#Tables">Tables</a>
+ </li>
+ <li><a href="samples.html#TODO">TODO</a>
+ </li>
+ <li><a href="samples.html#Images">Images</a>
+ </li>
+ </ol></li>
+</ol></li>
+</ol></body>
+</html>
diff --git a/documentation/00-Main_4.html b/documentation/00-Main_4.html
new file mode 100644
index 0000000..933bdfc
--- /dev/null
+++ b/documentation/00-Main_4.html
@@ -0,0 +1,132 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
+<title>Documentation</title>
+
+<link href="book.css" rel="stylesheet" type="text/css">
+<link href="code.css" rel="stylesheet" type="text/css">
+<link rel="home" href="00-Main.html" title="">
+</head>
+<body>
+<a name="Emf%20Parsley%20Guide_4"></a>
+<h1>Documentation</h1>
+<ol><li><a href="01-Introduction.html#Introduction">Introduction</a>
+<ol> <li><a href="01-Introduction.html#reflectiveComponents">Reflective Components</a>
+ </li>
+ <li><a href="01-Introduction.html#easyToCustomize">Easy to Customize</a>
+ </li>
+ <li><a href="01-Introduction.html#architecture">Architecture</a>
+ </li>
+</ol></li>
+<li><a href="02-GettingStarted.html#GettingStarted">Getting Started</a>
+<ol> <li><a href="02-GettingStarted.html#Installation">Installation</a>
+ </li>
+ <li><a href="02-GettingStarted.html#FirstExample">First Example</a>
+ </li>
+ <li><a href="02-GettingStarted.html#RCPMail">RCP Mail Example</a>
+ </li>
+</ol></li>
+<li><a href="03-Components.html#Components">Components</a>
+<ol> <li><a href="03-Components.html#FormComponent">Form Component</a>
+ <ol> <li><a href="03-Components.html#Form_Customizations">Form Customizations</a>
+ </li>
+ </ol></li>
+ <li><a href="03-Components.html#TreeComponent">Tree Component</a>
+ <ol> <li><a href="03-Components.html#Tree_Customizations">Tree Customizations</a>
+ </li>
+ </ol></li>
+ <li><a href="03-Components.html#TreeFormComponent">Tree Form Component</a>
+ <ol> <li><a href="03-Components.html#TreeForm_Customizations">Tree Form Customization</a>
+ </li>
+ </ol></li>
+ <li><a href="03-Components.html#TableComponent">Table Component</a>
+ </li>
+</ol></li>
+<li><a href="04-Customization.html#Customization">Customization</a>
+<ol> <li><a href="04-Customization.html#ResourceManagers">Managing Resources</a>
+ <ol> <li><a href="04-Customization.html#ResourceLoader">Resource Loader</a>
+ </li>
+ <li><a href="04-Customization.html#EmptyResourceInitializer">Empty Resource Initializer</a>
+ </li>
+ <li><a href="04-Customization.html#EditingDomainFinder">Editing Domain Finder</a>
+ </li>
+ <li><a href="04-Customization.html#ResourceSaveManager">Resource Save Manager</a>
+ <ol> <li><a href="04-Customization.html#ValidateResourceSaveManager">Validate Resource Save Manager</a>
+ </li>
+ </ol></li>
+ </ol></li>
+ <li><a href="04-Customization.html#Providers">Providers</a>
+ <ol> <li><a href="04-Customization.html#FeaturesProvider">Features Provider</a>
+ <ol> <li><a href="04-Customization.html#FeatureProvider1">Prima versione</a>
+ </li>
+ <li><a href="04-Customization.html#FeatureProvider2">Seconda versione</a>
+ </li>
+ <li><a href="04-Customization.html#FeaturesColumnProvider">Features Column Provider</a>
+ </li>
+ </ol></li>
+ <li><a href="04-Customization.html#PropertyDescriptionProvider">Property Description Provider</a>
+ <ol> <li><a href="04-Customization.html#FormPropertyDescriptionProvider">Form Property Description Provider</a>
+ </li>
+ </ol></li>
+ <li><a href="04-Customization.html#ViewerLabelProvider">Viewer Label Provider</a>
+ </li>
+ <li><a href="04-Customization.html#ViewerContentProvider">Viewer Content Provider</a>
+ </li>
+ <li><a href="04-Customization.html#ProposalProvider">Proposal Provider</a>
+ </li>
+ <li><a href="04-Customization.html#ViewerContextMenuFactory">Viewer Context Menu Factory</a>
+ </li>
+ <li><a href="04-Customization.html#TableColumnLabelProvider">Table Column Label Provider</a>
+ </li>
+ </ol></li>
+ <li><a href="04-Customization.html#SelectionAndMenu">Selection And Menu</a>
+ <ol> <li><a href="04-Customization.html#EmfSelectionHelper">Emf Selection Helper</a>
+ </li>
+ </ol></li>
+ <li><a href="04-Customization.html#Builders">Builders</a>
+ <ol> <li><a href="04-Customization.html#TableViewerBuilder">Table Viewer Builder</a>
+ </li>
+ <li><a href="04-Customization.html#TableViewerColumnBuilder">Table Viewer Column Builder</a>
+ <ol> <li><a href="04-Customization.html#TableViewerEditableColumnBuilder">Table Viewer Editable Column Builder</a>
+ </li>
+ </ol></li>
+ </ol></li>
+ <li><a href="04-Customization.html#Factories">Factories</a>
+ <ol> <li><a href="04-Customization.html#FormFactory">Form Factory</a>
+ </li>
+ <li><a href="04-Customization.html#JfaceProviderFactory">Jface Provider Factory</a>
+ </li>
+ <li><a href="04-Customization.html#FormControlFactory">Form Control Factory</a>
+ </li>
+ <li><a href="04-Customization.html#TreeFormFactory">Tree Form Factory</a>
+ </li>
+ <li><a href="04-Customization.html#ViewerFactory">Viewer Factory</a>
+ </li>
+ <li><a href="04-Customization.html#AdapterFactoryEditingDomain">Viewer Factory</a>
+ </li>
+ </ol></li>
+ <li><a href="04-Customization.html#Viewers">Viewers</a>
+ <ol> <li><a href="04-Customization.html#ViewerInitializer">Viewer Initializer</a>
+ </li>
+ </ol></li>
+</ol></li>
+<li><a href="05-DSL.html#DSL">EMF Components DSL</a>
+<ol> <li><a href="05-DSL.html#xbase">Xbase features</a>
+ </li>
+</ol></li>
+<li><a href="06-AdvancedComponents.html#AdvancedComponents">Advanced Components</a>
+</li>
+<li><a href="07-Eclipse4.html#Eclipse4">Eclipse 4</a>
+<ol> <li><a href="07-Eclipse4.html#GetFirstExample">First Example Setup</a>
+ </li>
+ <li><a href="07-Eclipse4.html#PrepareForEclipse4Application">Preparing for a pure Eclipse 4 Application</a>
+ </li>
+ <li><a href="07-Eclipse4.html#CreateEclipse4Application">Create an Eclipse 4 Application</a>
+ </li>
+ <li><a href="07-Eclipse4.html#Eclipse4ApplicationAndEMFComponents">Using an EMF Parsley TreeComposite into an Eclipse 4 Part</a>
+ </li>
+ <li><a href="07-Eclipse4.html#Eclipse4Save">Adding the dirty state and Save command</a>
+ </li>
+</ol></li>
+</ol></body>
+</html>
diff --git a/documentation/00-Main_5.html b/documentation/00-Main_5.html
new file mode 100644
index 0000000..46b658e
--- /dev/null
+++ b/documentation/00-Main_5.html
@@ -0,0 +1,40 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
+<title>Appendix</title>
+
+<link href="book.css" rel="stylesheet" type="text/css">
+<link href="code.css" rel="stylesheet" type="text/css">
+<link rel="home" href="00-Main.html" title="">
+</head>
+<body>
+<a name="Emf%20Parsley%20Guide_5"></a>
+<h1>Appendix</h1>
+<ol><li><a href="GettingSources.html#GettingSources">Getting Sources</a>
+<ol> <li><a href="GettingSources.html#InstallBuckminster">Install Buckminster in the IDE</a>
+ </li>
+ <li><a href="GettingSources.html#PrepareTP">Prepare an empty target platform</a>
+ </li>
+ <li><a href="GettingSources.html#MaterializeWP">Materialize the Workspace</a>
+ <ol> <li><a href="GettingSources.html#CustomizeProperties">(Optional) Customize some Properties</a>
+ </li>
+ <li><a href="GettingSources.html#StartMaterialization">Start Materialization</a>
+ </li>
+ </ol></li>
+</ol></li>
+<li><a href="samples.html#samples">Xdoc Samples</a>
+<ol> <li><a href="samples.html#Links">References</a>
+ </li>
+ <li><a href="samples.html#CodeSections">Code Sections</a>
+ </li>
+ <li><a href="samples.html#Lists">Lists and Tables</a>
+ </li>
+ <li><a href="samples.html#Tables">Tables</a>
+ </li>
+ <li><a href="samples.html#TODO">TODO</a>
+ </li>
+ <li><a href="samples.html#Images">Images</a>
+ </li>
+</ol></li>
+</ol></body>
+</html>
diff --git a/documentation/01-Introduction.html b/documentation/01-Introduction.html
index c01757e..641cd88 100644
--- a/documentation/01-Introduction.html
+++ b/documentation/01-Introduction.html
@@ -1,159 +1,33 @@
-<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#reflectiveComponents.html" ><a href="01-Introduction.php#reflectiveComponents.php" >Reflective Components</a></li>
- <li id="01-Introduction.html#easyToCustomize.html" ><a href="01-Introduction.php#easyToCustomize.php" >Easy to Customize</a></li>
- <li id="01-Introduction.html#architecture.html" ><a href="01-Introduction.php#architecture.php" >Architecture</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 Components 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#Eclipse4ApplicationAndEMFComponents.html" ><a href="07-Eclipse4.php#Eclipse4ApplicationAndEMFComponents.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; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" />
- <a href="GettingSources.php">Getting Sources</a></div>
- <ul style="display: none;" id="subToc_GettingSources.html">
- <li id="GettingSources.html#InstallBuckminster.html" ><a href="GettingSources.php#InstallBuckminster.php" >Install Buckminster in the IDE</a></li>
- <li id="GettingSources.html#PrepareTP.html" ><a href="GettingSources.php#PrepareTP.php" >Prepare an empty target platform</a></li>
- <li id="GettingSources.html#MaterializeWP.html" ><a href="GettingSources.php#MaterializeWP.php" >Materialize the Workspace</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="samples.php">Xdoc Samples</a></div>
- <ul style="display: none;" id="subToc_samples.html">
- <li id="samples.html#Links.html" ><a href="samples.php#Links.php" >References</a></li>
- <li id="samples.html#CodeSections.html" ><a href="samples.php#CodeSections.php" >Code Sections</a></li>
- <li id="samples.html#Lists.html" ><a href="samples.php#Lists.php" >Lists and Tables</a></li>
- <li id="samples.html#Tables.html" ><a href="samples.php#Tables.php" >Tables</a></li>
- <li id="samples.html#TODO.html" ><a href="samples.php#TODO.php" >TODO</a></li>
- <li id="samples.html#Images.html" ><a href="samples.php#Images.php" >Images</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div id="midcolumn">
- <a name="Introduction" ></a>
- <h1>Introduction</h1>
- <div class="toc">
- <ul>
- <li><a href="01-Introduction.php#reflectiveComponents.php" >Reflective Components</a></li>
- <li><a href="01-Introduction.php#easyToCustomize.php" >Easy to Customize</a></li>
- <li><a href="01-Introduction.php#architecture.php" >Architecture</a></li>
- </ul>
- </div>
-
- <p>
- Emf Parsley is a lightweight framework that allows easy and quick development
- of EMF-based Applications. It can be configured to use all kind of EMF persistence
- implementations (XMI, Teneo, CDO).
- </p>
- <p>
- It aims at providing a set of Components like Trees, Tables and Detail Forms
- that manage the model with the introspective EMF capabilities.
- Using these components you can easily build forms, viewer or editors.
- The framework provides basic UI implementations which are customizable
- with Injection mechanism
- (based on <a href="http://code.google.com/p/google-guice" >Google Guice</a>).
- </p>
- <a name="reflectiveComponents" ></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>Reflective Components</h1>
- <a name="easyToCustomize" ></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>Easy to Customize</h1>
- <a name="architecture" ></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>Architecture</h1>
- <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 = 'Introduction';
- var disqus_url = documentationRoot+'01-Introduction.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;">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
+<title>Introduction</title>
+
+<link href="book.css" rel="stylesheet" type="text/css">
+<link href="code.css" rel="stylesheet" type="text/css">
+<link rel="home" href="xtext.html" title="">
+</head>
+<body>
+<a name="Introduction"></a>
+<h1>Introduction</h1>
+<p>
+Emf Parsley is a lightweight framework that allows easy and quick development
+of EMF-based Applications. It can be configured to use all kind of EMF persistence
+implementations (XMI, Teneo, CDO).
+</p>
+<p>
+It aims at providing a set of Components like Trees, Tables and Detail Forms
+that manage the model with the introspective EMF capabilities.
+Using these components you can easily build forms, viewer or editors.
+The framework provides basic UI implementations which are customizable
+with Injection mechanism
+(based on <a href="http://code.google.com/p/google-guice">Google Guice</a>).
+</p>
+<a name="reflectiveComponents"></a>
+<h2>Reflective Components</h2>
+<a name="easyToCustomize"></a>
+<h2>Easy to Customize</h2>
+<a name="architecture"></a>
+<h2>Architecture</h2>
+</body>
+</html>
diff --git a/documentation/01-Introduction.php b/documentation/01-Introduction.php
deleted file mode 100644
index db46f84..0000000
--- a/documentation/01-Introduction.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
- include("include.php");
- $pageTitle = "Introduction";
-
- $html = file_get_contents('01-Introduction.html');
-
- $Nav->setLinkList(array());
-
- $App->AddExtraHtmlHeader('
- <script type="text/javascript">
- function init() {
- var docName = "01-Introduction.html";
- initTocMenu(docName);
- highlightCurrentSection(docName);
- }
-
- function initTocMenu(ActiveSubTocElementId){
- var menu = document.getElementById("leftnav");
-
- var chapters = menu.children;
- addHideSubsectionFunction(chapters);
- var subToc = document.getElementById(\'subToc_\' + ActiveSubTocElementId);
- if(subToc) {
- subToc.style.display = "block";
- subToc.previousElementSibling.children[0].style.display = "none"
- subToc.previousElementSibling.children[1].style.display = "inline"
- }
- }
-
- function switchImages(chap) {
-
- }
-
- function addHideSubsectionFunction(items){
- for (var i = 0; i < items.length; i++) {
- if (items[i].firstElementChild != null && items[i].className == "separator"){
- if(items[i].firstElementChild.firstElementChild != null){
- items[i].firstElementChild.firstElementChild.onclick = function(){this.nextElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- items[i].firstElementChild.firstElementChild.nextElementSibling.onclick = function(){this.previousElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- }
- items[i].firstElementChild.style.cursor = "pointer";
- }
- }
- }
-
- function toc_toggle_subsections(chap){
- if ( chap.children[1].style.display != "none" ) {
- chap.children[1].style.display = "none"
- } else {
- chap.children[1].style.display = "block"
- }
- }
-
- function highlightCurrentSection(sec) {
- document.getElementById(sec).style.backgroundColor= "#D0D0D0"
- }
-
- if ( window.addEventListener ) {
- window.addEventListener( "load", init, false );
- }
- else if ( window.attachEvent ) {
- window.attachEvent( "onload", init );
- } else
- if ( window.onLoad ) {
- window.onload = init;
- }
- </script>');
-
- # Generate the web page
- $App->generatePage("Nova", $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
diff --git a/documentation/02-GettingStarted.html b/documentation/02-GettingStarted.html
index 003ea8a..89112af 100644
--- a/documentation/02-GettingStarted.html
+++ b/documentation/02-GettingStarted.html
@@ -1,576 +1,485 @@
-<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#reflectiveComponents.html" ><a href="01-Introduction.php#reflectiveComponents.php" >Reflective Components</a></li>
- <li id="01-Introduction.html#easyToCustomize.html" ><a href="01-Introduction.php#easyToCustomize.php" >Easy to Customize</a></li>
- <li id="01-Introduction.html#architecture.html" ><a href="01-Introduction.php#architecture.php" >Architecture</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 Components 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#Eclipse4ApplicationAndEMFComponents.html" ><a href="07-Eclipse4.php#Eclipse4ApplicationAndEMFComponents.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; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" />
- <a href="GettingSources.php">Getting Sources</a></div>
- <ul style="display: none;" id="subToc_GettingSources.html">
- <li id="GettingSources.html#InstallBuckminster.html" ><a href="GettingSources.php#InstallBuckminster.php" >Install Buckminster in the IDE</a></li>
- <li id="GettingSources.html#PrepareTP.html" ><a href="GettingSources.php#PrepareTP.php" >Prepare an empty target platform</a></li>
- <li id="GettingSources.html#MaterializeWP.html" ><a href="GettingSources.php#MaterializeWP.php" >Materialize the Workspace</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="samples.php">Xdoc Samples</a></div>
- <ul style="display: none;" id="subToc_samples.html">
- <li id="samples.html#Links.html" ><a href="samples.php#Links.php" >References</a></li>
- <li id="samples.html#CodeSections.html" ><a href="samples.php#CodeSections.php" >Code Sections</a></li>
- <li id="samples.html#Lists.html" ><a href="samples.php#Lists.php" >Lists and Tables</a></li>
- <li id="samples.html#Tables.html" ><a href="samples.php#Tables.php" >Tables</a></li>
- <li id="samples.html#TODO.html" ><a href="samples.php#TODO.php" >TODO</a></li>
- <li id="samples.html#Images.html" ><a href="samples.php#Images.php" >Images</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div id="midcolumn">
- <a name="GettingStarted" ></a>
- <h1>Getting Started</h1>
- <div class="toc">
- <ul>
- <li><a href="02-GettingStarted.php#Installation.php" >Installation</a></li>
- <li><a href="02-GettingStarted.php#FirstExample.php" >First Example</a></li>
- <li><a href="02-GettingStarted.php#RCPMail.php" >RCP Mail Example</a></li>
- </ul>
- </div>
-
- <p>
- To get started, you should first download "Eclipse Modeling Tools" from <a href="http://www.eclipse.org/downloads/" >Eclipse
- Downloads</a>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="" href="images/eclipseModelingTools.png">
- <img src="images/eclipseModelingTools.png"
- width="600px"
- />
- </a>
- <div class="caption">
- </div>
- </div>
-
- This will ensure you have EMF and related Tools installed and ready to go.
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
+<title>Getting Started</title>
+
+<link href="book.css" rel="stylesheet" type="text/css">
+<link href="code.css" rel="stylesheet" type="text/css">
+<link rel="home" href="xtext.html" title="">
+</head>
+<body>
+<a name="GettingStarted"></a>
+<h1>Getting Started</h1>
+<p>
+To get started, you should first download "Eclipse Modeling Tools" from <a href="http://www.eclipse.org/downloads/">Eclipse
+Downloads</a>
+<div class="image" >
+<img src="images/eclipseModelingTools.png" class=" "
+/>
+<div class="caption">
+</div>
+</div>
+
+This will ensure you have EMF and related Tools installed and ready to go.
+</p>
+<a name="Installation"></a>
+<h2>Installation</h2>
+<p>
+Now select "Help" -> "Install New Software..." and in the "Work with:" field insert the EMF Components update
+site <a href="http://www.rcp-vision.com/emf-components/updates/">http://www.rcp-vision.com/emf-components/updates/</a>
+and install all features.
+Although sources are not strictly required, it might help when using EMF Components
+to have a look at its sources.
+</p>
+<p>
+<div class="image" >
+<img src="images/emf-components-update-site.png" class=" "
+/>
+<div class="caption">
+</div>
+</div>
+</p>
+<a name="FirstExample"></a>
+<h2>First Example</h2>
+<p>
+The purpose of this first example is to make use of the classical EMF Library Model example and
+create a view for editing such models using an EMF Components enabled plug-in.
+</p>
+<p>
+So let's start by creating the model plug-in with
+</p>
+<p>
+<ol>
+ <li>
+ File -> New... -> Example...
+ </li>
+ <li>
+ from Category "Eclipse Modeling Framework", select "Extended Library Model Example"
+ </li>
+ <li>
+ press Next and Finish
+ </li>
+</ol>
+</p>
+<p>
+You will end up with three plug-ins:
+</p>
+<p>
+<ul>
+ <li>
+ org.eclipse.emf.examples.library (the model plug-in)
+ </li>
+ <li>
+ org.eclipse.emf.examples.library.edit (the edit plug-in)
+ </li>
+ <li>
+ org.eclipse.emf.examples.library.editor (the editor plug-in)
+ </li>
+</ul>
+</p>
+<p>
+We only need the first plugin, so you might want to remove the .edit and .editor plugins.
+</p>
+<p>
+Now you can create your first example with the appropriate wizard.
+</p>
+<p>
+<ol>
+ <li>
+ select "File" -> "New" -> "Project..."
+ </li>
+ <li>
+ from the "Emf Parsley" category select "Emf Parsley Dsl based Project"
+ </li>
+ <li>
+ click "Next"
+ </li>
+ <li>
+ give a name to the project (e.g. "org.eclipse.emf.parsley.examples.firstexample")
+ </li>
+ <li>
+ click "Finish"
+ </li>
+</ol>
+
+
+The generated project has some classes and a <em>module.parlsey</em> file, which opens automatically.
+Just type the following content into the {} block (note that context assist is available)
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+ <span class="keyword">parts</span> {
+<br/>
+ <span class="keyword">viewpart</span> org.eclipse.emf.parsley.examples.firstexample.view.library.treeform {
+<br/>
+<span class="keyword">viewname</span> <span class="string">"My Library Tree Form"</span>
+<br/>
+<span class="keyword">viewclass</span>
+<br/>
+ }
+<br/>
+ }
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+Here above we have just declared a view part with
+
+<ol>
+ <li>
+ id <em>"org.eclipse.emf.parsley.examples.firstexample.view.library.treeform"</em>
+ </li>
+ <li>
+ name <em>"Library Tree Form"</em>
+ </li>
+ <li>
+ class: not yet set, we are going to create
+ <em>"org.eclipse.emf.parsley.examples.firstexample.views.LibraryTreeFormView"</em>
+ </li>
+</ol>
+</p>
+<p>
+So there is still an error, in fact we need to create the declared class.
+<em>Suggestion:</em> Just copy the above qualified class name (<em>"org.eclipse.emf.parsley.examples.firstexample.views.LibraryTreeFormView"</em>),
+select the project, right-click and select File -> New -> Class. Now paste the clipboard content into <em>"Name:"</em> field: the
+package and class name will be automatically splitted into right fields. Then click <em>"Finish"</em>.
+</p>
+<p>
+Now modify the view class code with this content:
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+<span class="keyword">import</span> org.eclipse.emf.parsley.views.AbstractSaveableTreeFormView;
+<br/>
+<span class="keyword">import</span> org.eclipse.emf.common.util.URI;
+<br/>
+<span class="keyword">public</span> <span class="keyword">class</span> LibraryTreeFormView <span class="keyword">extends</span> AbstractSaveableTreeFormView {
+<br/>
+ <span class="keyword">protected</span> URI createResourceURI() {
+<br/>
+<span class="keyword">return</span> URI.createFileURI( System.getProperty(<span class="string">"user.home"</span>) + <span class="string">"/MyLibrary.library"</span> );
+<br/>
+ }
+<br/>
+}
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+Now get back to <em>module.parlsey</em> file, go just after <em>"viewclass"</em> keyword, type <em>"LibraryTreeFormView"</em>
+and <em>Ctrl-Space</em>: the content assist will set automatically the correct qualified name
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+ <span class="keyword">viewclass</span> org.eclipse.emf.parsley.examples.firstexample.views.LibraryTreeFormView
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+when you save the above file you will notice that a new file (<em>"plugin.xml_emfparsley_gen"</em>)
+is generated into the root folder of your project. Just copy this file into <em>"plugin.xml"</em>.
+</p>
+<p>
+Let's focus briefly on the above <em>createResourceURI()</em> method: our goal is allowing to manage
+a library model instance which persists on a EMF Resource.
+In this example we choose to use the EMF default persistence (XMI), but you can provide any URI
+(e.g. using Teneo, CDO or any other EMF Resource Persistence implementation)
+In particular here we choose to persist the Resource in a XMI file named <em>"MyLibrary.library"</em> into the user home
+folder (you might want to change it with any other path).
+</p>
+<p>
+We need a <em>Dependency</em> from the model plug-in: so open <em>MANIFEST.MF</em> file, go to <em>Dependencies</em>
+tab, press <em>"Add..."</em> button in <em>"Required Plug-ins"</em> section and insert <em>"org.eclipse.emf.examples.library"</em>
+among dependencies.
+</p>
+<p>
+Before executing this code we need to do some little more work in order to initialize the Resource.
+</p>
+<p>
+An easy way to overcome this issue can be the following:
+</p>
+<p>
+<ol>
+ <li>
+ open the class *GuiceModule (FirstexampleGuiceModule in this example) that the wizard created for you.
+ Note that this is a key class for all customizations; it allows to override several methods in order to provide custom behaviors
+ and implementations.
+ </li>
+ <li>
+ override method <em>bindEmptyResourceInitializer()</em> providing a class for Resource initialization
+
+ <div class="literallayout">
+ <div class="incode">
+ <p class="code">
+ <span class="keyword">public</span> Class<? <span class="keyword">extends</span> EmptyResourceInitializer> bindEmptyResourceInitializer() {
+ <br/>
+ <span class="keyword">return</span> LibraryEmptyResourceInitializer.<span class="keyword">class</span>;
+ <br/>
+ }
+ <br/>
</p>
- <a name="Installation" ></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>Installation</h1>
- <p>
- Now select "Help" -> "Install New Software..." and in the "Work with:" field insert the EMF Components update
- site <a href="http://www.rcp-vision.com/emf-components/updates/" >http://www.rcp-vision.com/emf-components/updates/</a>
- and install all features.
- Although sources are not strictly required, it might help when using EMF Components
- to have a look at its sources.
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="" href="images/emf-components-update-site.png">
- <img src="images/emf-components-update-site.png"
- width="600px"
- />
- </a>
- <div class="caption">
- </div>
- </div>
- </p>
- <a name="FirstExample" ></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>First Example</h1>
- <p>
- The purpose of this first example is to make use of the classical EMF Library Model example and
- create a view for editing such models using an EMF Components enabled plug-in.
- </p>
- <p>
- So let's start by creating the model plug-in with
- </p>
- <p>
- <ol>
- <li>File -> New... -> Example...</li>
- <li>from Category "Eclipse Modeling Framework", select "Extended Library Model Example"</li>
- <li>press Next and Finish</li>
- </ol>
- </p>
- <p>
- You will end up with three plug-ins:
- </p>
- <p>
- <ul>
- <li>org.eclipse.emf.examples.library (the model plug-in)</li>
- <li>org.eclipse.emf.examples.library.edit (the edit plug-in)</li>
- <li>org.eclipse.emf.examples.library.editor (the editor plug-in)</li>
- </ul>
- </p>
- <p>
- We only need the first plugin, so you might want to remove the .edit and .editor plugins.
- </p>
- <p>
- Now you can create your first example with the appropriate wizard.
- </p>
- <p>
- <ol>
- <li>select "File" -> "New" -> "Project..."</li>
- <li>from the "Emf Parsley" category select "Emf Parsley Dsl based Project"</li>
- <li>click "Next"</li>
- <li>give a name to the project (e.g. "org.eclipse.emf.parsley.examples.firstexample")</li>
- <li>click "Finish"</li>
- </ol>
-
-
- The generated project has some classes and a <em>module.parlsey</em> file, which opens automatically.
- Just type the following content into the {} block (note that context assist is available)
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="keyword">parts</span> {
- <br/>
- <span class="keyword">viewpart</span> org.eclipse.emf.parsley.examples.firstexample.view.library.treeform {
- <br/>
- <span class="keyword">viewname</span> <span class="string">"My Library Tree Form"</span>
- <br/>
- <span class="keyword">viewclass</span>
- <br/>
- }
- <br/>
- }
- </p>
- </div>
- </div>
- </p>
- <p>
- Here above we have just declared a view part with
-
- <ol>
- <li>id <em>"org.eclipse.emf.parsley.examples.firstexample.view.library.treeform"</em></li>
- <li>name <em>"Library Tree Form"</em></li>
- <li>class: not yet set, we are going to create
- <em>"org.eclipse.emf.parsley.examples.firstexample.views.LibraryTreeFormView"</em></li>
- </ol>
- </p>
- <p>
- So there is still an error, in fact we need to create the declared class.
- <em>Suggestion:</em> Just copy the above qualified class name (<em>"org.eclipse.emf.parsley.examples.firstexample.views.LibraryTreeFormView"</em>),
- select the project, right-click and select File -> New -> Class. Now paste the clipboard content into <em>"Name:"</em> field: the
- package and class name will be automatically splitted into right fields. Then click <em>"Finish"</em>.
- </p>
- <p>
- Now modify the view class code with this content:
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="keyword">import</span> org.eclipse.emf.parsley.views.AbstractSaveableTreeFormView;
- <br/>
- <span class="keyword">import</span> org.eclipse.emf.common.util.URI;
- <br/>
- <span class="keyword">public</span> <span class="keyword">class</span> LibraryTreeFormView <span class="keyword">extends</span> AbstractSaveableTreeFormView {
- <br/>
- <span class="keyword">protected</span> URI createResourceURI() {
- <br/>
- <span class="keyword">return</span> URI.createFileURI( System.getProperty(<span class="string">"user.home"</span>) + <span class="string">"/MyLibrary.library"</span> );
- <br/>
- }
- <br/>
- }
- </p>
- </div>
- </div>
- </p>
- <p>
- Now get back to <em>module.parlsey</em> file, go just after <em>"viewclass"</em> keyword, type <em>"LibraryTreeFormView"</em>
- and <em>Ctrl-Space</em>: the content assist will set automatically the correct qualified name
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="keyword">viewclass</span> org.eclipse.emf.parsley.examples.firstexample.views.LibraryTreeFormView
- </p>
- </div>
- </div>
- </p>
- <p>
- when you save the above file you will notice that a new file (<em>"plugin.xml_emfparsley_gen"</em>)
- is generated into the root folder of your project. Just copy this file into <em>"plugin.xml"</em>.
- </p>
- <p>
- Let's focus briefly on the above <em>createResourceURI()</em> method: our goal is allowing to manage
- a library model instance which persists on a EMF Resource.
- In this example we choose to use the EMF default persistence (XMI), but you can provide any URI
- (e.g. using Teneo, CDO or any other EMF Resource Persistence implementation)
- In particular here we choose to persist the Resource in a XMI file named <em>"MyLibrary.library"</em> into the user home
- folder (you might want to change it with any other path).
- </p>
- <p>
- We need a <em>Dependency</em> from the model plug-in: so open <em>MANIFEST.MF</em> file, go to <em>Dependencies</em>
- tab, press <em>"Add..."</em> button in <em>"Required Plug-ins"</em> section and insert <em>"org.eclipse.emf.examples.library"</em>
- among dependencies.
- </p>
- <p>
- Before executing this code we need to do some little more work in order to initialize the Resource.
- </p>
- <p>
- An easy way to overcome this issue can be the following:
- </p>
- <p>
- <ol>
- <li>open the class *GuiceModule (FirstexampleGuiceModule in this example) that the wizard created for you.
- Note that this is a key class for all customizations; it allows to override several methods in order to provide custom behaviors
- and implementations.</li>
- <li>override method <em>bindEmptyResourceInitializer()</em> providing a class for Resource initialization
-
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="keyword">public</span> Class<? <span class="keyword">extends</span> EmptyResourceInitializer> bindEmptyResourceInitializer() {
- <br/>
- <span class="keyword">return</span> LibraryEmptyResourceInitializer.<span class="keyword">class</span>;
- <br/>
- }
- </p>
- </div>
- </div>
-
- </li>
- <li>create a new class <em>LibraryEmptyResourceInitializer</em> extending from <em>EmptyResourceInitializer</em> for Resource initialization
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="keyword">import</span> org.eclipse.emf.parsley.resource.EmptyResourceInitializer;
- <br/>
- <span class="keyword">import</span> org.eclipse.emf.ecore.resource.Resource;
- <br/>
- <span class="keyword">import</span> org.eclipse.emf.examples.extlibrary.EXTLibraryFactory;
- <br/>
- <span class="keyword">import</span> org.eclipse.emf.examples.extlibrary.Library;
- <br/>
- <span class="keyword">public</span> <span class="keyword">class</span> LibraryEmptyResourceInitializer <span class="keyword">extends</span> EmptyResourceInitializer {
- <br/>
-
- <br/>
- <span class="keyword">public</span> <span class="keyword">void</span> initialize(Resource resource) {
- <br/>
- <span class="keyword">super</span>.initialize(resource);
- <br/>
- Library library = EXTLibraryFactory.eINSTANCE.createLibrary();
- <br/>
- resource.getContents().add(library);
- <br/>
- }
- <br/>
- }
- </p>
- </div>
- </div>
-
- The method <em>initialize()</em> will be executed only when the Resource is empty
- (i.e., it has no contents).
- </li>
- </ol>
- </p>
- <p>
- now get back to the <em>MANIFEST.MF</em> and run the example
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="" href="images/first-example-launch.png">
- <img src="images/first-example-launch.png"
- width="600px"
- />
- </a>
- <div class="caption">
- </div>
- </div>
- </p>
- <p>
- As an Eclipse RCP developer you know, of course, that this will start another Eclipse instance (unless
- you add an Application plug-in to the launch or define an Application in the current plug-in).
- </p>
- <p>
- In this second Eclipse instance you can show the View in this way:
- <ol>
- <li><em>Window -> Show View -> Other...</em></li>
- <li>from Category "Emf Parsley", select "My Library Tree Form"</li>
- <li>press <em>OK</em></li>
- </ol>
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="" href="images/first-example-run.png">
- <img src="images/first-example-run.png"
- width="600px"
- />
- </a>
- <div class="caption">
- </div>
- </div>
- </p>
- <p>
- With this simple view you can start editing the model instance. For example you can set the <em>"name"</em>
- field; as soon as you start typing characters into this field you will notice that:
- <ol>
- <li>the View turns to a <em>"dirty"</em> state (an asterisk symbol appears on the view tab)</li>
- <li>the <em>"Save"</em> toolbar button is enabled</li>
- <li>the typed characters are reflected into the label correspondent to the Library icon</li>
- </ol>
- </p>
- <p>
- if you now perform a <em>"Save"</em> action the persistence mechanism will trigger and you will see that file
- <span class="inlinecode"><user.home>/MyLibrary.library</span>
- is being created on the file system. From now on, this file will keep the state of the model object whenever
- you change and save it.
- </p>
- <p>
- To create a Writer into the Library just right-click on the Library object and select <em>New Child -> Writer</em>
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="" href="images/createWriter.png">
- <img src="images/createWriter.png"
- width="600px"
- />
- </a>
- <div class="caption">
- </div>
- </div>
- </p>
- <p>
- Please note that you might see a slightly different content in the above context-menu in case you deleted
- the .edit plugin when creating the model (e.g. <em>"Writers Writer"</em> instead of <em>"Writer"</em>, <em>"Stock Book"</em> instead of <em>"Book"</em> and
- similar (this is because with EMF it is possible to customize labels also via .edit plugin).
- </p>
- <p>
- Now set for instance the writer <em>"name"</em> field and save.
- Now just play around creating Books, associating them to Writers and so on.
- As you can see you can entirely manage the EMF model instance: creating, modifying and deleting elements.
- </p>
- <p>
- Whenever the current selection on the upper side of the view changes, then the lower side shows the detail
- of this selection.
- </p>
- <p>
- However, up to this point, you have no control over the field to be shown and its order; for example
- you may want just the <em>"name"</em> attribute for the Library and <em>"name", "address" and "books"</em> attributes
- for Writers and maybe <em>"title", "authors" and "category"</em> for Books.
- </p>
- <p>
- Well, it's indeed very easy to obtain this: just edit the <em>module.parsley</em> file,
- adding the following import (without ending line with ";")
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="keyword">import</span> org.eclipse.emf.examples.extlibrary.*
- </p>
- </div>
- </div>
- </p>
- <p>
- and then defining the features to show
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="keyword">module</span> ... {
- <br/>
-
- <br/>
- <span class="keyword">parts</span> {
- <br/>
- ...
- <br/>
- }
- <br/>
- <span class="keyword">featuresProvider</span> {
- <br/>
- <span class="keyword">features</span> {
- <br/>
- Library -> name
- <br/>
- Writer -> name, address, books
- <br/>
- Book -> author, title, category
- <br/>
- }
- <br/>
- }
- <br/>
- }
- </p>
- </div>
- </div>
- </p>
- <p>
- Remeber that code completion is available, just exploit it since it helps a lot.
- </p>
- <p>
- If you restart now the application you will see that, when selecting an object, only the declared attributes
- will be shown. Furthermore, they are shown in the specified order.
- </p>
- <p>
- Did you run the application in Debug mode? Well, then you can change fields and order, save and see the
- changes without even restarting the application.
- </p>
- <p>
- Do you want to change text used for attribute labels in the detail? Just add the following:
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="keyword">propertyDescriptionProvider</span> {
- <br/>
- <span class="keyword">text</span> {
- <br/>
- Book : author -> <span class="string">'Wrote by:'</span>
- <br/>
- Writer : name -> <span class="string">'Name:'</span>
- <br/>
- }
- <br/>
- }
- </p>
- </div>
- </div>
-
-
- Or do you want to change the label shown on the tree nodes on the upper side and as detail title?
- Maybe want to format the book label like this?
-
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="keyword">labelProvider</span> {
- <br/>
- <span class="keyword">text</span> {
- <br/>
- Book b -> <span class="string">'"'</span> + b.title + <span class="string">'"'</span> +<span class="string">' (by '</span>+ b.author.name + <span class="string">')'</span>
- <br/>
- }
- <br/>
- }
- </p>
- </div>
- </div>
-
-
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="" href="images/labelCustomization.png">
- <img src="images/labelCustomization.png"
- width="600px"
- />
- </a>
- <div class="caption">
- </div>
- </div>
-
-
-
-
-
- </p>
- <a name="RCPMail" ></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>RCP Mail Example</h1>
- <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
+ </div>
+ </div>
- // The following are highly recommended additional parameters. Remove the slashes in front to use.
- var disqus_identifier = 'GettingStarted';
- var disqus_url = documentationRoot+'02-GettingStarted.php';
+ </li>
+ <li>
+ create a new class <em>LibraryEmptyResourceInitializer</em> extending from <em>EmptyResourceInitializer</em> for Resource initialization
+ <div class="literallayout">
+ <div class="incode">
+ <p class="code">
+ <span class="keyword">import</span> org.eclipse.emf.parsley.resource.EmptyResourceInitializer;
+ <br/>
+ <span class="keyword">import</span> org.eclipse.emf.ecore.resource.Resource;
+ <br/>
+ <span class="keyword">import</span> org.eclipse.emf.examples.extlibrary.EXTLibraryFactory;
+ <br/>
+ <span class="keyword">import</span> org.eclipse.emf.examples.extlibrary.Library;
+ <br/>
+ <span class="keyword">public</span> <span class="keyword">class</span> LibraryEmptyResourceInitializer <span class="keyword">extends</span> EmptyResourceInitializer {
+ <br/>
+
+ <br/>
+ <span class="keyword">public</span> <span class="keyword">void</span> initialize(Resource resource) {
+ <br/>
+ <span class="keyword">super</span>.initialize(resource);
+ <br/>
+ Library library = EXTLibraryFactory.eINSTANCE.createLibrary();
+ <br/>
+ resource.getContents().add(library);
+ <br/>
+ }
+ <br/>
+ }
+ <br/>
+ </p>
+ </div>
+ </div>
- /* * * 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;">
+ The method <em>initialize()</em> will be executed only when the Resource is empty
+ (i.e., it has no contents).
+ </li>
+</ol>
+</p>
+<p>
+now get back to the <em>MANIFEST.MF</em> and run the example
+</p>
+<p>
+<div class="image" >
+<img src="images/first-example-launch.png" class=" "
+/>
+<div class="caption">
+</div>
+</div>
+</p>
+<p>
+As an Eclipse RCP developer you know, of course, that this will start another Eclipse instance (unless
+you add an Application plug-in to the launch or define an Application in the current plug-in).
+</p>
+<p>
+In this second Eclipse instance you can show the View in this way:
+<ol>
+ <li>
+ <em>Window -> Show View -> Other...</em>
+ </li>
+ <li>
+ from Category "Emf Parsley", select "My Library Tree Form"
+ </li>
+ <li>
+ press <em>OK</em>
+ </li>
+</ol>
+</p>
+<p>
+<div class="image" >
+<img src="images/first-example-run.png" class=" "
+/>
+<div class="caption">
+</div>
+</div>
+</p>
+<p>
+With this simple view you can start editing the model instance. For example you can set the <em>"name"</em>
+field; as soon as you start typing characters into this field you will notice that:
+<ol>
+ <li>
+ the View turns to a <em>"dirty"</em> state (an asterisk symbol appears on the view tab)
+ </li>
+ <li>
+ the <em>"Save"</em> toolbar button is enabled
+ </li>
+ <li>
+ the typed characters are reflected into the label correspondent to the Library icon
+ </li>
+</ol>
+</p>
+<p>
+if you now perform a <em>"Save"</em> action the persistence mechanism will trigger and you will see that file
+<span class="inlinecode"><user.home>/MyLibrary.library</span>
+is being created on the file system. From now on, this file will keep the state of the model object whenever
+you change and save it.
+</p>
+<p>
+To create a Writer into the Library just right-click on the Library object and select <em>New Child -> Writer</em>
+</p>
+<p>
+<div class="image" >
+<img src="images/createWriter.png" class=" "
+/>
+<div class="caption">
+</div>
+</div>
+</p>
+<p>
+Please note that you might see a slightly different content in the above context-menu in case you deleted
+the .edit plugin when creating the model (e.g. <em>"Writers Writer"</em> instead of <em>"Writer"</em>, <em>"Stock Book"</em> instead of <em>"Book"</em> and
+similar (this is because with EMF it is possible to customize labels also via .edit plugin).
+</p>
+<p>
+Now set for instance the writer <em>"name"</em> field and save.
+Now just play around creating Books, associating them to Writers and so on.
+As you can see you can entirely manage the EMF model instance: creating, modifying and deleting elements.
+</p>
+<p>
+Whenever the current selection on the upper side of the view changes, then the lower side shows the detail
+of this selection.
+</p>
+<p>
+However, up to this point, you have no control over the field to be shown and its order; for example
+you may want just the <em>"name"</em> attribute for the Library and <em>"name", "address" and "books"</em> attributes
+for Writers and maybe <em>"title", "authors" and "category"</em> for Books.
+</p>
+<p>
+Well, it's indeed very easy to obtain this: just edit the <em>module.parsley</em> file,
+adding the following import (without ending line with ";")
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+<span class="keyword">import</span> org.eclipse.emf.examples.extlibrary.*
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+and then defining the features to show
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+<span class="keyword">module</span> ... {
+<br/>
+
+<br/>
+ <span class="keyword">parts</span> {
+<br/>
+ ...
+<br/>
+ }
+<br/>
+<span class="keyword">featuresProvider</span> {
+<br/>
+ <span class="keyword">features</span> {
+<br/>
+ Library -> name
+<br/>
+ Writer -> name, address, books
+<br/>
+ Book -> author, title, category
+<br/>
+ }
+<br/>
+}
+<br/>
+}
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+Remeber that code completion is available, just exploit it since it helps a lot.
+</p>
+<p>
+If you restart now the application you will see that, when selecting an object, only the declared attributes
+will be shown. Furthermore, they are shown in the specified order.
+</p>
+<p>
+Did you run the application in Debug mode? Well, then you can change fields and order, save and see the
+changes without even restarting the application.
+</p>
+<p>
+Do you want to change text used for attribute labels in the detail? Just add the following:
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+ <span class="keyword">propertyDescriptionProvider</span> {
+<br/>
+ <span class="keyword">text</span> {
+<br/>
+Book : author -> <span class="string">'Wrote by:'</span>
+<br/>
+Writer : name -> <span class="string">'Name:'</span>
+<br/>
+ }
+<br/>
+ }
+<br/>
+</p>
+</div>
+</div>
+
+
+Or do you want to change the label shown on the tree nodes on the upper side and as detail title?
+Maybe want to format the book label like this?
+
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+ <span class="keyword">labelProvider</span> {
+<br/>
+ <span class="keyword">text</span> {
+<br/>
+Book b -> <span class="string">'"'</span> + b.title + <span class="string">'"'</span> +<span class="string">' (by '</span>+ b.author.name + <span class="string">')'</span>
+<br/>
+ }
+<br/>
+ }
+<br/>
+</p>
+</div>
+</div>
+
+
+<div class="image" >
+<img src="images/labelCustomization.png" class=" "
+/>
+<div class="caption">
+</div>
+</div>
+
+
+
+
+
+</p>
+<a name="RCPMail"></a>
+<h2>RCP Mail Example</h2>
+</body>
+</html>
diff --git a/documentation/02-GettingStarted.php b/documentation/02-GettingStarted.php
deleted file mode 100644
index 273cffd..0000000
--- a/documentation/02-GettingStarted.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
- include("include.php");
- $pageTitle = "Getting Started";
-
- $html = file_get_contents('02-GettingStarted.html');
-
- $Nav->setLinkList(array());
-
- $App->AddExtraHtmlHeader('
- <script type="text/javascript">
- function init() {
- var docName = "02-GettingStarted.html";
- initTocMenu(docName);
- highlightCurrentSection(docName);
- }
-
- function initTocMenu(ActiveSubTocElementId){
- var menu = document.getElementById("leftnav");
-
- var chapters = menu.children;
- addHideSubsectionFunction(chapters);
- var subToc = document.getElementById(\'subToc_\' + ActiveSubTocElementId);
- if(subToc) {
- subToc.style.display = "block";
- subToc.previousElementSibling.children[0].style.display = "none"
- subToc.previousElementSibling.children[1].style.display = "inline"
- }
- }
-
- function switchImages(chap) {
-
- }
-
- function addHideSubsectionFunction(items){
- for (var i = 0; i < items.length; i++) {
- if (items[i].firstElementChild != null && items[i].className == "separator"){
- if(items[i].firstElementChild.firstElementChild != null){
- items[i].firstElementChild.firstElementChild.onclick = function(){this.nextElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- items[i].firstElementChild.firstElementChild.nextElementSibling.onclick = function(){this.previousElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- }
- items[i].firstElementChild.style.cursor = "pointer";
- }
- }
- }
-
- function toc_toggle_subsections(chap){
- if ( chap.children[1].style.display != "none" ) {
- chap.children[1].style.display = "none"
- } else {
- chap.children[1].style.display = "block"
- }
- }
-
- function highlightCurrentSection(sec) {
- document.getElementById(sec).style.backgroundColor= "#D0D0D0"
- }
-
- if ( window.addEventListener ) {
- window.addEventListener( "load", init, false );
- }
- else if ( window.attachEvent ) {
- window.attachEvent( "onload", init );
- } else
- if ( window.onLoad ) {
- window.onload = init;
- }
- </script>');
-
- # Generate the web page
- $App->generatePage("Nova", $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
diff --git a/documentation/03-Components.html b/documentation/03-Components.html
index bef7d04..18cb001 100644
--- a/documentation/03-Components.html
+++ b/documentation/03-Components.html
@@ -1,320 +1,186 @@
-<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#reflectiveComponents.html" ><a href="01-Introduction.php#reflectiveComponents.php" >Reflective Components</a></li>
- <li id="01-Introduction.html#easyToCustomize.html" ><a href="01-Introduction.php#easyToCustomize.php" >Easy to Customize</a></li>
- <li id="01-Introduction.html#architecture.html" ><a href="01-Introduction.php#architecture.php" >Architecture</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 Components 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#Eclipse4ApplicationAndEMFComponents.html" ><a href="07-Eclipse4.php#Eclipse4ApplicationAndEMFComponents.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; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" />
- <a href="GettingSources.php">Getting Sources</a></div>
- <ul style="display: none;" id="subToc_GettingSources.html">
- <li id="GettingSources.html#InstallBuckminster.html" ><a href="GettingSources.php#InstallBuckminster.php" >Install Buckminster in the IDE</a></li>
- <li id="GettingSources.html#PrepareTP.html" ><a href="GettingSources.php#PrepareTP.php" >Prepare an empty target platform</a></li>
- <li id="GettingSources.html#MaterializeWP.html" ><a href="GettingSources.php#MaterializeWP.php" >Materialize the Workspace</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="samples.php">Xdoc Samples</a></div>
- <ul style="display: none;" id="subToc_samples.html">
- <li id="samples.html#Links.html" ><a href="samples.php#Links.php" >References</a></li>
- <li id="samples.html#CodeSections.html" ><a href="samples.php#CodeSections.php" >Code Sections</a></li>
- <li id="samples.html#Lists.html" ><a href="samples.php#Lists.php" >Lists and Tables</a></li>
- <li id="samples.html#Tables.html" ><a href="samples.php#Tables.php" >Tables</a></li>
- <li id="samples.html#TODO.html" ><a href="samples.php#TODO.php" >TODO</a></li>
- <li id="samples.html#Images.html" ><a href="samples.php#Images.php" >Images</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div id="midcolumn">
- <a name="Components" ></a>
- <h1>Components</h1>
- <div class="toc">
- <ul>
- <li><a href="03-Components.php#FormComponent.php" >Form Component</a></li>
- <li><a href="03-Components.php#TreeComponent.php" >Tree Component</a></li>
- <li><a href="03-Components.php#TreeFormComponent.php" >Tree Form Component</a></li>
- <li><a href="03-Components.php#TableComponent.php" >Table Component</a></li>
- </ul>
- </div>
-
- <p>
- Here we list the behaviors that can be customized for all components.
- </p>
- <p>
- <ul>
- <li>If you need a machanism to fill some data for the first time you use a model, you can provide
- a specific implementation of <a href="04-Customization.php#EmptyResourceInitializer.php" title="Go to "Empty Resource Initializer"">Emty Resource Initializer</a>.</li>
- <li>If you want to interact with Resource Loading, you can provide a specific <a href="04-Customization.php#ResourceLoader.php" title="Go to "Resource Loader"">Resource
- Loader</a></li>
- </ul>
- </p>
- <p>
- For what concern saving objects, there are some specific parts that can be customized:
- </p>
- <p>
- <ul>
- <li><a href="04-Customization.php#ResourceSaveManager.php" title="Go to "Resource Save Manager"">Resource Save Manager</a>, if you want to manage the save.</li>
- <li><a href="04-Customization.php#ResourceSaveManager.php" title="Go to "Resource Save Manager"">Resource Save Manager</a>, if you want to manage the save.</li>
- <li>In some cases, it can be usefull to specify an editing domain to work with. In this case it can be used the <a href="04-Customization.php#EditingDomainFinder.php" title="Go to "Editing Domain Finder"">Editing Domain Finder</a>.</li>
- </ul>
- </p>
- <p>
- The following sections describe the basic components provided, that are the foundations for all parts built upon <em>Emf Parsley</em>.
- For each component we present a set of customizations, just to get an idea of how it works. You can refer
- to <a href="04-Customization.php" title="Go to "Customization"">Customization Section</a> for a complete list.
- </p>
- <a name="FormComponent" ></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>Form Component</h1>
- <div class="toc">
- <ul>
- <li><a href="03-Components.php#Form_Customizations.php" >Form Customizations</a></li>
- </ul>
- </div>
- <p>
- The <em>Form Component</em> can be used to rapresent an <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/ecore/EObject.html" title="org.eclipse.emf.ecore.EObject">EObject</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EObject.java" title="View Source Code" >(src)</a> in a row-oriented form,
- like in the image above.
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="" href="images/03-components-form.png">
- <img src="images/03-components-form.png"
- width="600px"
- />
- </a>
- <div class="caption">
- </div>
- </div>
- </p>
- <p>
- For each <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.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_8_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EStructuralFeature.java" title="View Source Code" >(src)</a> defined for the <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.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_8_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EClass.java" title="View Source Code" >(src)</a>
- (that is the type of the object to rapresent), the component builds a row with a
- <em>label</em> with the name of the feature and a <em>control</em> to access the data. It can be used the factory
- to create such a component, like in the code below.
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- formComposite = formFactory.createFormDetailComposite(parent, SWT.NONE);
- <br/>
- formComposite.init(eObject);
- </p>
- </div>
- </div>
- </p>
- <p>
- The <em>form component</em> can be customized in many way, in particular the feature list, the labels and the controls.
- </p>
- <a name="Form_Customizations" ></a>
- <h2>Form Customizations</h2>
- <p>
- The <em>Form Component</em> can be customized in several way. Here the complete list.
- </p>
- <p>
- <ul>
- <li>The <em>list fo feature</em> displayed on the form can be customized via the <a href="04-Customization.php#FeaturesProvider.php" title="Go to "Features Provider"">Feature
- Provider</a> to select the features or the order.</li>
- <li>The description on the left side of the form caan be customizzed via the <a href="04-Customization.php#PropertyDescriptionProvider.php" title="Go to "Property Description Provider"">Property
- Description Provider</a>.</li>
- <li>Otherwise to customize the controls on the right, you can use the <a href="04-Customization.php#FormControlFactory.php" title="Go to "Form Control Factory"">Form Control Factory</a>.
- </li>
- <li>Depending on the feature types, can be some fields that use predefined values (e.g. combo). You can provide
- the exact proposal list via the <a href="04-Customization.php#ProposalProvider.php" title="Go to "Proposal Provider"">Proposal Provider</a>.</li>
- </ul>
- </p>
- <a name="TreeComponent" ></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>Tree Component</h1>
- <div class="toc">
- <ul>
- <li><a href="03-Components.php#Tree_Customizations.php" >Tree Customizations</a></li>
- </ul>
- </div>
- <p>
- The <em>Tree Component</em> provides a tree rapresentation of data that can be feeded with an EResource, a
- Resource URI, and a simple EObject. This component use the EMF Meta-Model information to display objects in the tree.
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="" href="images/03-components-tree.png">
- <img src="images/03-components-tree.png"
- width="600px"
- />
- </a>
- <div class="caption">
- </div>
- </div>
- </p>
- <a name="Tree_Customizations" ></a>
- <h2>Tree Customizations</h2>
- <p>
- The <em>Tree Component</em>can be customized in several way via the standard EMF Edit facilities or with the EMF Components
- codeinjection based mechanism. If you are familiar with Jface APIs, you can easily use the basic class with some facilties to define the specific implementation.
- See the corrisponding sections for more details.
- </p>
- <p>
- <ul>
- <li>The <a href="04-Customization.php#ViewerContentProvider.php" title="Go to "Viewer Content Provider"">Viewer Content Provider</a></li>
- <li>The <a href="04-Customization.php#ViewerLabelProvider.php" title="Go to "Viewer Label Provider"">Viewer Label Provider</a></li>
- <li>The <a href="04-Customization.php#ViewerContextMenuFactory.php" title="Go to "Viewer Context Menu Factory"">Viewer Context Menu Factory</a></li>
- </ul>
- </p>
- <p>
- <em>TODO</em>
- </p>
- <a name="TreeFormComponent" ></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>Tree Form Component</h1>
- <div class="toc">
- <ul>
- <li><a href="03-Components.php#TreeForm_Customizations.php" >Tree Form Customization</a></li>
- </ul>
- </div>
- <p>
- The <em>Tree Form Component</em> contains a <a href="03-Components.php#TreeComponent.php" title="Go to "Tree Component"" >section TreeComponent</a> that provides a tree rapresentation of data that can be feeded with
- an EResource, a Resource URI, and a simple EObject. This component use the EMF Meta-Model information to display objects in
- the tree. The component also combines a <a href="03-Components.php#FormComponent.php" title="Go to "Form Component"" >section FormComponent</a> detail that display the current selected object.
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="" href="images/03-components-treeform.png">
- <img src="images/03-components-treeform.png"
- width="600px"
- />
- </a>
- <div class="caption">
- </div>
- </div>
- </p>
- <a name="TreeForm_Customizations" ></a>
- <h2>Tree Form Customization</h2>
- <p>
- Since <em>Tree Form Component</em> is a combination of <em>Tree Component</em> and <em>Form Component</em>, all their customizations
- are avaible for it.
- </p>
- <a name="TableComponent" ></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>Table Component</h1>
- <p>
- The <em>Table Component</em> can rapresent data in a grid, once you have specified what kind of object need to be rapresented.
- It uses metamodel infos to build column as needed.
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="" href="images/03-components-table.png">
- <img src="images/03-components-table.png"
- width="600px"
- />
- </a>
- <div class="caption">
- </div>
- </div>
- </p>
- <p>
- <div class="todo" >
- To be continued
- </div>
- </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 = 'Components';
- var disqus_url = documentationRoot+'03-Components.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;">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
+<title>Components</title>
+
+<link href="book.css" rel="stylesheet" type="text/css">
+<link href="code.css" rel="stylesheet" type="text/css">
+<link rel="home" href="xtext.html" title="">
+</head>
+<body>
+<a name="Components"></a>
+<h1>Components</h1>
+<p>
+Here we list the behaviors that can be customized for all components.
+</p>
+<p>
+<ul>
+ <li>
+ If you need a machanism to fill some data for the first time you use a model, you can provide
+ a specific implementation of <a href="04-Customization.html#EmptyResourceInitializer" title="Go to "Empty Resource Initializer"">Emty Resource Initializer</a>.
+ </li>
+ <li>
+ If you want to interact with Resource Loading, you can provide a specific <a href="04-Customization.html#ResourceLoader" title="Go to "Resource Loader"">Resource
+ Loader</a>
+ </li>
+</ul>
+</p>
+<p>
+For what concern saving objects, there are some specific parts that can be customized:
+</p>
+<p>
+<ul>
+ <li>
+ <a href="04-Customization.html#ResourceSaveManager" title="Go to "Resource Save Manager"">Resource Save Manager</a>, if you want to manage the save.
+ </li>
+ <li>
+ <a href="04-Customization.html#ResourceSaveManager" title="Go to "Resource Save Manager"">Resource Save Manager</a>, if you want to manage the save.
+ </li>
+ <li>
+ In some cases, it can be usefull to specify an editing domain to work with. In this case it can be used the <a href="04-Customization.html#EditingDomainFinder" title="Go to "Editing Domain Finder"">Editing Domain Finder</a>.
+ </li>
+</ul>
+</p>
+<p>
+The following sections describe the basic components provided, that are the foundations for all parts built upon <em>Emf Parsley</em>.
+For each component we present a set of customizations, just to get an idea of how it works. You can refer
+to <a href="04-Customization.html#Customization" title="Go to "Customization"">Customization Section</a> for a complete list.
+</p>
+<a name="FormComponent"></a>
+<h2>Form Component</h2>
+<p>
+The <em>Form Component</em> can be used to rapresent an <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/ecore/EObject.html" title="View JavaDoc"><abbr title="org.eclipse.emf.ecore.EObject" >EObject</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EObject.java" title="View Source Code" >(src)</a> in a row-oriented form,
+like in the image above.
+</p>
+<p>
+<div class="image" >
+<img src="images/03-components-form.png" class=" "
+/>
+<div class="caption">
+</div>
+</div>
+</p>
+<p>
+For each <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/ecore/EStructuralFeature.html" title="View JavaDoc"><abbr title="org.eclipse.emf.ecore.EStructuralFeature" >EStructuralFeature</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EStructuralFeature.java" title="View Source Code" >(src)</a> defined for the <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/ecore/EClass.html" title="View JavaDoc"><abbr title="org.eclipse.emf.ecore.EClass" >EClass</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EClass.java" title="View Source Code" >(src)</a>
+(that is the type of the object to rapresent), the component builds a row with a
+<em>label</em> with the name of the feature and a <em>control</em> to access the data. It can be used the factory
+to create such a component, like in the code below.
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+ formComposite = formFactory.createFormDetailComposite(parent, SWT.NONE);
+<br/>
+ formComposite.init(eObject);
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+The <em>form component</em> can be customized in many way, in particular the feature list, the labels and the controls.
+</p>
+<a name="Form_Customizations"></a>
+<h3>Form Customizations</h3>
+<p>
+The <em>Form Component</em> can be customized in several way. Here the complete list.
+</p>
+<p>
+<ul>
+ <li>
+ The <em>list fo feature</em> displayed on the form can be customized via the <a href="04-Customization.html#FeaturesProvider" title="Go to "Features Provider"">Feature
+ Provider</a> to select the features or the order.
+ </li>
+ <li>
+ The description on the left side of the form caan be customizzed via the <a href="04-Customization.html#PropertyDescriptionProvider" title="Go to "Property Description Provider"">Property
+ Description Provider</a>.
+ </li>
+ <li>
+ Otherwise to customize the controls on the right, you can use the <a href="04-Customization.html#FormControlFactory" title="Go to "Form Control Factory"">Form Control Factory</a>.
+ </li>
+ <li>
+ Depending on the feature types, can be some fields that use predefined values (e.g. combo). You can provide
+ the exact proposal list via the <a href="04-Customization.html#ProposalProvider" title="Go to "Proposal Provider"">Proposal Provider</a>.
+ </li>
+</ul>
+</p>
+<a name="TreeComponent"></a>
+<h2>Tree Component</h2>
+<p>
+The <em>Tree Component</em> provides a tree rapresentation of data that can be feeded with an EResource, a
+Resource URI, and a simple EObject. This component use the EMF Meta-Model information to display objects in the tree.
+</p>
+<p>
+<div class="image" >
+<img src="images/03-components-tree.png" class=" "
+/>
+<div class="caption">
+</div>
+</div>
+</p>
+<a name="Tree_Customizations"></a>
+<h3>Tree Customizations</h3>
+<p>
+The <em>Tree Component</em>can be customized in several way via the standard EMF Edit facilities or with the EMF Components
+codeinjection based mechanism. If you are familiar with Jface APIs, you can easily use the basic class with some facilties to define the specific implementation.
+See the corrisponding sections for more details.
+</p>
+<p>
+<ul>
+ <li>
+ The <a href="04-Customization.html#ViewerContentProvider" title="Go to "Viewer Content Provider"">Viewer Content Provider</a>
+ </li>
+ <li>
+ The <a href="04-Customization.html#ViewerLabelProvider" title="Go to "Viewer Label Provider"">Viewer Label Provider</a>
+ </li>
+ <li>
+ The <a href="04-Customization.html#ViewerContextMenuFactory" title="Go to "Viewer Context Menu Factory"">Viewer Context Menu Factory</a>
+ </li>
+</ul>
+</p>
+<p>
+<em>TODO</em>
+</p>
+<a name="TreeFormComponent"></a>
+<h2>Tree Form Component</h2>
+<p>
+The <em>Tree Form Component</em> contains a <a href="03-Components.html#TreeComponent" title="Go to "Tree Component"" >section TreeComponent</a> that provides a tree rapresentation of data that can be feeded with
+an EResource, a Resource URI, and a simple EObject. This component use the EMF Meta-Model information to display objects in
+the tree. The component also combines a <a href="03-Components.html#FormComponent" title="Go to "Form Component"" >section FormComponent</a> detail that display the current selected object.
+</p>
+<p>
+<div class="image" >
+<img src="images/03-components-treeform.png" class=" "
+/>
+<div class="caption">
+</div>
+</div>
+</p>
+<a name="TreeForm_Customizations"></a>
+<h3>Tree Form Customization</h3>
+<p>
+Since <em>Tree Form Component</em> is a combination of <em>Tree Component</em> and <em>Form Component</em>, all their customizations
+are avaible for it.
+</p>
+<a name="TableComponent"></a>
+<h2>Table Component</h2>
+<p>
+The <em>Table Component</em> can rapresent data in a grid, once you have specified what kind of object need to be rapresented.
+It uses metamodel infos to build column as needed.
+</p>
+<p>
+<div class="image" >
+<img src="images/03-components-table.png" class=" "
+/>
+<div class="caption">
+</div>
+</div>
+</p>
+<p>
+<div class="todo" >
+ To be continued
+</div>
+</p>
+</body>
+</html>
diff --git a/documentation/03-Components.php b/documentation/03-Components.php
deleted file mode 100644
index 33e1306..0000000
--- a/documentation/03-Components.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
- include("include.php");
- $pageTitle = "Components";
-
- $html = file_get_contents('03-Components.html');
-
- $Nav->setLinkList(array());
-
- $App->AddExtraHtmlHeader('
- <script type="text/javascript">
- function init() {
- var docName = "03-Components.html";
- initTocMenu(docName);
- highlightCurrentSection(docName);
- }
-
- function initTocMenu(ActiveSubTocElementId){
- var menu = document.getElementById("leftnav");
-
- var chapters = menu.children;
- addHideSubsectionFunction(chapters);
- var subToc = document.getElementById(\'subToc_\' + ActiveSubTocElementId);
- if(subToc) {
- subToc.style.display = "block";
- subToc.previousElementSibling.children[0].style.display = "none"
- subToc.previousElementSibling.children[1].style.display = "inline"
- }
- }
-
- function switchImages(chap) {
-
- }
-
- function addHideSubsectionFunction(items){
- for (var i = 0; i < items.length; i++) {
- if (items[i].firstElementChild != null && items[i].className == "separator"){
- if(items[i].firstElementChild.firstElementChild != null){
- items[i].firstElementChild.firstElementChild.onclick = function(){this.nextElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- items[i].firstElementChild.firstElementChild.nextElementSibling.onclick = function(){this.previousElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- }
- items[i].firstElementChild.style.cursor = "pointer";
- }
- }
- }
-
- function toc_toggle_subsections(chap){
- if ( chap.children[1].style.display != "none" ) {
- chap.children[1].style.display = "none"
- } else {
- chap.children[1].style.display = "block"
- }
- }
-
- function highlightCurrentSection(sec) {
- document.getElementById(sec).style.backgroundColor= "#D0D0D0"
- }
-
- if ( window.addEventListener ) {
- window.addEventListener( "load", init, false );
- }
- else if ( window.attachEvent ) {
- window.attachEvent( "onload", init );
- } else
- if ( window.onLoad ) {
- window.onload = init;
- }
- </script>');
-
- # Generate the web page
- $App->generatePage("Nova", $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
diff --git a/documentation/04-Customization.html b/documentation/04-Customization.html
index 414e60f..6202b04 100644
--- a/documentation/04-Customization.html
+++ b/documentation/04-Customization.html
@@ -1,855 +1,722 @@
-<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#reflectiveComponents.html" ><a href="01-Introduction.php#reflectiveComponents.php" >Reflective Components</a></li>
- <li id="01-Introduction.html#easyToCustomize.html" ><a href="01-Introduction.php#easyToCustomize.php" >Easy to Customize</a></li>
- <li id="01-Introduction.html#architecture.html" ><a href="01-Introduction.php#architecture.php" >Architecture</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 Components 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#Eclipse4ApplicationAndEMFComponents.html" ><a href="07-Eclipse4.php#Eclipse4ApplicationAndEMFComponents.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; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" />
- <a href="GettingSources.php">Getting Sources</a></div>
- <ul style="display: none;" id="subToc_GettingSources.html">
- <li id="GettingSources.html#InstallBuckminster.html" ><a href="GettingSources.php#InstallBuckminster.php" >Install Buckminster in the IDE</a></li>
- <li id="GettingSources.html#PrepareTP.html" ><a href="GettingSources.php#PrepareTP.php" >Prepare an empty target platform</a></li>
- <li id="GettingSources.html#MaterializeWP.html" ><a href="GettingSources.php#MaterializeWP.php" >Materialize the Workspace</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="samples.php">Xdoc Samples</a></div>
- <ul style="display: none;" id="subToc_samples.html">
- <li id="samples.html#Links.html" ><a href="samples.php#Links.php" >References</a></li>
- <li id="samples.html#CodeSections.html" ><a href="samples.php#CodeSections.php" >Code Sections</a></li>
- <li id="samples.html#Lists.html" ><a href="samples.php#Lists.php" >Lists and Tables</a></li>
- <li id="samples.html#Tables.html" ><a href="samples.php#Tables.php" >Tables</a></li>
- <li id="samples.html#TODO.html" ><a href="samples.php#TODO.php" >TODO</a></li>
- <li id="samples.html#Images.html" ><a href="samples.php#Images.php" >Images</a></li>
- </ul>
- </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.6.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_8_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.6.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_8_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.6.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_8_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.6.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_8_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.6.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_8_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.6.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_8_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" >Property Description 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.6.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_8_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.6.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_8_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.6.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_8_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.6.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_8_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.6.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_8_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.6.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_8_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.6.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_8_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.6.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_8_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="FeaturesColumnProvider" ></a>
- <h3>Features Column Provider</h3>
- <p>
- As an extension, you can use the <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/ui/provider/FeaturesColumnProvider.html" title="org.eclipse.emf.parsley.ui.provider.FeaturesColumnProvider">FeaturesColumnProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/FeaturesColumnProvider.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>Property Description 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.6.0/org/eclipse/emf/parsley/ui/provider/PropertyDescriptionProvider.html" title="org.eclipse.emf.parsley.ui.provider.PropertyDescriptionProvider">PropertyDescriptionProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/PropertyDescriptionProvider.java" title="View Source Code" >(src)</a> provides labels for
- the features. It can be customized, with injection (see Injection paragraph), to customize the label on the
- left of each control. 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 label 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/>
-
- <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>
- <p>
- Another chance of customization is to define a method the returns directly the control, like in the example
- below. In this case 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="FormPropertyDescriptionProvider" ></a>
- <h3>Form Property Description Provider</h3>
- <p>
- The <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/ui/provider/FormPropertyDescriptionProvider.html" title="org.eclipse.emf.parsley.ui.provider.FormPropertyDescriptionProvider">FormPropertyDescriptionProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/FormPropertyDescriptionProvider.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>
- <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 Components provides such an implementation with the class <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.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_8_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/>
-
- <br/>
- @Inject
- <br/>
- <span class="keyword">public</span> CustomLibraryLabelProvider(AdapterFactoryLabelProvider delegate) {
- <br/>
- <span class="keyword">super</span>(delegate);
- <br/>
- }
- <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/>
-
- <br/>
- <span class="keyword">public</span> String image(Book book) {
- <br/>
- <span class="keyword">return</span> <span class="string">"book2.png"</span>;
- <br/>
- }
- <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 Components provides an implementation with the class
- <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.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_8_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/>
-
- <br/>
- @Inject
- <br/>
- <span class="keyword">public</span> CustomLibraryViewerContentProvider(AdapterFactory adapterFactory) {
- <br/>
- <span class="keyword">super</span>(adapterFactory);
- <br/>
- }
- <br/>
-
- <br/>
- <span class="keyword">public</span> Object children(Library library) {
- <br/>
- <span class="keyword">return</span> library.getBooks();
- <br/>
- }
- <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.6.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_8_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.6.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_8_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.6.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_8_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.6.0/org/eclipse/emf/parsley/builders/TableViewerBuilder.html" title="org.eclipse.emf.parsley.builders.TableViewerBuilder">TableViewerBuilder</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.6.0/org/eclipse/emf/parsley/builders/TableViewerColumnBuilder.html" title="org.eclipse.emf.parsley.builders.TableViewerColumnBuilder">TableViewerColumnBuilder</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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 "Property Description 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.6.0/org/eclipse/emf/parsley/builders/TableViewerEditableColumnBuilder.html" title="org.eclipse.emf.parsley.builders.TableViewerEditableColumnBuilder">TableViewerEditableColumnBuilder</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.6.0/org/eclipse/emf/parsley/factories/FormFactory.html" title="org.eclipse.emf.parsley.factories.FormFactory">FormFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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 Property Description 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.6.0/org/eclipse/emf/parsley/factories/ColumnLabelProviderFactory.html" title="org.eclipse.emf.parsley.factories.ColumnLabelProviderFactory">ColumnLabelProviderFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.6.0/org/eclipse/emf/parsley/binding/FormControlFactory.html" title="org.eclipse.emf.parsley.binding.FormControlFactory">FormControlFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.6.0/org/eclipse/emf/parsley/factories/TreeFormFactory.html" title="org.eclipse.emf.parsley.factories.TreeFormFactory">TreeFormFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.6.0/org/eclipse/emf/parsley/factories/ViewerFactory.html" title="org.eclipse.emf.parsley.factories.ViewerFactory">ViewerFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.6.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_8_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;">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
+<title>Customization</title>
+
+<link href="book.css" rel="stylesheet" type="text/css">
+<link href="code.css" rel="stylesheet" type="text/css">
+<link rel="home" href="xtext.html" title="">
+</head>
+<body>
+<a name="Customization"></a>
+<h1>Customization</h1>
+<a name="ResourceManagers"></a>
+<h2>Managing Resources</h2>
+<a name="ResourceLoader"></a>
+<h3>Resource Loader</h3>
+<p>
+The class <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/resource/ResourceLoader.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.resource.ResourceLoader" >ResourceLoader</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.html#EmptyResourceInitializer" title="Go to "Empty Resource Initializer"">Empty Resource Initializer</a>.
+</p>
+<a name="EmptyResourceInitializer"></a>
+<h3>Empty Resource Initializer</h3>
+<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.6.0/org/eclipse/emf/parsley/resource/EmptyResourceInitializer.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.resource.EmptyResourceInitializer" >EmptyResourceInitializer</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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>
+<h3>Editing Domain Finder</h3>
+<p>
+The class <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/edit/EditingDomainFinder.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.edit.EditingDomainFinder" >EditingDomainFinder</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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>
+<h3>Resource Save Manager</h3>
+<p>
+Resource saving is delegated to <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/edit/ResourceSaveManager.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.edit.ResourceSaveManager" >ResourceSaveManager</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.6.0/org/eclipse/emf/ecore/resource/Resource.html" title="View JavaDoc"><abbr title="org.eclipse.emf.ecore.resource.Resource" >Resource</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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>
+<h4>Validate Resource Save Manager</h4>
+<p>
+We provide an example of custom resource save manager: <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/edit/ValidateResourceSaveManager.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.edit.ValidateResourceSaveManager" >ValidateResourceSaveManager</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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/>
+}
+<br/>
+</p>
+</div>
+</div>
+</p>
+<a name="Providers"></a>
+<h2>Providers</h2>
+<a name="FeaturesProvider"></a>
+<h3>Features Provider</h3>
+<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>
+<h4>Prima versione</h4>
+<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.6.0/org/eclipse/emf/parsley/ui/provider/FeaturesProvider.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.ui.provider.FeaturesProvider" >FeaturesProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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/>
+ }
+<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>
+<h4>Seconda versione</h4>
+<p>
+When the framework builds components according to the
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/ecore/EStructuralFeature.html" title="View JavaDoc"><abbr title="org.eclipse.emf.ecore.EStructuralFeature" >EStructuralFeature</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.6.0/org/eclipse/emf/ecore/EClass.html" title="View JavaDoc"><abbr title="org.eclipse.emf.ecore.EClass" >EClass</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.6.0/org/eclipse/emf/parsley/ui/provider/FeaturesProvider.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.ui.provider.FeaturesProvider" >FeaturesProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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/>
+}
+<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.6.0/org/eclipse/emf/parsley/ui/provider/FeaturesProvider.EClassToEStructuralFeatureMap.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.ui.provider.FeaturesProvider.EClassToEStructuralFeatureMap" >FeaturesProvider.EClassToEStructuralFeatureMap</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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/>
+}
+<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.6.0/org/eclipse/emf/ecore/EClass.html" title="View JavaDoc"><abbr title="org.eclipse.emf.ecore.EClass" >EClass</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.6.0/org/eclipse/emf/ecore/EStructuralFeature.html" title="View JavaDoc"><abbr title="org.eclipse.emf.ecore.EStructuralFeature" >EStructuralFeature</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.6.0/org/eclipse/emf/ecore/EClass.html" title="View JavaDoc"><abbr title="org.eclipse.emf.ecore.EClass" >EClass</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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/>
+}
+<br/>
+</p>
+</div>
+</div>
+</p>
+<a name="FeaturesColumnProvider"></a>
+<h4>Features Column Provider</h4>
+<p>
+As an extension, you can use the <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/ui/provider/FeaturesColumnProvider.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.ui.provider.FeaturesColumnProvider" >FeaturesColumnProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/FeaturesColumnProvider.java" title="View Source Code" >(src)</a>:
+the customizations will be applied only to <a href="03-Components.html#TableComponent" title="Go to "Table Component"">tables</a>, not to <a href="03-Components.html#FormComponent" title="Go to "Form Component"">Forms</a>.
+</p>
+<a name="PropertyDescriptionProvider"></a>
+<h3>Property Description Provider</h3>
+<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.6.0/org/eclipse/emf/parsley/ui/provider/PropertyDescriptionProvider.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.ui.provider.PropertyDescriptionProvider" >PropertyDescriptionProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/PropertyDescriptionProvider.java" title="View Source Code" >(src)</a> provides labels for
+the features. It can be customized, with injection (see Injection paragraph), to customize the label on the
+left of each control. 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 label 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/>
+
+<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/>
+ }
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+Another chance of customization is to define a method the returns directly the control, like in the example
+below. In this case 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/>
+ }
+<br/>
+</p>
+</div>
+</div>
+</p>
+<a name="FormPropertyDescriptionProvider"></a>
+<h4>Form Property Description Provider</h4>
+<p>
+The <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/ui/provider/FormPropertyDescriptionProvider.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.ui.provider.FormPropertyDescriptionProvider" >FormPropertyDescriptionProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/parsley/ui/provider/FormPropertyDescriptionProvider.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.html#TreeFormComponent" title="Go to "Tree Form Component"">Tree
+Form</a> your definition will not be used in the tree.
+</p>
+<a name="ViewerLabelProvider"></a>
+<h3>Viewer Label Provider</h3>
+<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="View JavaDoc"><abbr title="org.eclipse.jface.viewers.ILabelProvider" >ILabelProvider</abbr></a>
+and injecting it in the spefic module <em>(TODO)</em>.
+EMF Components provides such an implementation with the class <a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/ui/provider/ViewerLabelProvider.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.ui.provider.ViewerLabelProvider" >ViewerLabelProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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/>
+
+<br/>
+ @Inject
+<br/>
+ <span class="keyword">public</span> CustomLibraryLabelProvider(AdapterFactoryLabelProvider delegate) {
+<br/>
+ <span class="keyword">super</span>(delegate);
+<br/>
+ }
+<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/>
+
+<br/>
+ <span class="keyword">public</span> String image(Book book) {
+<br/>
+ <span class="keyword">return</span> <span class="string">"book2.png"</span>;
+<br/>
+ }
+<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/>
+ }
+<br/>
+</p>
+</div>
+</div>
+</p>
+<a name="ViewerContentProvider"></a>
+<h3>Viewer Content Provider</h3>
+<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="View JavaDoc"><abbr title="org.eclipse.jface.viewers.IContentProvider" >IContentProvider</abbr></a>
+by injecting it in the spefic module <em>(TODO)</em>. EMF Components provides an implementation with the class
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/edit/ui/provider/ViewerContentProvider.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.edit.ui.provider.ViewerContentProvider" >ViewerContentProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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/>
+
+<br/>
+ @Inject
+<br/>
+ <span class="keyword">public</span> CustomLibraryViewerContentProvider(AdapterFactory adapterFactory) {
+<br/>
+ <span class="keyword">super</span>(adapterFactory);
+<br/>
+ }
+<br/>
+
+<br/>
+ <span class="keyword">public</span> Object children(Library library) {
+<br/>
+ <span class="keyword">return</span> library.getBooks();
+<br/>
+ }
+<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/>
+ }
+<br/>
+</p>
+</div>
+</div>
+</p>
+<a name="ProposalProvider"></a>
+<h3>Proposal Provider</h3>
+<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/>
+ }
+<br/>
+</p>
+</div>
+</div>
+</p>
+<a name="ViewerContextMenuFactory"></a>
+<h3>Viewer Context Menu Factory</h3>
+<p>
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/menus/ViewerContextMenuFactory.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.menus.ViewerContextMenuFactory" >ViewerContextMenuFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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>
+<h3>Table Column Label Provider</h3>
+<p>
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/ui/provider/TableColumnLabelProvider.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.ui.provider.TableColumnLabelProvider" >TableColumnLabelProvider</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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>
+<h2>Selection And Menu</h2>
+<a name="EmfSelectionHelper"></a>
+<h3>Emf Selection Helper</h3>
+<p>
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/util/EmfSelectionHelper.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.util.EmfSelectionHelper" >EmfSelectionHelper</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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>
+<h2>Builders</h2>
+<a name="TableViewerBuilder"></a>
+<h3>Table Viewer Builder</h3>
+<p>
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/builders/TableViewerBuilder.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.builders.TableViewerBuilder" >TableViewerBuilder</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.html#TableViewerColumnBuilder" title="Go to "Table Viewer Column Builder"">TableViewerColumnBuilder</a>
+ </li>
+ <li>
+ <a href="04-Customization.html#ViewerInitializer" title="Go to "Viewer Initializer"">ViewerInitializer</a>
+ </li>
+</ul>
+</p>
+<a name="TableViewerColumnBuilder"></a>
+<h3>Table Viewer Column Builder</h3>
+<p>
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/builders/TableViewerColumnBuilder.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.builders.TableViewerColumnBuilder" >TableViewerColumnBuilder</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.html#JfaceProviderFactory" title="Go to "Jface Provider Factory"">JfaceProviderFactory</a>
+ </li>
+ <li>
+ <a href="04-Customization.html#PropertyDescriptionProvider" title="Go to "Property Description Provider"">PropertyDescriptionProvider</a>
+ </li>
+ <li>
+ <a href="04-Customization.html#FeaturesProvider" title="Go to "Features Provider"">FeaturesProvider</a>
+ </li>
+</ul>
+</p>
+<a name="TableViewerEditableColumnBuilder"></a>
+<h4>Table Viewer Editable Column Builder</h4>
+<p>
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/builders/TableViewerEditableColumnBuilder.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.builders.TableViewerEditableColumnBuilder" >TableViewerEditableColumnBuilder</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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>
+<h2>Factories</h2>
+<a name="FormFactory"></a>
+<h3>Form Factory</h3>
+<p>
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/factories/FormFactory.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.factories.FormFactory" >FormFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.html#FormPropertyDescriptionProvider" title="Go to "Form Property Description Provider"">FormPropertyDescriptionProvider</a>
+ </li>
+ <li>
+ <a href="04-Customization.html#FormControlFactory" title="Go to "Form Control Factory"">Form Control Factory</a>
+ </li>
+ <li>
+ <a href="04-Customization.html#EditingDomainFinder" title="Go to "Editing Domain Finder"">EditingDomainFinder</a>
+ </li>
+ <li>
+ <a href="04-Customization.html#JfaceProviderFactory" title="Go to "Jface Provider Factory"">JfaceProviderFactory</a>
+ </li>
+ <li>
+ <a href="04-Customization.html#FeaturesProvider" title="Go to "Features Provider"">FeaturesProvider</a>
+ </li>
+</ul>
+</p>
+<a name="JfaceProviderFactory"></a>
+<h3>Jface Provider Factory</h3>
+<p>
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/factories/ColumnLabelProviderFactory.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.factories.ColumnLabelProviderFactory" >ColumnLabelProviderFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.html#ViewerLabelProvider" title="Go to "Viewer Label Provider"">ViewerLabelProvider</a>
+ </li>
+ <li>
+ <a href="04-Customization.html#TableColumnLabelProvider" title="Go to "Table Column Label Provider"">TableColumnLabelProvider</a>
+ </li>
+</ul>
+</p>
+<a name="FormControlFactory"></a>
+<h3>Form Control Factory</h3>
+<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.6.0/org/eclipse/emf/parsley/binding/FormControlFactory.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.binding.FormControlFactory" >FormControlFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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/>
+ }
+<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.html#JfaceProviderFactory" title="Go to "Jface Provider Factory"">JfaceProviderFactory</a>
+ </li>
+</ul>
+</p>
+<a name="TreeFormFactory"></a>
+<h3>Tree Form Factory</h3>
+<p>
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/factories/TreeFormFactory.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.factories.TreeFormFactory" >TreeFormFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.html#ViewerInitializer" title="Go to "Viewer Initializer"">ViewerInitializer</a>
+ </li>
+ <li>
+ <a href="04-Customization.html#FormFactory" title="Go to "Form Factory"">FormFactory</a>
+ </li>
+</ul>
+</p>
+<a name="ViewerFactory"></a>
+<h3>Viewer Factory</h3>
+<p>
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/factories/ViewerFactory.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.factories.ViewerFactory" >ViewerFactory</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.html#TableViewerBuilder" title="Go to "Table Viewer Builder"">TableViewerBuilder</a>
+ </li>
+ <li>
+ <a href="04-Customization.html#ViewerInitializer" title="Go to "Viewer Initializer"">ViewerInitializer</a>
+ </li>
+</ul>
+</p>
+<a name="AdapterFactoryEditingDomain"></a>
+<h3>Viewer Factory</h3>
+<p>
+AdapterFactoryEditingDomain
+</p>
+<p>
+AdapterFactory
+</p>
+<a name="Viewers"></a>
+<h2>Viewers</h2>
+<a name="ViewerInitializer"></a>
+<h3>Viewer Initializer</h3>
+<p>
+<a class="jdoc" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/org/eclipse/emf/parsley/viewers/ViewerInitializer.html" title="View JavaDoc"><abbr title="org.eclipse.emf.parsley.viewers.ViewerInitializer" >ViewerInitializer</abbr></a> <a class="srcLink" href="https://github.com/eclipse/emf/blob/R2_8_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.html#ViewerContextMenuFactory" title="Go to "Viewer Context Menu Factory"">AdapterFactory</a>
+ </li>
+ <li>
+ <em>ILabelProvider</em>
+ </li>
+ <li>
+ <em>IContentProvider</em>
+ </li>
+</ul>
+
+</p>
+</body>
+</html>
diff --git a/documentation/04-Customization.php b/documentation/04-Customization.php
deleted file mode 100644
index 0d69723..0000000
--- a/documentation/04-Customization.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
- include("include.php");
- $pageTitle = "Customization";
-
- $html = file_get_contents('04-Customization.html');
-
- $Nav->setLinkList(array());
-
- $App->AddExtraHtmlHeader('
- <script type="text/javascript">
- function init() {
- var docName = "04-Customization.html";
- initTocMenu(docName);
- highlightCurrentSection(docName);
- }
-
- function initTocMenu(ActiveSubTocElementId){
- var menu = document.getElementById("leftnav");
-
- var chapters = menu.children;
- addHideSubsectionFunction(chapters);
- var subToc = document.getElementById(\'subToc_\' + ActiveSubTocElementId);
- if(subToc) {
- subToc.style.display = "block";
- subToc.previousElementSibling.children[0].style.display = "none"
- subToc.previousElementSibling.children[1].style.display = "inline"
- }
- }
-
- function switchImages(chap) {
-
- }
-
- function addHideSubsectionFunction(items){
- for (var i = 0; i < items.length; i++) {
- if (items[i].firstElementChild != null && items[i].className == "separator"){
- if(items[i].firstElementChild.firstElementChild != null){
- items[i].firstElementChild.firstElementChild.onclick = function(){this.nextElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- items[i].firstElementChild.firstElementChild.nextElementSibling.onclick = function(){this.previousElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- }
- items[i].firstElementChild.style.cursor = "pointer";
- }
- }
- }
-
- function toc_toggle_subsections(chap){
- if ( chap.children[1].style.display != "none" ) {
- chap.children[1].style.display = "none"
- } else {
- chap.children[1].style.display = "block"
- }
- }
-
- function highlightCurrentSection(sec) {
- document.getElementById(sec).style.backgroundColor= "#D0D0D0"
- }
-
- if ( window.addEventListener ) {
- window.addEventListener( "load", init, false );
- }
- else if ( window.attachEvent ) {
- window.attachEvent( "onload", init );
- } else
- if ( window.onLoad ) {
- window.onload = init;
- }
- </script>');
-
- # Generate the web page
- $App->generatePage("Nova", $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
diff --git a/documentation/05-DSL.html b/documentation/05-DSL.html
index 64ea0cd..17772fd 100644
--- a/documentation/05-DSL.html
+++ b/documentation/05-DSL.html
@@ -1,132 +1,16 @@
-<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#reflectiveComponents.html" ><a href="01-Introduction.php#reflectiveComponents.php" >Reflective Components</a></li>
- <li id="01-Introduction.html#easyToCustomize.html" ><a href="01-Introduction.php#easyToCustomize.php" >Easy to Customize</a></li>
- <li id="01-Introduction.html#architecture.html" ><a href="01-Introduction.php#architecture.php" >Architecture</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 Components 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#Eclipse4ApplicationAndEMFComponents.html" ><a href="07-Eclipse4.php#Eclipse4ApplicationAndEMFComponents.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; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" />
- <a href="GettingSources.php">Getting Sources</a></div>
- <ul style="display: none;" id="subToc_GettingSources.html">
- <li id="GettingSources.html#InstallBuckminster.html" ><a href="GettingSources.php#InstallBuckminster.php" >Install Buckminster in the IDE</a></li>
- <li id="GettingSources.html#PrepareTP.html" ><a href="GettingSources.php#PrepareTP.php" >Prepare an empty target platform</a></li>
- <li id="GettingSources.html#MaterializeWP.html" ><a href="GettingSources.php#MaterializeWP.php" >Materialize the Workspace</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="samples.php">Xdoc Samples</a></div>
- <ul style="display: none;" id="subToc_samples.html">
- <li id="samples.html#Links.html" ><a href="samples.php#Links.php" >References</a></li>
- <li id="samples.html#CodeSections.html" ><a href="samples.php#CodeSections.php" >Code Sections</a></li>
- <li id="samples.html#Lists.html" ><a href="samples.php#Lists.php" >Lists and Tables</a></li>
- <li id="samples.html#Tables.html" ><a href="samples.php#Tables.php" >Tables</a></li>
- <li id="samples.html#TODO.html" ><a href="samples.php#TODO.php" >TODO</a></li>
- <li id="samples.html#Images.html" ><a href="samples.php#Images.php" >Images</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div id="midcolumn">
- <a name="DSL" ></a>
- <h1>EMF Components DSL</h1>
- <div class="toc">
- <ul>
- <li><a href="05-DSL.php#xbase.php" >Xbase features</a></li>
- </ul>
- </div>
-
- <a name="xbase" ></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>Xbase features</h1>
- <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 = 'DSL';
- var disqus_url = documentationRoot+'05-DSL.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;">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
+<title>EMF Components DSL</title>
+
+<link href="book.css" rel="stylesheet" type="text/css">
+<link href="code.css" rel="stylesheet" type="text/css">
+<link rel="home" href="xtext.html" title="">
+</head>
+<body>
+<a name="DSL"></a>
+<h1>EMF Components DSL</h1>
+<a name="xbase"></a>
+<h2>Xbase features</h2>
+</body>
+</html>
diff --git a/documentation/05-DSL.php b/documentation/05-DSL.php
deleted file mode 100644
index 3fb7ea3..0000000
--- a/documentation/05-DSL.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
- include("include.php");
- $pageTitle = "EMF Components DSL";
-
- $html = file_get_contents('05-DSL.html');
-
- $Nav->setLinkList(array());
-
- $App->AddExtraHtmlHeader('
- <script type="text/javascript">
- function init() {
- var docName = "05-DSL.html";
- initTocMenu(docName);
- highlightCurrentSection(docName);
- }
-
- function initTocMenu(ActiveSubTocElementId){
- var menu = document.getElementById("leftnav");
-
- var chapters = menu.children;
- addHideSubsectionFunction(chapters);
- var subToc = document.getElementById(\'subToc_\' + ActiveSubTocElementId);
- if(subToc) {
- subToc.style.display = "block";
- subToc.previousElementSibling.children[0].style.display = "none"
- subToc.previousElementSibling.children[1].style.display = "inline"
- }
- }
-
- function switchImages(chap) {
-
- }
-
- function addHideSubsectionFunction(items){
- for (var i = 0; i < items.length; i++) {
- if (items[i].firstElementChild != null && items[i].className == "separator"){
- if(items[i].firstElementChild.firstElementChild != null){
- items[i].firstElementChild.firstElementChild.onclick = function(){this.nextElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- items[i].firstElementChild.firstElementChild.nextElementSibling.onclick = function(){this.previousElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- }
- items[i].firstElementChild.style.cursor = "pointer";
- }
- }
- }
-
- function toc_toggle_subsections(chap){
- if ( chap.children[1].style.display != "none" ) {
- chap.children[1].style.display = "none"
- } else {
- chap.children[1].style.display = "block"
- }
- }
-
- function highlightCurrentSection(sec) {
- document.getElementById(sec).style.backgroundColor= "#D0D0D0"
- }
-
- if ( window.addEventListener ) {
- window.addEventListener( "load", init, false );
- }
- else if ( window.attachEvent ) {
- window.attachEvent( "onload", init );
- } else
- if ( window.onLoad ) {
- window.onload = init;
- }
- </script>');
-
- # Generate the web page
- $App->generatePage("Nova", $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
diff --git a/documentation/06-AdvancedComponents.html b/documentation/06-AdvancedComponents.html
index da7b9c5..d434efa 100644
--- a/documentation/06-AdvancedComponents.html
+++ b/documentation/06-AdvancedComponents.html
@@ -1,121 +1,14 @@
-<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#reflectiveComponents.html" ><a href="01-Introduction.php#reflectiveComponents.php" >Reflective Components</a></li>
- <li id="01-Introduction.html#easyToCustomize.html" ><a href="01-Introduction.php#easyToCustomize.php" >Easy to Customize</a></li>
- <li id="01-Introduction.html#architecture.html" ><a href="01-Introduction.php#architecture.php" >Architecture</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 Components 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#Eclipse4ApplicationAndEMFComponents.html" ><a href="07-Eclipse4.php#Eclipse4ApplicationAndEMFComponents.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; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" />
- <a href="GettingSources.php">Getting Sources</a></div>
- <ul style="display: none;" id="subToc_GettingSources.html">
- <li id="GettingSources.html#InstallBuckminster.html" ><a href="GettingSources.php#InstallBuckminster.php" >Install Buckminster in the IDE</a></li>
- <li id="GettingSources.html#PrepareTP.html" ><a href="GettingSources.php#PrepareTP.php" >Prepare an empty target platform</a></li>
- <li id="GettingSources.html#MaterializeWP.html" ><a href="GettingSources.php#MaterializeWP.php" >Materialize the Workspace</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="samples.php">Xdoc Samples</a></div>
- <ul style="display: none;" id="subToc_samples.html">
- <li id="samples.html#Links.html" ><a href="samples.php#Links.php" >References</a></li>
- <li id="samples.html#CodeSections.html" ><a href="samples.php#CodeSections.php" >Code Sections</a></li>
- <li id="samples.html#Lists.html" ><a href="samples.php#Lists.php" >Lists and Tables</a></li>
- <li id="samples.html#Tables.html" ><a href="samples.php#Tables.php" >Tables</a></li>
- <li id="samples.html#TODO.html" ><a href="samples.php#TODO.php" >TODO</a></li>
- <li id="samples.html#Images.html" ><a href="samples.php#Images.php" >Images</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div id="midcolumn">
- <a name="AdvancedComponents" ></a>
- <h1>Advanced Components</h1>
-
- <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 = 'AdvancedComponents';
- var disqus_url = documentationRoot+'06-AdvancedComponents.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;">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
+<title>Advanced Components</title>
+
+<link href="book.css" rel="stylesheet" type="text/css">
+<link href="code.css" rel="stylesheet" type="text/css">
+<link rel="home" href="xtext.html" title="">
+</head>
+<body>
+<a name="AdvancedComponents"></a>
+<h1>Advanced Components</h1>
+</body>
+</html>
diff --git a/documentation/06-AdvancedComponents.php b/documentation/06-AdvancedComponents.php
deleted file mode 100644
index da06e97..0000000
--- a/documentation/06-AdvancedComponents.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
- include("include.php");
- $pageTitle = "Advanced Components";
-
- $html = file_get_contents('06-AdvancedComponents.html');
-
- $Nav->setLinkList(array());
-
- $App->AddExtraHtmlHeader('
- <script type="text/javascript">
- function init() {
- var docName = "06-AdvancedComponents.html";
- initTocMenu(docName);
- highlightCurrentSection(docName);
- }
-
- function initTocMenu(ActiveSubTocElementId){
- var menu = document.getElementById("leftnav");
-
- var chapters = menu.children;
- addHideSubsectionFunction(chapters);
- var subToc = document.getElementById(\'subToc_\' + ActiveSubTocElementId);
- if(subToc) {
- subToc.style.display = "block";
- subToc.previousElementSibling.children[0].style.display = "none"
- subToc.previousElementSibling.children[1].style.display = "inline"
- }
- }
-
- function switchImages(chap) {
-
- }
-
- function addHideSubsectionFunction(items){
- for (var i = 0; i < items.length; i++) {
- if (items[i].firstElementChild != null && items[i].className == "separator"){
- if(items[i].firstElementChild.firstElementChild != null){
- items[i].firstElementChild.firstElementChild.onclick = function(){this.nextElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- items[i].firstElementChild.firstElementChild.nextElementSibling.onclick = function(){this.previousElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- }
- items[i].firstElementChild.style.cursor = "pointer";
- }
- }
- }
-
- function toc_toggle_subsections(chap){
- if ( chap.children[1].style.display != "none" ) {
- chap.children[1].style.display = "none"
- } else {
- chap.children[1].style.display = "block"
- }
- }
-
- function highlightCurrentSection(sec) {
- document.getElementById(sec).style.backgroundColor= "#D0D0D0"
- }
-
- if ( window.addEventListener ) {
- window.addEventListener( "load", init, false );
- }
- else if ( window.attachEvent ) {
- window.attachEvent( "onload", init );
- } else
- if ( window.onLoad ) {
- window.onload = init;
- }
- </script>');
-
- # Generate the web page
- $App->generatePage("Nova", $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
diff --git a/documentation/07-Eclipse4.html b/documentation/07-Eclipse4.html
index 9a0e3ed..91e61e5 100644
--- a/documentation/07-Eclipse4.html
+++ b/documentation/07-Eclipse4.html
@@ -1,495 +1,378 @@
-<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#reflectiveComponents.html" ><a href="01-Introduction.php#reflectiveComponents.php" >Reflective Components</a></li>
- <li id="01-Introduction.html#easyToCustomize.html" ><a href="01-Introduction.php#easyToCustomize.php" >Easy to Customize</a></li>
- <li id="01-Introduction.html#architecture.html" ><a href="01-Introduction.php#architecture.php" >Architecture</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 Components 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#Eclipse4ApplicationAndEMFComponents.html" ><a href="07-Eclipse4.php#Eclipse4ApplicationAndEMFComponents.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; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" />
- <a href="GettingSources.php">Getting Sources</a></div>
- <ul style="display: none;" id="subToc_GettingSources.html">
- <li id="GettingSources.html#InstallBuckminster.html" ><a href="GettingSources.php#InstallBuckminster.php" >Install Buckminster in the IDE</a></li>
- <li id="GettingSources.html#PrepareTP.html" ><a href="GettingSources.php#PrepareTP.php" >Prepare an empty target platform</a></li>
- <li id="GettingSources.html#MaterializeWP.html" ><a href="GettingSources.php#MaterializeWP.php" >Materialize the Workspace</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="samples.php">Xdoc Samples</a></div>
- <ul style="display: none;" id="subToc_samples.html">
- <li id="samples.html#Links.html" ><a href="samples.php#Links.php" >References</a></li>
- <li id="samples.html#CodeSections.html" ><a href="samples.php#CodeSections.php" >Code Sections</a></li>
- <li id="samples.html#Lists.html" ><a href="samples.php#Lists.php" >Lists and Tables</a></li>
- <li id="samples.html#Tables.html" ><a href="samples.php#Tables.php" >Tables</a></li>
- <li id="samples.html#TODO.html" ><a href="samples.php#TODO.php" >TODO</a></li>
- <li id="samples.html#Images.html" ><a href="samples.php#Images.php" >Images</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div id="midcolumn">
- <a name="Eclipse4" ></a>
- <h1>Eclipse 4</h1>
- <div class="toc">
- <ul>
- <li><a href="07-Eclipse4.php#GetFirstExample.php" >First Example Setup</a></li>
- <li><a href="07-Eclipse4.php#PrepareForEclipse4Application.php" >Preparing for a pure Eclipse 4 Application</a></li>
- <li><a href="07-Eclipse4.php#CreateEclipse4Application.php" >Create an Eclipse 4 Application</a></li>
- <li><a href="07-Eclipse4.php#Eclipse4ApplicationAndEMFComponents.php" >Using an EMF Parsley TreeComposite into an Eclipse 4 Part</a></li>
- <li><a href="07-Eclipse4.php#Eclipse4Save.php" >Adding the dirty state and Save command</a></li>
- </ul>
- </div>
-
- <p>
- Instead of using the Extension Point mechanism, EMF Components leverages from DSL and Google Guice Injection.
- </p>
- <p>
- Because of this, it is very easy to use it with Eclipse 4.
- </p>
- <a name="GetFirstExample" ></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>First Example Setup</h1>
- <p>
- If you followed the steps described in section <a href="02-GettingStarted.php" title="Go to "Getting Started"">Getting Started</a> you will have already
- what we need to begin. Otherwise the following wizard will bring you to that point.
- </p>
- <p>
- <ol>
- <li>File -> New... -> Example...</li>
- <li>from Category "Emf Parsley Examples", select "Emf Parsley First Example"</li>
- <li>press Next and Finish</li>
- </ol>
- </p>
- <p>
- You will end up with three plug-ins:
- </p>
- <p>
- <ul>
- <li>org.eclipse.emf.parsley.examples.firstexample (the EMF Components example plug-in)</li>
- <li>org.eclipse.emf.examples.library (the model plug-in)</li>
- <li>org.eclipse.emf.examples.library.edit (the model.edit plug-in)</li>
- </ul>
- </p>
- <p>
- As a reminder, in section <a href="02-GettingStarted.php" title="Go to "Getting Started"">Getting Started</a> we reached the point where we launched a second Eclipse
- instance (but, of course, just defining a product you could have a standalone 3.x application) with a
- view (called "My Library Tree Form") that allowed to manage the model.
- </p>
- <a name="PrepareForEclipse4Application" ></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>Preparing for a pure Eclipse 4 Application</h1>
- <p>
- What we will do now is starting from the previous step and create an Eclipse 4 Application (on top of
- the previous plug-ins) that gets to the same result, but now with a pure Eclipse 4 Part.
- </p>
- <p>
- In order to do this we need to export the <em>"org.eclipse.emf.parsley.examples.firstexample"</em> package from the first plug-in.
- </p>
- <a name="CreateEclipse4Application" ></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>Create an Eclipse 4 Application</h1>
- <p>
- Now let's create a new, empty, Eclipse 4 application, e.g. <em>"org.eclipse.emf.parsley.examples.firstexample.application"</em>
- (you can find details on how to create Eclipse 4 applications in <a href="http://www.rcp-vision.com/?p=4694&lang=en" >our
- tutorials</a>).
- </p>
- <p>
- Create a Part and ensure that the application starts.
- </p>
- <a name="Eclipse4ApplicationAndEMFComponents" ></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>Using an EMF Parsley TreeComposite into an Eclipse 4 Part</h1>
- <p>
- In the just created plug-in we need dependencies from the previous plug-ins: so open the <em>org.eclipse.emf.parsley.examples.firstexample.application/MANIFEST.MF</em> file, go to <em>Dependencies</em>
- tab and add the three previous plug-ins. Add also <em>"org.eclipse.emf.parsley"</em> plug-in.
- Don't forget to add the previous, and the required plug-ins, also to the Product.
- </p>
- <p>
- Open the Part java class and make the following changes:
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="comment">// Use these imports during Organizing Imports operation
- <br/>
- </span><span class="keyword">import</span> org.eclipse.emf.common.util.URI;
- <br/>
- <span class="keyword">import</span> org.eclipse.emf.ecore.resource.Resource;
- <br/>
- <span class="keyword">import</span> org.eclipse.swt.widgets.Composite;
- </p>
- </div>
- </div>
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="comment">// The part implements IMenuListener for context menu handling
- <br/>
- </span>public class MyEclipse4Part implements IMenuListener
- </p>
- </div>
- </div>
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="comment">//the parent composite
- <br/>
- </span>private Composite parent;
- <br/>
- <span class="comment">//the EMF Parley composite for showing a tree and a detail form
- <br/>
- </span>private TreeFormComposite treeFormComposite;
- <br/>
- <span class="comment">//the EMF Resource
- <br/>
- </span>private Resource resource;
- <br/>
- <span class="comment">//Guice injected EMF Parsley component for contributing to the tree context menu
- <br/>
- </span>private TreeActionBarContributor treeActionBarContributor = FirstexampleActivator.getDefault().getInjector()
- <br/>
- .getInstance(TreeActionBarContributor.class);
- <br/>
-
- <br/>
- <span class="comment">//Guice injected EMF Parsley factory for the tree detail form
- <br/>
- </span>private TreeFormFactory treeFormFactory = FirstexampleActivator.getDefault().getInjector()
- <br/>
- .getInstance(TreeFormFactory.class);
- <br/>
- <span class="comment">//Guice injected EMF Parsley Resource loader
- <br/>
- </span>private ResourceLoader resourceLoader = FirstexampleActivator.getDefault().getInjector()
- <br/>
- .getInstance(ResourceLoader.class);
- <br/>
- <span class="comment">//Guice injected EMF Parsley editing domain
- <br/>
- </span>private AdapterFactoryEditingDomain editingDomain = FirstexampleActivator.getDefault().getInjector()
- <br/>
- .getInstance(AdapterFactoryEditingDomain.class);
- <br/>
- <span class="comment">//Guice injected viewer initializer
- <br/>
- </span>private ViewerInitializer viewerInitializer = (ViewerInitializer) FirstexampleActivator.getDefault().getInjector()
- <br/>
- .getInstance(ViewerInitializer.class);
- <br/>
- <span class="comment">//Guice injected save manager
- <br/>
- </span>private ResourceSaveManager resourceSaveManager = FirstexampleActivator.getDefault().getInjector()
- <br/>
- .getInstance(ResourceSaveManager.class);
- <br/>
- <span class="comment">//URI for EMF Resource
- <br/>
- </span>private URI uri = URI.createFileURI(System.getProperty(<span class="string">"user.home"</span>)
- <br/>
- + <span class="string">"/MyLibrary.library"</span>);
- </p>
- </div>
- </div>
- </p>
- <p>
- Modify the <em>@PostConstruct</em> method with this code:
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- @PostConstruct
- <br/>
- public void postConstruct(Composite parent) {
- <br/>
- this.parent = parent;
- <br/>
- <span class="comment">// Initialize TreeFormFactory & ResourceLoader
- <br/>
- </span> init(treeFormFactory, resourceLoader);
- <br/>
- <span class="comment">// Prepare the menu action bar contributor upon the selection
- <br/>
- </span> treeFormComposite.getViewer().addSelectionChangedListener(treeActionBarContributor);
- <br/>
- }
- </p>
- </div>
- </div>
- </p>
- <p>
- and add the following methods:
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- public void init(TreeFormFactory treeFormFactory, ResourceLoader resourceLoader) {
- <br/>
- <span class="comment">//create the tree-form composite
- <br/>
- </span> treeFormComposite = treeFormFactory.createTreeFormMasterDetailComposite(parent, SWT.BORDER);
- <br/>
- <span class="comment">//load the resource
- <br/>
- </span> resource = resourceLoader.getResource(editingDomain, uri).getResource();
- <br/>
- <span class="comment">//update the composite
- <br/>
- </span> treeFormComposite.update(resource);
- <br/>
- <span class="comment">//initialize and bind the context menu to the tree-form composite
- <br/>
- </span> treeActionBarContributor.initialize(editingDomain);
- <br/>
- viewerInitializer.addContextMenu(
- <br/>
- treeFormComposite.getViewer(), treeActionBarContributor, editingDomain, this);
- <br/>
- }
- <br/>
- @Override
- <br/>
- public void menuAboutToShow(IMenuManager manager) {
- <br/>
- treeActionBarContributor.menuAboutToShow(manager);
- <br/>
- }
- </p>
- </div>
- </div>
- </p>
- <p>
- If you now run the application you will be able to manage the model:
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="" href="images/07-eclipse4-part.png">
- <img src="images/07-eclipse4-part.png"
- width="600px"
- />
- </a>
- <div class="caption">
- </div>
- </div>
- </p>
- <p>
- but you will notice that it is not possible to persist the changes to the model.
- </p>
- <a name="Eclipse4Save" ></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>Adding the dirty state and Save command</h1>
- <p>
- In order to allow persisting the model changes we have to add the dirty state handling to the part and
- the Save command to the application.
- Let's start with adding the following attribute to the part
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- @Inject
- <br/>
- MDirtyable dirtyable;
- </p>
- </div>
- </div>
- </p>
- <p>
- initialize it in the <em>@PostConstruct</em> method
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- @PostConstruct
- <br/>
- public void postConstruct(Composite parent, MDirtyable dirtyable) {
- <br/>
- this.dirtyable = dirtyable;
- <br/>
- this.dirtyable.setDirty(false);
- </p>
- </div>
- </div>
- </p>
- <p>
- add to <em>init</em> method the following code in order to update the dirty state
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- editingDomain.getCommandStack().addCommandStackListener(
- <br/>
- new CommandStackListener() {
- <br/>
- public void commandStackChanged(EventObject event) {
- <br/>
- if (dirtyable != null)
- <br/>
- dirtyable.setDirty(true);
- <br/>
- }
- <br/>
- });
- </p>
- </div>
- </div>
- </p>
- <p>
- and add the <em>@Persist</em> method, which will be called when the part is saved
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- @Persist
- <br/>
- public void save(MDirtyable dirty) throws IOException {
- <br/>
- if (resourceSaveManager.save(resource)) {
- <br/>
- if (dirty != null) {
- <br/>
- dirty.setDirty(false);
- <br/>
- }
- <br/>
- }
- <br/>
- }
- </p>
- </div>
- </div>
- </p>
- <p>
- and, in the end, add the <em>Save</em> handler along with the correspondent <em>Command</em> and <em>Menu</em>
- (you can find how to create handlers, commands and menus in an Eclipse 4 applications in <a href="http://www.rcp-vision.com/?p=4972&lang=en" >our
- tutorials</a>)
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- public class SaveHandler {
- <br/>
- @Execute
- <br/>
- void execute(EPartService partService, @Named(IServiceConstants.ACTIVE_PART) MPart part) {
- <br/>
- partService.savePart(part, false);
- <br/>
- }
- <br/>
- }
- </p>
- </div>
- </div>
- </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 = 'Eclipse4';
- var disqus_url = documentationRoot+'07-Eclipse4.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;">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
+<title>Eclipse 4</title>
+
+<link href="book.css" rel="stylesheet" type="text/css">
+<link href="code.css" rel="stylesheet" type="text/css">
+<link rel="home" href="xtext.html" title="">
+</head>
+<body>
+<a name="Eclipse4"></a>
+<h1>Eclipse 4</h1>
+<p>
+Instead of using the Extension Point mechanism, EMF Components leverages from DSL and Google Guice Injection.
+</p>
+<p>
+Because of this, it is very easy to use it with Eclipse 4.
+</p>
+<a name="GetFirstExample"></a>
+<h2>First Example Setup</h2>
+<p>
+If you followed the steps described in section <a href="02-GettingStarted.html#GettingStarted" title="Go to "Getting Started"">Getting Started</a> you will have already
+what we need to begin. Otherwise the following wizard will bring you to that point.
+</p>
+<p>
+<ol>
+ <li>
+ File -> New... -> Example...
+ </li>
+ <li>
+ from Category "Emf Parsley Examples", select "Emf Parsley First Example"
+ </li>
+ <li>
+ press Next and Finish
+ </li>
+</ol>
+</p>
+<p>
+You will end up with three plug-ins:
+</p>
+<p>
+<ul>
+ <li>
+ org.eclipse.emf.parsley.examples.firstexample (the EMF Components example plug-in)
+ </li>
+ <li>
+ org.eclipse.emf.examples.library (the model plug-in)
+ </li>
+ <li>
+ org.eclipse.emf.examples.library.edit (the model.edit plug-in)
+ </li>
+</ul>
+</p>
+<p>
+As a reminder, in section <a href="02-GettingStarted.html#GettingStarted" title="Go to "Getting Started"">Getting Started</a> we reached the point where we launched a second Eclipse
+instance (but, of course, just defining a product you could have a standalone 3.x application) with a
+view (called "My Library Tree Form") that allowed to manage the model.
+</p>
+<a name="PrepareForEclipse4Application"></a>
+<h2>Preparing for a pure Eclipse 4 Application</h2>
+<p>
+What we will do now is starting from the previous step and create an Eclipse 4 Application (on top of
+the previous plug-ins) that gets to the same result, but now with a pure Eclipse 4 Part.
+</p>
+<p>
+In order to do this we need to export the <em>"org.eclipse.emf.parsley.examples.firstexample"</em> package from the first plug-in.
+</p>
+<a name="CreateEclipse4Application"></a>
+<h2>Create an Eclipse 4 Application</h2>
+<p>
+Now let's create a new, empty, Eclipse 4 application, e.g. <em>"org.eclipse.emf.parsley.examples.firstexample.application"</em>
+(you can find details on how to create Eclipse 4 applications in <a href="http://www.rcp-vision.com/?p=4694&lang=en">our
+tutorials</a>).
+</p>
+<p>
+Create a Part and ensure that the application starts.
+</p>
+<a name="Eclipse4ApplicationAndEMFComponents"></a>
+<h2>Using an EMF Parsley TreeComposite into an Eclipse 4 Part</h2>
+<p>
+In the just created plug-in we need dependencies from the previous plug-ins: so open the <em>org.eclipse.emf.parsley.examples.firstexample.application/MANIFEST.MF</em> file, go to <em>Dependencies</em>
+tab and add the three previous plug-ins. Add also <em>"org.eclipse.emf.parsley"</em> plug-in.
+Don't forget to add the previous, and the required plug-ins, also to the Product.
+</p>
+<p>
+Open the Part java class and make the following changes:
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+<span class="comment">// Use these imports during Organizing Imports operation
+<br/>
+</span><span class="keyword">import</span> org.eclipse.emf.common.util.URI;
+<br/>
+<span class="keyword">import</span> org.eclipse.emf.ecore.resource.Resource;
+<br/>
+<span class="keyword">import</span> org.eclipse.swt.widgets.Composite;
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+<span class="comment">// The part implements IMenuListener for context menu handling
+<br/>
+</span>public class MyEclipse4Part implements IMenuListener
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+<span class="comment">//the parent composite
+<br/>
+</span>private Composite parent;
+<br/>
+<span class="comment">//the EMF Parley composite for showing a tree and a detail form
+<br/>
+</span>private TreeFormComposite treeFormComposite;
+<br/>
+<span class="comment">//the EMF Resource
+<br/>
+</span>private Resource resource;
+<br/>
+<span class="comment">//Guice injected EMF Parsley component for contributing to the tree context menu
+<br/>
+</span>private TreeActionBarContributor treeActionBarContributor = FirstexampleActivator.getDefault().getInjector()
+<br/>
+ .getInstance(TreeActionBarContributor.class);
+<br/>
+
+<br/>
+<span class="comment">//Guice injected EMF Parsley factory for the tree detail form
+<br/>
+</span>private TreeFormFactory treeFormFactory = FirstexampleActivator.getDefault().getInjector()
+<br/>
+ .getInstance(TreeFormFactory.class);
+<br/>
+<span class="comment">//Guice injected EMF Parsley Resource loader
+<br/>
+</span>private ResourceLoader resourceLoader = FirstexampleActivator.getDefault().getInjector()
+<br/>
+ .getInstance(ResourceLoader.class);
+<br/>
+<span class="comment">//Guice injected EMF Parsley editing domain
+<br/>
+</span>private AdapterFactoryEditingDomain editingDomain = FirstexampleActivator.getDefault().getInjector()
+<br/>
+ .getInstance(AdapterFactoryEditingDomain.class);
+<br/>
+<span class="comment">//Guice injected viewer initializer
+<br/>
+</span>private ViewerInitializer viewerInitializer = (ViewerInitializer) FirstexampleActivator.getDefault().getInjector()
+<br/>
+ .getInstance(ViewerInitializer.class);
+<br/>
+<span class="comment">//Guice injected save manager
+<br/>
+</span>private ResourceSaveManager resourceSaveManager = FirstexampleActivator.getDefault().getInjector()
+<br/>
+ .getInstance(ResourceSaveManager.class);
+<br/>
+<span class="comment">//URI for EMF Resource
+<br/>
+</span>private URI uri = URI.createFileURI(System.getProperty(<span class="string">"user.home"</span>)
+<br/>
+ + <span class="string">"/MyLibrary.library"</span>);
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+Modify the <em>@PostConstruct</em> method with this code:
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+@PostConstruct
+<br/>
+public void postConstruct(Composite parent) {
+<br/>
+ this.parent = parent;
+<br/>
+ <span class="comment">// Initialize TreeFormFactory & ResourceLoader
+<br/>
+</span> init(treeFormFactory, resourceLoader);
+<br/>
+ <span class="comment">// Prepare the menu action bar contributor upon the selection
+<br/>
+</span> treeFormComposite.getViewer().addSelectionChangedListener(treeActionBarContributor);
+<br/>
+}
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+and add the following methods:
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+public void init(TreeFormFactory treeFormFactory, ResourceLoader resourceLoader) {
+<br/>
+ <span class="comment">//create the tree-form composite
+<br/>
+</span> treeFormComposite = treeFormFactory.createTreeFormMasterDetailComposite(parent, SWT.BORDER);
+<br/>
+ <span class="comment">//load the resource
+<br/>
+</span> resource = resourceLoader.getResource(editingDomain, uri).getResource();
+<br/>
+ <span class="comment">//update the composite
+<br/>
+</span> treeFormComposite.update(resource);
+<br/>
+ <span class="comment">//initialize and bind the context menu to the tree-form composite
+<br/>
+</span> treeActionBarContributor.initialize(editingDomain);
+<br/>
+ viewerInitializer.addContextMenu(
+<br/>
+ treeFormComposite.getViewer(), treeActionBarContributor, editingDomain, this);
+<br/>
+}
+<br/>
+@Override
+<br/>
+public void menuAboutToShow(IMenuManager manager) {
+<br/>
+ treeActionBarContributor.menuAboutToShow(manager);
+<br/>
+}
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+If you now run the application you will be able to manage the model:
+</p>
+<p>
+<div class="image" >
+<img src="images/07-eclipse4-part.png" class=" "
+/>
+<div class="caption">
+</div>
+</div>
+</p>
+<p>
+but you will notice that it is not possible to persist the changes to the model.
+</p>
+<a name="Eclipse4Save"></a>
+<h2>Adding the dirty state and Save command</h2>
+<p>
+In order to allow persisting the model changes we have to add the dirty state handling to the part and
+the Save command to the application.
+Let's start with adding the following attribute to the part
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+@Inject
+<br/>
+MDirtyable dirtyable;
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+initialize it in the <em>@PostConstruct</em> method
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+@PostConstruct
+<br/>
+public void postConstruct(Composite parent, MDirtyable dirtyable) {
+<br/>
+ this.dirtyable = dirtyable;
+<br/>
+ this.dirtyable.setDirty(false);
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+add to <em>init</em> method the following code in order to update the dirty state
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+ editingDomain.getCommandStack().addCommandStackListener(
+<br/>
+ new CommandStackListener() {
+<br/>
+ public void commandStackChanged(EventObject event) {
+<br/>
+ if (dirtyable != null)
+<br/>
+ dirtyable.setDirty(true);
+<br/>
+ }
+<br/>
+ });
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+and add the <em>@Persist</em> method, which will be called when the part is saved
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+@Persist
+<br/>
+public void save(MDirtyable dirty) throws IOException {
+<br/>
+ if (resourceSaveManager.save(resource)) {
+<br/>
+ if (dirty != null) {
+<br/>
+ dirty.setDirty(false);
+<br/>
+ }
+<br/>
+ }
+<br/>
+}
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+and, in the end, add the <em>Save</em> handler along with the correspondent <em>Command</em> and <em>Menu</em>
+(you can find how to create handlers, commands and menus in an Eclipse 4 applications in <a href="http://www.rcp-vision.com/?p=4972&lang=en">our
+tutorials</a>)
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+public class SaveHandler {
+<br/>
+ @Execute
+<br/>
+ void execute(EPartService partService, @Named(IServiceConstants.ACTIVE_PART) MPart part) {
+<br/>
+ partService.savePart(part, false);
+<br/>
+ }
+<br/>
+}
+<br/>
+</p>
+</div>
+</div>
+</p>
+</body>
+</html>
diff --git a/documentation/07-Eclipse4.php b/documentation/07-Eclipse4.php
deleted file mode 100644
index cdd43c0..0000000
--- a/documentation/07-Eclipse4.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
- include("include.php");
- $pageTitle = "Eclipse 4";
-
- $html = file_get_contents('07-Eclipse4.html');
-
- $Nav->setLinkList(array());
-
- $App->AddExtraHtmlHeader('
- <script type="text/javascript">
- function init() {
- var docName = "07-Eclipse4.html";
- initTocMenu(docName);
- highlightCurrentSection(docName);
- }
-
- function initTocMenu(ActiveSubTocElementId){
- var menu = document.getElementById("leftnav");
-
- var chapters = menu.children;
- addHideSubsectionFunction(chapters);
- var subToc = document.getElementById(\'subToc_\' + ActiveSubTocElementId);
- if(subToc) {
- subToc.style.display = "block";
- subToc.previousElementSibling.children[0].style.display = "none"
- subToc.previousElementSibling.children[1].style.display = "inline"
- }
- }
-
- function switchImages(chap) {
-
- }
-
- function addHideSubsectionFunction(items){
- for (var i = 0; i < items.length; i++) {
- if (items[i].firstElementChild != null && items[i].className == "separator"){
- if(items[i].firstElementChild.firstElementChild != null){
- items[i].firstElementChild.firstElementChild.onclick = function(){this.nextElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- items[i].firstElementChild.firstElementChild.nextElementSibling.onclick = function(){this.previousElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- }
- items[i].firstElementChild.style.cursor = "pointer";
- }
- }
- }
-
- function toc_toggle_subsections(chap){
- if ( chap.children[1].style.display != "none" ) {
- chap.children[1].style.display = "none"
- } else {
- chap.children[1].style.display = "block"
- }
- }
-
- function highlightCurrentSection(sec) {
- document.getElementById(sec).style.backgroundColor= "#D0D0D0"
- }
-
- if ( window.addEventListener ) {
- window.addEventListener( "load", init, false );
- }
- else if ( window.attachEvent ) {
- window.attachEvent( "onload", init );
- } else
- if ( window.onLoad ) {
- window.onload = init;
- }
- </script>');
-
- # Generate the web page
- $App->generatePage("Nova", $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
diff --git a/documentation/GettingSources.html b/documentation/GettingSources.html
index 41c9c6d..c02f563 100644
--- a/documentation/GettingSources.html
+++ b/documentation/GettingSources.html
@@ -1,339 +1,207 @@
-<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#reflectiveComponents.html" ><a href="01-Introduction.php#reflectiveComponents.php" >Reflective Components</a></li>
- <li id="01-Introduction.html#easyToCustomize.html" ><a href="01-Introduction.php#easyToCustomize.php" >Easy to Customize</a></li>
- <li id="01-Introduction.html#architecture.html" ><a href="01-Introduction.php#architecture.php" >Architecture</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 Components 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#Eclipse4ApplicationAndEMFComponents.html" ><a href="07-Eclipse4.php#Eclipse4ApplicationAndEMFComponents.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; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" />
- <a href="GettingSources.php">Getting Sources</a></div>
- <ul style="display: none;" id="subToc_GettingSources.html">
- <li id="GettingSources.html#InstallBuckminster.html" ><a href="GettingSources.php#InstallBuckminster.php" >Install Buckminster in the IDE</a></li>
- <li id="GettingSources.html#PrepareTP.html" ><a href="GettingSources.php#PrepareTP.php" >Prepare an empty target platform</a></li>
- <li id="GettingSources.html#MaterializeWP.html" ><a href="GettingSources.php#MaterializeWP.php" >Materialize the Workspace</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="samples.php">Xdoc Samples</a></div>
- <ul style="display: none;" id="subToc_samples.html">
- <li id="samples.html#Links.html" ><a href="samples.php#Links.php" >References</a></li>
- <li id="samples.html#CodeSections.html" ><a href="samples.php#CodeSections.php" >Code Sections</a></li>
- <li id="samples.html#Lists.html" ><a href="samples.php#Lists.php" >Lists and Tables</a></li>
- <li id="samples.html#Tables.html" ><a href="samples.php#Tables.php" >Tables</a></li>
- <li id="samples.html#TODO.html" ><a href="samples.php#TODO.php" >TODO</a></li>
- <li id="samples.html#Images.html" ><a href="samples.php#Images.php" >Images</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div id="midcolumn">
- <a name="GettingSources" ></a>
- <h1>Getting Sources</h1>
- <div class="toc">
- <ul>
- <li><a href="GettingSources.php#InstallBuckminster.php" >Install Buckminster in the IDE</a></li>
- <li><a href="GettingSources.php#PrepareTP.php" >Prepare an empty target platform</a></li>
- <li><a href="GettingSources.php#MaterializeWP.php" >Materialize the Workspace</a></li>
- </ul>
- </div>
-
- <p>
- If you want to get the sources of EMF Components,
- for instance, to contribute new features and patches, you can get them
- via Git.
- </p>
- <p>
- We use <a href="http://www.eclipse.org/buckminster/" >Buckminster</a> as the
- building and materialization infrastructure; this will let you
- automatically materialize the sources in the workspace and setup
- the target platform, so that you will have everything that is necessary
- to have a working workspace with EMF Components sources.
- </p>
- <p>
- For <a href="http://eclipse.org/rap/" >RAP</a> related project sources
- you will have to use a different workspace (and the materialized target
- platform will be different). The procedure is the same, you will just
- need to use a different URL for the materialization (as explained in the
- following).
- </p>
- <p>
- Some projects will be common to both RCP environment
- and RAP environment.
- </p>
- <a name="InstallBuckminster" ></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>Install Buckminster in the IDE</h1>
- <p>
- First of all, you need to install Buckminster in your Eclipse;
- you can do that using the update site
- </p>
- <p>
- <em>http://download.eclipse.org/tools/buckminster/updates-4.2</em>
- </p>
- <p>
- You need to install the core, git and pde features.
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="Install Buckminster features" href="images/install-buckminster.png">
- <img src="images/install-buckminster.png"
- width="600px"
- style="width:90%"
- />
- </a>
- <div class="caption">
- Install Buckminster features
- </div>
- </div>
- </p>
- <a name="PrepareTP" ></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>Prepare an empty target platform</h1>
- <p>
- It is better to start with an empty target platform in your IDE
- (then Buckminster will materialize the required features and
- bundles starting from that empty target);
- you then need to create an empty target platform manually that contains
- one single and empty directory and set this target platform active.
- A subsequent resolution/materialization will use that platform.
- Here are the detailed steps:
- </p>
- <p>
- <ol>
- <li>Create a new general project named TP
- (or some name of your preference)</li>
- <li>Open "Window" => "Preferences" and expand "Plug-in Development"</li>
- <li>Select "Target Platform"</li>
- <li>Click "Add..."</li>
- <li>Click "Next>" (i.e. start with nothing)</li>
- <li>Enter TP in the Name: field</li>
- <li>Click "Add..."</li>
- <li>Select "Directory" and click "Next"</li>
- <li>Click on "Variables..."</li>
- <li>Scroll down and select "workspace_loc" and then type TP in the Argument: field.</li>
- <li>Click "OK" and then "Finish" and then "Finish" again.</li>
- <li>Set your new target definition active by checking it in the list of Target definitions: and click "OK"</li>
- </ol>
- </p>
- <a name="MaterializeWP" ></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>Materialize the Workspace</h1>
- <div class="toc">
- <ul>
- <li><a href="GettingSources.php#CustomizeProperties.php" >(Optional) Customize some Properties</a></li>
- <li><a href="GettingSources.php#StartMaterialization.php" >Start Materialization</a></li>
- </ul>
- </div>
- <p>
- From the File menu choose <em>Open a Component Query...</em> and
- use this URL
- </p>
- <p>
- <a href="http://emf-components.eclipselabs.org.codespot.com/git/releng/org.eclipse.emf.parsley.buckminster/build.cquery" >http://emf-components.eclipselabs.org.codespot.com/git/releng/org.eclipse.emf.parsley.buckminster/build.cquery</a>
- </p>
- <p>
- If you want to materialize a workspace with EMF Components RAP
- related projects use this URL instead
- </p>
- <p>
- <a href="http://emf-components.eclipselabs.org.codespot.com/git/releng/org.eclipse.emf.parsley.rap.buckminster/build.cquery" >http://emf-components.eclipselabs.org.codespot.com/git/releng/org.eclipse.emf.parsley.rap.buckminster/build.cquery</a>
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="The component query opened" href="images/open-cquery.png">
- <img src="images/open-cquery.png"
- width="600px"
- style="width:90%"
- />
- </a>
- <div class="caption">
- The component query opened
- </div>
- </div>
- </p>
- <a name="CustomizeProperties" ></a>
- <h2>(Optional) Customize some Properties</h2>
- <p>
- Before starting the materialization, you might want to customize
- some properties; you can do that in the <em>Properties</em> tab of
- the opened component query:
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="The properties tab" href="images/open-cquery1.png">
- <img src="images/open-cquery1.png"
- width="600px"
- style="width:90%"
- />
- </a>
- <div class="caption">
- The properties tab
- </div>
- </div>
- </p>
- <p>
- You can add a property by pressing
- the <em>New</em> button.
- </p>
- <p>
- For instance, you can customize the path in your system where
- the git repository will be cloned, which defaults to
- <em>${user.home}/git/emf-components</em>); for instance, you can change it
- to something else
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="Property customization" href="images/open-cquery-new-property1.png">
- <img src="images/open-cquery-new-property1.png"
- width="600px"
- style="width:50%"
- />
- </a>
- <div class="caption">
- Property customization
- </div>
- </div>
- </p>
- <a name="StartMaterialization" ></a>
- <h2>Start Materialization</h2>
- <p>
- You can now press the button in the opened query <em>Resolve and Materialize</em>.
- This will start the materialization process which will consist of
- cloning the git repository, materialize the target platform and importing
- all the projects into the workspace.
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="Materialization..." href="images/resolving-cquery.png">
- <img src="images/resolving-cquery.png"
- width="600px"
- style="width:70%"
- />
- </a>
- <div class="caption">
- Materialization...
- </div>
- </div>
- </p>
- <p>
- Materializing the target platform may take sometime (depending on your
- network connection), so you might want to go and get a coffee
- in the meantime ;)
- </p>
- <p>
- When the whole process terminates, you will have a working
- workspace with EMF Components projects and the needed target platform
- (thus, you should have no error!).
- </p>
- <p>
- <div class="image" >
- <a class="gallery" rel="prettyPhoto[all]" title="The final materialized workspace" href="images/materialized.png">
- <img src="images/materialized.png"
- width="600px"
- style="width:90%"
- />
- </a>
- <div class="caption">
- The final materialized workspace
- </div>
- </div>
-
- </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 = 'GettingSources';
- var disqus_url = documentationRoot+'GettingSources.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;">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
+<title>Getting Sources</title>
+
+<link href="book.css" rel="stylesheet" type="text/css">
+<link href="code.css" rel="stylesheet" type="text/css">
+<link rel="home" href="xtext.html" title="">
+</head>
+<body>
+<a name="GettingSources"></a>
+<h1>Getting Sources</h1>
+<p>
+If you want to get the sources of EMF Components,
+for instance, to contribute new features and patches, you can get them
+via Git.
+</p>
+<p>
+We use <a href="http://www.eclipse.org/buckminster/">Buckminster</a> as the
+building and materialization infrastructure; this will let you
+automatically materialize the sources in the workspace and setup
+the target platform, so that you will have everything that is necessary
+to have a working workspace with EMF Components sources.
+</p>
+<p>
+For <a href="http://eclipse.org/rap/">RAP</a> related project sources
+you will have to use a different workspace (and the materialized target
+platform will be different). The procedure is the same, you will just
+need to use a different URL for the materialization (as explained in the
+following).
+</p>
+<p>
+Some projects will be common to both RCP environment
+and RAP environment.
+</p>
+<a name="InstallBuckminster"></a>
+<h2>Install Buckminster in the IDE</h2>
+<p>
+First of all, you need to install Buckminster in your Eclipse;
+you can do that using the update site
+</p>
+<p>
+<em>http://download.eclipse.org/tools/buckminster/updates-4.2</em>
+</p>
+<p>
+You need to install the core, git and pde features.
+</p>
+<p>
+<div class="image" >
+<img src="images/install-buckminster.png" class=" "
+ style="width:90%" />
+<div class="caption">
+Install Buckminster features
+</div>
+</div>
+</p>
+<a name="PrepareTP"></a>
+<h2>Prepare an empty target platform</h2>
+<p>
+It is better to start with an empty target platform in your IDE
+(then Buckminster will materialize the required features and
+bundles starting from that empty target);
+you then need to create an empty target platform manually that contains
+one single and empty directory and set this target platform active.
+A subsequent resolution/materialization will use that platform.
+Here are the detailed steps:
+</p>
+<p>
+<ol>
+ <li>
+ Create a new general project named TP
+ (or some name of your preference)
+ </li>
+ <li>
+ Open "Window" => "Preferences" and expand "Plug-in Development"
+ </li>
+ <li>
+ Select "Target Platform"
+ </li>
+ <li>
+ Click "Add..."
+ </li>
+ <li>
+ Click "Next>" (i.e. start with nothing)
+ </li>
+ <li>
+ Enter TP in the Name: field
+ </li>
+ <li>
+ Click "Add..."
+ </li>
+ <li>
+ Select "Directory" and click "Next"
+ </li>
+ <li>
+ Click on "Variables..."
+ </li>
+ <li>
+ Scroll down and select "workspace_loc" and then type TP in the Argument: field.
+ </li>
+ <li>
+ Click "OK" and then "Finish" and then "Finish" again.
+ </li>
+ <li>
+ Set your new target definition active by checking it in the list of Target definitions: and click "OK"
+ </li>
+</ol>
+</p>
+<a name="MaterializeWP"></a>
+<h2>Materialize the Workspace</h2>
+<p>
+From the File menu choose <em>Open a Component Query...</em> and
+use this URL
+</p>
+<p>
+<a href="http://emf-components.eclipselabs.org.codespot.com/git/releng/org.eclipse.emf.parsley.buckminster/build.cquery">http://emf-components.eclipselabs.org.codespot.com/git/releng/org.eclipse.emf.parsley.buckminster/build.cquery</a>
+</p>
+<p>
+If you want to materialize a workspace with EMF Components RAP
+related projects use this URL instead
+</p>
+<p>
+<a href="http://emf-components.eclipselabs.org.codespot.com/git/releng/org.eclipse.emf.parsley.rap.buckminster/build.cquery">http://emf-components.eclipselabs.org.codespot.com/git/releng/org.eclipse.emf.parsley.rap.buckminster/build.cquery</a>
+</p>
+<p>
+<div class="image" >
+<img src="images/open-cquery.png" class=" "
+ style="width:90%" />
+<div class="caption">
+The component query opened
+</div>
+</div>
+</p>
+<a name="CustomizeProperties"></a>
+<h3>(Optional) Customize some Properties</h3>
+<p>
+Before starting the materialization, you might want to customize
+some properties; you can do that in the <em>Properties</em> tab of
+the opened component query:
+</p>
+<p>
+<div class="image" >
+<img src="images/open-cquery1.png" class=" "
+ style="width:90%" />
+<div class="caption">
+The properties tab
+</div>
+</div>
+</p>
+<p>
+You can add a property by pressing
+the <em>New</em> button.
+</p>
+<p>
+For instance, you can customize the path in your system where
+the git repository will be cloned, which defaults to
+<em>${user.home}/git/emf-components</em>); for instance, you can change it
+to something else
+</p>
+<p>
+<div class="image" >
+<img src="images/open-cquery-new-property1.png" class=" "
+ style="width:50%" />
+<div class="caption">
+Property customization
+</div>
+</div>
+</p>
+<a name="StartMaterialization"></a>
+<h3>Start Materialization</h3>
+<p>
+You can now press the button in the opened query <em>Resolve and Materialize</em>.
+This will start the materialization process which will consist of
+cloning the git repository, materialize the target platform and importing
+all the projects into the workspace.
+</p>
+<p>
+<div class="image" >
+<img src="images/resolving-cquery.png" class=" "
+ style="width:70%" />
+<div class="caption">
+Materialization...
+</div>
+</div>
+</p>
+<p>
+Materializing the target platform may take sometime (depending on your
+network connection), so you might want to go and get a coffee
+in the meantime ;)
+</p>
+<p>
+When the whole process terminates, you will have a working
+workspace with EMF Components projects and the needed target platform
+(thus, you should have no error!).
+</p>
+<p>
+<div class="image" >
+<img src="images/materialized.png" class=" "
+ style="width:90%" />
+<div class="caption">
+The final materialized workspace
+</div>
+</div>
+
+</p>
+</body>
+</html>
diff --git a/documentation/GettingSources.php b/documentation/GettingSources.php
deleted file mode 100644
index 95ce04e..0000000
--- a/documentation/GettingSources.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
- include("include.php");
- $pageTitle = "Getting Sources";
-
- $html = file_get_contents('GettingSources.html');
-
- $Nav->setLinkList(array());
-
- $App->AddExtraHtmlHeader('
- <script type="text/javascript">
- function init() {
- var docName = "GettingSources.html";
- initTocMenu(docName);
- highlightCurrentSection(docName);
- }
-
- function initTocMenu(ActiveSubTocElementId){
- var menu = document.getElementById("leftnav");
-
- var chapters = menu.children;
- addHideSubsectionFunction(chapters);
- var subToc = document.getElementById(\'subToc_\' + ActiveSubTocElementId);
- if(subToc) {
- subToc.style.display = "block";
- subToc.previousElementSibling.children[0].style.display = "none"
- subToc.previousElementSibling.children[1].style.display = "inline"
- }
- }
-
- function switchImages(chap) {
-
- }
-
- function addHideSubsectionFunction(items){
- for (var i = 0; i < items.length; i++) {
- if (items[i].firstElementChild != null && items[i].className == "separator"){
- if(items[i].firstElementChild.firstElementChild != null){
- items[i].firstElementChild.firstElementChild.onclick = function(){this.nextElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- items[i].firstElementChild.firstElementChild.nextElementSibling.onclick = function(){this.previousElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- }
- items[i].firstElementChild.style.cursor = "pointer";
- }
- }
- }
-
- function toc_toggle_subsections(chap){
- if ( chap.children[1].style.display != "none" ) {
- chap.children[1].style.display = "none"
- } else {
- chap.children[1].style.display = "block"
- }
- }
-
- function highlightCurrentSection(sec) {
- document.getElementById(sec).style.backgroundColor= "#D0D0D0"
- }
-
- if ( window.addEventListener ) {
- window.addEventListener( "load", init, false );
- }
- else if ( window.attachEvent ) {
- window.attachEvent( "onload", init );
- } else
- if ( window.onLoad ) {
- window.onload = init;
- }
- </script>');
-
- # Generate the web page
- $App->generatePage("Nova", $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
diff --git a/documentation/_index.html b/documentation/_index.html
deleted file mode 100644
index 08e8473..0000000
--- a/documentation/_index.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<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#reflectiveComponents.html" ><a href="01-Introduction.php#reflectiveComponents.php" >Reflective Components</a></li>
-<li id="01-Introduction.html#easyToCustomize.html" ><a href="01-Introduction.php#easyToCustomize.php" >Easy to Customize</a></li>
-<li id="01-Introduction.html#architecture.html" ><a href="01-Introduction.php#architecture.php" >Architecture</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 Components 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#Eclipse4ApplicationAndEMFComponents.html" ><a href="07-Eclipse4.php#Eclipse4ApplicationAndEMFComponents.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; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" />
-<a href="GettingSources.php">Getting Sources</a></div>
-<ul style="display: none;" id="subToc_GettingSources.html">
-<li id="GettingSources.html#InstallBuckminster.html" ><a href="GettingSources.php#InstallBuckminster.php" >Install Buckminster in the IDE</a></li>
-<li id="GettingSources.html#PrepareTP.html" ><a href="GettingSources.php#PrepareTP.php" >Prepare an empty target platform</a></li>
-<li id="GettingSources.html#MaterializeWP.html" ><a href="GettingSources.php#MaterializeWP.php" >Materialize the Workspace</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="samples.php">Xdoc Samples</a></div>
-<ul style="display: none;" id="subToc_samples.html">
-<li id="samples.html#Links.html" ><a href="samples.php#Links.php" >References</a></li>
-<li id="samples.html#CodeSections.html" ><a href="samples.php#CodeSections.php" >Code Sections</a></li>
-<li id="samples.html#Lists.html" ><a href="samples.php#Lists.php" >Lists and Tables</a></li>
-<li id="samples.html#Tables.html" ><a href="samples.php#Tables.php" >Tables</a></li>
-<li id="samples.html#TODO.html" ><a href="samples.php#TODO.php" >TODO</a></li>
-<li id="samples.html#Images.html" ><a href="samples.php#Images.php" >Images</a></li>
-</ul>
-</li>
-</ul>
-</div>
-<br style="clear:both;height:1em;">
diff --git a/documentation/book.css b/documentation/book.css
new file mode 100644
index 0000000..380c47f
--- /dev/null
+++ b/documentation/book.css
@@ -0,0 +1,215 @@
+H6.CaptionFigColumn {
+ display: block;
+ text-align: left;
+ text-indent: 0.000000pt;
+ margin-top: 3.000000pt;
+ margin-bottom: 11.000000pt;
+ margin-right: 0.000000pt;
+ margin-left: 0.000000pt;
+ font-size: 9.000000pt;
+ font-weight: medium;
+ font-style: Italic;
+ color: #000000;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+ font-family: "Arial";
+}
+
+P.Note {
+ display: block;
+ text-align: left;
+ text-indent: 0pt;
+ margin-top: 19.500000pt;
+ margin-bottom: 19.500000pt;
+ margin-right: 0.000000pt;
+ margin-left: 30pt;
+ font-size: 11.000000pt;
+ font-weight: medium;
+ font-style: Italic;
+ color: #000000;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+ font-family: "Arial";
+}
+
+EM.UILabel {
+ font-weight: Bold;
+ font-style: Regular;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+}
+
+.image {
+ text-align:center;
+}
+
+a.srcLink {
+ text-decoration: none;
+ color: #7f7f7f !important;
+}
+
+abbr {
+ border-bottom: 1px dotted;
+}
+
+EM.CodeName {
+ font-weight: Bold;
+ font-style: Regular;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+ font-family: "Courier New";
+}
+
+SPAN.NoWrap {
+ white-space: nowrap;
+}
+
+/* following font face declarations need to be removed for DBCS */
+body,h1,h2,h3,h4,h5,h6,p,table,td,caption,th,ul,ol,dl,li,dd,dt {
+ font-family: Arial, Helvetica, sans-serif;
+ color: #000000
+}
+
+pre {
+ font-family: Courier, monospace
+}
+
+/* end font face declarations */
+ /* following font size declarations should be OK for DBCS */
+body,h1,h2,h3,h4,h5,h6,p,table,td,caption,th,ul,ol,dl,li,dd,dt {
+ font-size: 10pt;
+}
+
+pre {
+ font-size: 10pt
+}
+
+h1 {
+ font-size: 18pt;
+ margin-top: 5;
+ margin-bottom: 1
+}
+
+h2 {
+ font-size: 14pt;
+ margin-top: 25;
+ margin-bottom: 3
+}
+
+h3 {
+ font-size: 11pt;
+ margin-top: 20;
+ margin-bottom: 3
+}
+
+h4 {
+ font-size: 10pt;
+ margin-top: 20;
+ margin-bottom: 3;
+ font-style: italic
+}
+
+p {
+ margin-top: 10px;
+ margin-bottom: 10px
+}
+
+pre {
+ margin-left: 6;
+ font-size: 9pt
+}
+
+a:hover {
+ color: #000080
+}
+
+a:visited {
+ text-decoration: underline
+}
+
+.image {
+ text-align:center;
+}
+
+a.jdoc {
+ border-bottom: .1em dotted;
+ text-decoration: none;
+ font-weight: normal;
+ color: #000000 !important;
+}
+
+a.srcLink {
+ text-decoration: none;
+ color: #7f7f7f !important;
+}
+
+abbr {
+ border-bottom: 1px dotted;
+}
+
+ul {
+ margin-top: 0;
+ margin-bottom: 10
+}
+
+li {
+ margin-top: 0;
+ margin-bottom: 0
+}
+
+li p {
+ margin-top: 0;
+ margin-bottom: 0
+}
+
+ol {
+ margin-top: 0;
+ margin-bottom: 10
+}
+
+dl {
+ margin-top: 0;
+ margin-bottom: 10
+}
+
+dt {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-weight: bold
+}
+
+dd {
+ margin-top: 0;
+ margin-bottom: 0
+}
+
+strong {
+ font-weight: bold
+}
+
+em {
+ font-style: italic
+}
+
+var {
+ font-style: italic
+}
+
+div.revision {
+ border-left-style: solid;
+ border-left-width: thin;
+ border-left-color: #7B68EE;
+ padding-left: 5
+}
+
+th {
+ font-weight: bold
+}
+
+xxtd{
+ border-top:2px solid black;
+}
diff --git a/documentation/code.css b/documentation/code.css
new file mode 100644
index 0000000..3792ec3
--- /dev/null
+++ b/documentation/code.css
@@ -0,0 +1,55 @@
+.literallayout .code {
+ display: block;
+ border: 1px solid gray;
+ margin: 1em;
+ padding: 1em;
+ background-color: #F0F0F0;
+ color: #000000 !important;
+ font-family: "Lucida Console", Monaco, monospace;
+ font-size: 12px;
+}
+
+.inlinecode{
+ padding-left: 3pt;
+ padding-right: 3pt;
+ font-size: 9.000000pt;
+ font-family: "Lucida Console", Monaco, monospace;
+ color: #000000 !important;
+}
+
+.keyword {
+ font-weight: bold;
+ color: #7F0055;
+}
+
+.string {
+ font-weight: normal !important;
+ color: #2A00FF;
+}
+
+.comment {
+ font-style: italic;
+ color: #3F7F5F;
+}
+
+.incode {
+ display: inline;
+}
+
+P.Code {
+ display: block;
+ text-align: left;
+ text-indent: 0.00pt;
+ margin-top: 0.000000pt;
+ margin-bottom: 0.000000pt;
+ margin-right: 0.000000pt;
+ margin-left: 15pt;
+ font-size: 9.000000pt;
+ font-weight: normal;
+ font-style: Regular;
+ color: #000000 !important;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+ font-family: "Lucida Console", Monaco, monospace;
+}
diff --git a/documentation/images/open-cquery-edit-property.png b/documentation/images/open-cquery-edit-property.png
new file mode 100644
index 0000000..a9abe95
--- /dev/null
+++ b/documentation/images/open-cquery-edit-property.png
Binary files differ
diff --git a/documentation/images/open-cquery-edit-property1.png b/documentation/images/open-cquery-edit-property1.png
new file mode 100644
index 0000000..4aa18e5
--- /dev/null
+++ b/documentation/images/open-cquery-edit-property1.png
Binary files differ
diff --git a/documentation/images/open-cquery-new-property.png b/documentation/images/open-cquery-new-property.png
new file mode 100644
index 0000000..f542f9f
--- /dev/null
+++ b/documentation/images/open-cquery-new-property.png
Binary files differ
diff --git a/documentation/include.php b/documentation/include.php
deleted file mode 100644
index be8283f..0000000
--- a/documentation/include.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-
- # Set the theme for your project's web pages.
- # See the Committer Tools "How Do I" for list of themes
- # https://dev.eclipse.org/committers/
- # Optional: defaults to system theme
- $theme = "Nova";
-
- # Define your project-wide Nav bars here.
- # Format is Link text, link URL (can be http://www.someothersite.com/), target (_self, _blank), level (1, 2 or 3)
- # these are optional
- # $Nav->setLinkList(array());
-
- $pageAuthor = "Lorenzo Bettini, Vincenzo Caselli, Francesco Guidieri";
- $pageTitle = "Emf Parsley Guide";
-
- $App->AddExtraHtmlHeader('<link rel="stylesheet" type="text/css" href="code.css"/>' . "\n\t");
- $App->AddExtraHtmlHeader('<link rel="stylesheet" type="text/css" href="book.css"/>' . "\n\t");
- $App->AddExtraHtmlHeader('<link rel="stylesheet" type="text/css" href="novaAddon.css"/>' . "\n\t");
-
- $App->Promotion = TRUE;
- ?>
diff --git a/documentation/index.php b/documentation/index.php
deleted file mode 100644
index 5cb3e0c..0000000
--- a/documentation/index.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
- include("include.php");
-
- $App->AddExtraHtmlHeader('
- <script type="text/javascript">
- function init() {
- var docName = "00-Main.html";
- initTocMenu(docName);
- highlightCurrentSection(docName);
- }
-
- function initTocMenu(ActiveSubTocElementId){
- var menu = document.getElementById("leftnav");
-
- var chapters = menu.children;
- addHideSubsectionFunction(chapters);
- var subToc = document.getElementById(\'subToc_\' + ActiveSubTocElementId);
- if(subToc) {
- subToc.style.display = "block";
- subToc.previousElementSibling.children[0].style.display = "none"
- subToc.previousElementSibling.children[1].style.display = "inline"
- }
- }
-
- function switchImages(chap) {
-
- }
-
- function addHideSubsectionFunction(items){
- for (var i = 0; i < items.length; i++) {
- if (items[i].firstElementChild != null && items[i].className == "separator"){
- if(items[i].firstElementChild.firstElementChild != null){
- items[i].firstElementChild.firstElementChild.onclick = function(){this.nextElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- items[i].firstElementChild.firstElementChild.nextElementSibling.onclick = function(){this.previousElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- }
- items[i].firstElementChild.style.cursor = "pointer";
- }
- }
- }
-
- function toc_toggle_subsections(chap){
- if ( chap.children[1].style.display != "none" ) {
- chap.children[1].style.display = "none"
- } else {
- chap.children[1].style.display = "block"
- }
- }
-
- function highlightCurrentSection(sec) {
- document.getElementById(sec).style.backgroundColor= "#D0D0D0"
- }
-
- if ( window.addEventListener ) {
- window.addEventListener( "load", init, false );
- }
- else if ( window.attachEvent ) {
- window.attachEvent( "onload", init );
- } else
- if ( window.onLoad ) {
- window.onload = init;
- }
- </script>');
-
- $pageTitle = "Emf Parsley Guide";
-
- $html .= file_get_contents('_index.html');
-
- # Generate the web page
- $App->generatePage("Nova", $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
diff --git a/documentation/samples.html b/documentation/samples.html
index 632316d..561c315 100644
--- a/documentation/samples.html
+++ b/documentation/samples.html
@@ -1,245 +1,125 @@
-<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#reflectiveComponents.html" ><a href="01-Introduction.php#reflectiveComponents.php" >Reflective Components</a></li>
- <li id="01-Introduction.html#easyToCustomize.html" ><a href="01-Introduction.php#easyToCustomize.php" >Easy to Customize</a></li>
- <li id="01-Introduction.html#architecture.html" ><a href="01-Introduction.php#architecture.php" >Architecture</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 Components 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#Eclipse4ApplicationAndEMFComponents.html" ><a href="07-Eclipse4.php#Eclipse4ApplicationAndEMFComponents.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; " /><img src="triangle-90.gif" style="display:none; margin-right: 2px" height="12px" />
- <a href="GettingSources.php">Getting Sources</a></div>
- <ul style="display: none;" id="subToc_GettingSources.html">
- <li id="GettingSources.html#InstallBuckminster.html" ><a href="GettingSources.php#InstallBuckminster.php" >Install Buckminster in the IDE</a></li>
- <li id="GettingSources.html#PrepareTP.html" ><a href="GettingSources.php#PrepareTP.php" >Prepare an empty target platform</a></li>
- <li id="GettingSources.html#MaterializeWP.html" ><a href="GettingSources.php#MaterializeWP.php" >Materialize the Workspace</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="samples.php">Xdoc Samples</a></div>
- <ul style="display: none;" id="subToc_samples.html">
- <li id="samples.html#Links.html" ><a href="samples.php#Links.php" >References</a></li>
- <li id="samples.html#CodeSections.html" ><a href="samples.php#CodeSections.php" >Code Sections</a></li>
- <li id="samples.html#Lists.html" ><a href="samples.php#Lists.php" >Lists and Tables</a></li>
- <li id="samples.html#Tables.html" ><a href="samples.php#Tables.php" >Tables</a></li>
- <li id="samples.html#TODO.html" ><a href="samples.php#TODO.php" >TODO</a></li>
- <li id="samples.html#Images.html" ><a href="samples.php#Images.php" >Images</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div id="midcolumn">
- <a name="samples" ></a>
- <h1>Xdoc Samples</h1>
- <div class="toc">
- <ul>
- <li><a href="samples.php#Links.php" >References</a></li>
- <li><a href="samples.php#CodeSections.php" >Code Sections</a></li>
- <li><a href="samples.php#Lists.php" >Lists and Tables</a></li>
- <li><a href="samples.php#Tables.php" >Tables</a></li>
- <li><a href="samples.php#TODO.php" >TODO</a></li>
- <li><a href="samples.php#Images.php" >Images</a></li>
- </ul>
- </div>
-
- <p>
- This is text for the introduction. You can <em>emphasize</em> elements and create multiple
- paragraphs by adding a newline, like this. As you can see we also have splel checking
- with corrections.
- </p>
- <p>
- In the following the different syntactical elements are explained by example.
- </p>
- <a name="Links" ></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>References</h1>
- <p>
- The following is an <a href="http://www.google.com" >external link</a>
- and if you want to refer internally you can <a href="01-Introduction.php" title="Go to "Introduction"">do so as well</a>.You can even
- refer to Java code like this : <a class="jdoc" href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="java.lang.String">String</abbr></a>.
- </p>
- <a name="CodeSections" ></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>Code Sections</h1>
- <p>
- A code section looks like this:
- </p>
- <p>
- <div class="literallayout">
- <div class="incode">
- <p class="code">
- <span class="keyword">class</span> HelloWorld {
- <br/>
- <span class="keyword">public</span> <span class="keyword">void</span> sayHello(String name) {
- <br/>
- System.out.println(<span class="string">"Hello "</span>+name);
- <br/>
- }
- <br/>
- }
- </p>
- </div>
- </div>
- </p>
- <p>
- Note how the code is highlighted according to the language you choose.
- It is even possible to have different language configurations to get different coloring.
- </p>
- <a name="Lists" ></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>Lists and Tables</h1>
- <p>
- Lists are very similar to HTML.
- We've got ordered lists:
-
- <ol>
- <li>First</li>
- <li>Second</li>
- <li>Third</li>
- </ol>
- </p>
- <p>
- and unordered lists:
- </p>
- <p>
- <ul>
- <li>Foo</li>
- <li>Bar</li>
- <li>Baz</li>
- </ul>
- </p>
- <a name="Tables" ></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>Tables</h1>
- <p>
- <table>
- <tr>
- <td>This is a table cell</td>
- <td>and another one</td>
- </tr>
- <tr>
- <td>table rows can contain many cells</td>
- <td>but each row has to contain the same number of cells</td>
- </tr>
- </table>
- </p>
- <a name="TODO" ></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>TODO</h1>
- <p>
- <div class="todo" >
- document todo elements
- </div>
- </p>
- <a name="Images" ></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>Images</h1>
- <p>
- Images are not fully supported by the new Xtend generator,
- but will of course be readded soon :-)
- </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 = 'samples';
- var disqus_url = documentationRoot+'samples.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;">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
+<title>Xdoc Samples</title>
+
+<link href="book.css" rel="stylesheet" type="text/css">
+<link href="code.css" rel="stylesheet" type="text/css">
+<link rel="home" href="xtext.html" title="">
+</head>
+<body>
+<a name="samples"></a>
+<h1>Xdoc Samples</h1>
+<p>
+This is text for the introduction. You can <em>emphasize</em> elements and create multiple
+paragraphs by adding a newline, like this. As you can see we also have splel checking
+with corrections.
+</p>
+<p>
+In the following the different syntactical elements are explained by example.
+</p>
+<a name="Links"></a>
+<h2>References</h2>
+<p>
+The following is an <a href="http://www.google.com">external link</a>
+and if you want to refer internally you can <a href="01-Introduction.html#Introduction" title="Go to "Introduction"">do so as well</a>.You can even
+refer to Java code like this : <a class="jdoc" href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="View JavaDoc"><abbr title="java.lang.String" >String</abbr></a>.
+</p>
+<a name="CodeSections"></a>
+<h2>Code Sections</h2>
+<p>
+A code section looks like this:
+</p>
+<p>
+<div class="literallayout">
+<div class="incode">
+<p class="code">
+ <span class="keyword">class</span> HelloWorld {
+<br/>
+ <span class="keyword">public</span> <span class="keyword">void</span> sayHello(String name) {
+<br/>
+System.out.println(<span class="string">"Hello "</span>+name);
+<br/>
+ }
+<br/>
+ }
+<br/>
+</p>
+</div>
+</div>
+</p>
+<p>
+Note how the code is highlighted according to the language you choose.
+It is even possible to have different language configurations to get different coloring.
+</p>
+<a name="Lists"></a>
+<h2>Lists and Tables</h2>
+<p>
+Lists are very similar to HTML.
+We've got ordered lists:
+
+<ol>
+ <li>
+ First
+ </li>
+ <li>
+ Second
+ </li>
+ <li>
+ Third
+ </li>
+</ol>
+</p>
+<p>
+and unordered lists:
+</p>
+<p>
+<ul>
+ <li>
+ Foo
+ </li>
+ <li>
+ Bar
+ </li>
+ <li>
+ Baz
+ </li>
+</ul>
+</p>
+<a name="Tables"></a>
+<h2>Tables</h2>
+<p>
+<table>
+<tr>
+<td>
+This is a table cell
+</td>
+<td>
+and another one
+</td>
+</tr>
+<tr>
+<td>
+table rows can contain many cells
+</td>
+<td>
+but each row has to contain the same number of cells
+</td>
+</tr>
+</table>
+</p>
+<a name="TODO"></a>
+<h2>TODO</h2>
+<p>
+<div class="todo" >
+document todo elements
+</div>
+</p>
+<a name="Images"></a>
+<h2>Images</h2>
+<p>
+Images are not fully supported by the new Xtend generator,
+but will of course be readded soon :-)
+</p>
+</body>
+</html>
diff --git a/documentation/samples.php b/documentation/samples.php
deleted file mode 100644
index baf37f2..0000000
--- a/documentation/samples.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
- include("include.php");
- $pageTitle = "Xdoc Samples";
-
- $html = file_get_contents('samples.html');
-
- $Nav->setLinkList(array());
-
- $App->AddExtraHtmlHeader('
- <script type="text/javascript">
- function init() {
- var docName = "samples.html";
- initTocMenu(docName);
- highlightCurrentSection(docName);
- }
-
- function initTocMenu(ActiveSubTocElementId){
- var menu = document.getElementById("leftnav");
-
- var chapters = menu.children;
- addHideSubsectionFunction(chapters);
- var subToc = document.getElementById(\'subToc_\' + ActiveSubTocElementId);
- if(subToc) {
- subToc.style.display = "block";
- subToc.previousElementSibling.children[0].style.display = "none"
- subToc.previousElementSibling.children[1].style.display = "inline"
- }
- }
-
- function switchImages(chap) {
-
- }
-
- function addHideSubsectionFunction(items){
- for (var i = 0; i < items.length; i++) {
- if (items[i].firstElementChild != null && items[i].className == "separator"){
- if(items[i].firstElementChild.firstElementChild != null){
- items[i].firstElementChild.firstElementChild.onclick = function(){this.nextElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- items[i].firstElementChild.firstElementChild.nextElementSibling.onclick = function(){this.previousElementSibling.style.display="inline";this.style.display = "none"; toc_toggle_subsections(this.parentNode.parentNode);};
- }
- items[i].firstElementChild.style.cursor = "pointer";
- }
- }
- }
-
- function toc_toggle_subsections(chap){
- if ( chap.children[1].style.display != "none" ) {
- chap.children[1].style.display = "none"
- } else {
- chap.children[1].style.display = "block"
- }
- }
-
- function highlightCurrentSection(sec) {
- document.getElementById(sec).style.backgroundColor= "#D0D0D0"
- }
-
- if ( window.addEventListener ) {
- window.addEventListener( "load", init, false );
- }
- else if ( window.attachEvent ) {
- window.attachEvent( "onload", init );
- } else
- if ( window.onLoad ) {
- window.onload = init;
- }
- </script>');
-
- # Generate the web page
- $App->generatePage("Nova", $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
diff --git a/documentation/toc.xml b/documentation/toc.xml
new file mode 100644
index 0000000..2ec5ece
--- /dev/null
+++ b/documentation/toc.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<toc topic="contents/00-Main.html" label="Emf Parsley Guide" >
+ <topic href="contents/00-Main_4.html#Emf%20Parsley%20Guide_4" label="Documentation" >
+ <topic href="contents/01-Introduction.html#Introduction" label="Introduction" >
+ <topic href="contents/01-Introduction.html#reflectiveComponents" label="Reflective Components" >
+ </topic>
+ <topic href="contents/01-Introduction.html#easyToCustomize" label="Easy to Customize" >
+ </topic>
+ <topic href="contents/01-Introduction.html#architecture" label="Architecture" >
+ </topic>
+ </topic>
+ <topic href="contents/02-GettingStarted.html#GettingStarted" label="Getting Started" >
+ <topic href="contents/02-GettingStarted.html#Installation" label="Installation" >
+ </topic>
+ <topic href="contents/02-GettingStarted.html#FirstExample" label="First Example" >
+ </topic>
+ <topic href="contents/02-GettingStarted.html#RCPMail" label="RCP Mail Example" >
+ </topic>
+ </topic>
+ <topic href="contents/03-Components.html#Components" label="Components" >
+ <topic href="contents/03-Components.html#FormComponent" label="Form Component" >
+ <topic href="contents/03-Components.html#Form_Customizations" label="Form Customizations" >
+ </topic>
+ </topic>
+ <topic href="contents/03-Components.html#TreeComponent" label="Tree Component" >
+ <topic href="contents/03-Components.html#Tree_Customizations" label="Tree Customizations" >
+ </topic>
+ </topic>
+ <topic href="contents/03-Components.html#TreeFormComponent" label="Tree Form Component" >
+ <topic href="contents/03-Components.html#TreeForm_Customizations" label="Tree Form Customization" >
+ </topic>
+ </topic>
+ <topic href="contents/03-Components.html#TableComponent" label="Table Component" >
+ </topic>
+ </topic>
+ <topic href="contents/04-Customization.html#Customization" label="Customization" >
+ <topic href="contents/04-Customization.html#ResourceManagers" label="Managing Resources" >
+ <topic href="contents/04-Customization.html#ResourceLoader" label="Resource Loader" >
+ </topic>
+ <topic href="contents/04-Customization.html#EmptyResourceInitializer" label="Empty Resource Initializer" >
+ </topic>
+ <topic href="contents/04-Customization.html#EditingDomainFinder" label="Editing Domain Finder" >
+ </topic>
+ <topic href="contents/04-Customization.html#ResourceSaveManager" label="Resource Save Manager" >
+ <topic href="contents/04-Customization.html#ValidateResourceSaveManager" label="Validate Resource Save Manager" >
+ </topic>
+ </topic>
+ </topic>
+ <topic href="contents/04-Customization.html#Providers" label="Providers" >
+ <topic href="contents/04-Customization.html#FeaturesProvider" label="Features Provider" >
+ <topic href="contents/04-Customization.html#FeatureProvider1" label="Prima versione" >
+ </topic>
+ <topic href="contents/04-Customization.html#FeatureProvider2" label="Seconda versione" >
+ </topic>
+ <topic href="contents/04-Customization.html#FeaturesColumnProvider" label="Features Column Provider" >
+ </topic>
+ </topic>
+ <topic href="contents/04-Customization.html#PropertyDescriptionProvider" label="Property Description Provider" >
+ <topic href="contents/04-Customization.html#FormPropertyDescriptionProvider" label="Form Property Description Provider" >
+ </topic>
+ </topic>
+ <topic href="contents/04-Customization.html#ViewerLabelProvider" label="Viewer Label Provider" >
+ </topic>
+ <topic href="contents/04-Customization.html#ViewerContentProvider" label="Viewer Content Provider" >
+ </topic>
+ <topic href="contents/04-Customization.html#ProposalProvider" label="Proposal Provider" >
+ </topic>
+ <topic href="contents/04-Customization.html#ViewerContextMenuFactory" label="Viewer Context Menu Factory" >
+ </topic>
+ <topic href="contents/04-Customization.html#TableColumnLabelProvider" label="Table Column Label Provider" >
+ </topic>
+ </topic>
+ <topic href="contents/04-Customization.html#SelectionAndMenu" label="Selection And Menu" >
+ <topic href="contents/04-Customization.html#EmfSelectionHelper" label="Emf Selection Helper" >
+ </topic>
+ </topic>
+ <topic href="contents/04-Customization.html#Builders" label="Builders" >
+ <topic href="contents/04-Customization.html#TableViewerBuilder" label="Table Viewer Builder" >
+ </topic>
+ <topic href="contents/04-Customization.html#TableViewerColumnBuilder" label="Table Viewer Column Builder" >
+ <topic href="contents/04-Customization.html#TableViewerEditableColumnBuilder" label="Table Viewer Editable Column Builder" >
+ </topic>
+ </topic>
+ </topic>
+ <topic href="contents/04-Customization.html#Factories" label="Factories" >
+ <topic href="contents/04-Customization.html#FormFactory" label="Form Factory" >
+ </topic>
+ <topic href="contents/04-Customization.html#JfaceProviderFactory" label="Jface Provider Factory" >
+ </topic>
+ <topic href="contents/04-Customization.html#FormControlFactory" label="Form Control Factory" >
+ </topic>
+ <topic href="contents/04-Customization.html#TreeFormFactory" label="Tree Form Factory" >
+ </topic>
+ <topic href="contents/04-Customization.html#ViewerFactory" label="Viewer Factory" >
+ </topic>
+ <topic href="contents/04-Customization.html#AdapterFactoryEditingDomain" label="Viewer Factory" >
+ </topic>
+ </topic>
+ <topic href="contents/04-Customization.html#Viewers" label="Viewers" >
+ <topic href="contents/04-Customization.html#ViewerInitializer" label="Viewer Initializer" >
+ </topic>
+ </topic>
+ </topic>
+ <topic href="contents/05-DSL.html#DSL" label="EMF Components DSL" >
+ <topic href="contents/05-DSL.html#xbase" label="Xbase features" >
+ </topic>
+ </topic>
+ <topic href="contents/06-AdvancedComponents.html#AdvancedComponents" label="Advanced Components" >
+ </topic>
+ <topic href="contents/07-Eclipse4.html#Eclipse4" label="Eclipse 4" >
+ <topic href="contents/07-Eclipse4.html#GetFirstExample" label="First Example Setup" >
+ </topic>
+ <topic href="contents/07-Eclipse4.html#PrepareForEclipse4Application" label="Preparing for a pure Eclipse 4 Application" >
+ </topic>
+ <topic href="contents/07-Eclipse4.html#CreateEclipse4Application" label="Create an Eclipse 4 Application" >
+ </topic>
+ <topic href="contents/07-Eclipse4.html#Eclipse4ApplicationAndEMFComponents" label="Using an EMF Parsley TreeComposite into an Eclipse 4 Part" >
+ </topic>
+ <topic href="contents/07-Eclipse4.html#Eclipse4Save" label="Adding the dirty state and Save command" >
+ </topic>
+ </topic>
+ </topic>
+ <topic href="contents/00-Main_5.html#Emf%20Parsley%20Guide_5" label="Appendix" >
+ <topic href="contents/GettingSources.html#GettingSources" label="Getting Sources" >
+ <topic href="contents/GettingSources.html#InstallBuckminster" label="Install Buckminster in the IDE" >
+ </topic>
+ <topic href="contents/GettingSources.html#PrepareTP" label="Prepare an empty target platform" >
+ </topic>
+ <topic href="contents/GettingSources.html#MaterializeWP" label="Materialize the Workspace" >
+ <topic href="contents/GettingSources.html#CustomizeProperties" label="(Optional) Customize some Properties" >
+ </topic>
+ <topic href="contents/GettingSources.html#StartMaterialization" label="Start Materialization" >
+ </topic>
+ </topic>
+ </topic>
+ <topic href="contents/samples.html#samples" label="Xdoc Samples" >
+ <topic href="contents/samples.html#Links" label="References" >
+ </topic>
+ <topic href="contents/samples.html#CodeSections" label="Code Sections" >
+ </topic>
+ <topic href="contents/samples.html#Lists" label="Lists and Tables" >
+ </topic>
+ <topic href="contents/samples.html#Tables" label="Tables" >
+ </topic>
+ <topic href="contents/samples.html#TODO" label="TODO" >
+ </topic>
+ <topic href="contents/samples.html#Images" label="Images" >
+ </topic>
+ </topic>
+ </topic>
+</toc>