Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Daussy2014-05-13 13:03:15 +0000
committerAxel Richard2014-06-20 12:10:26 +0000
commite6783520df4f1dda654e04c596d04aaea23f7391 (patch)
tree03b80b9ee7dd504b94638a521d6184ee0f1f7550 /tutorial
parent2924be927140db69c5ae4306b23c39d7244e7e14 (diff)
downloadorg.eclipse.emf.compare-e6783520df4f1dda654e04c596d04aaea23f7391.tar.gz
org.eclipse.emf.compare-e6783520df4f1dda654e04c596d04aaea23f7391.tar.xz
org.eclipse.emf.compare-e6783520df4f1dda654e04c596d04aaea23f7391.zip
EMF Compare tutorial: EXTlibrary plugins
Resources needed for the tutorial Change-Id: Ifa35b0269ae0974e4b175c11e6bb4336ae31a729 Signed-off-by: Arthur Daussy <arthur.daussy@obeo.fr>
Diffstat (limited to 'tutorial')
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/.classpath7
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/.project28
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/META-INF/MANIFEST.MF16
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/about.html28
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/build.properties9
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_borrowers_Borrower.gifbin0 -> 223 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_branches_Library.gifbin0 -> 223 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_employees_Employee.gifbin0 -> 223 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_stock_Book.gifbin0 -> 223 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_stock_BookOnTape.gifbin0 -> 223 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_stock_VideoCassette.gifbin0 -> 223 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_writers_Writer.gifbin0 -> 223 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Book.gifbin0 -> 583 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/BookOnTape.gifbin0 -> 129 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Borrower.gifbin0 -> 129 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/CirculatingItem.gifbin0 -> 129 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Employee.gifbin0 -> 537 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Library.gifbin0 -> 582 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Person.gifbin0 -> 129 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/VideoCassette.gifbin0 -> 129 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Writer.gifbin0 -> 324 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/plugin.properties79
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/plugin.xml18
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/AudioVisualItemItemProvider.java197
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookItemProvider.java233
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookOnTapeItemProvider.java175
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BorrowerItemProvider.java151
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/CirculatingItemItemProvider.java185
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryEditPlugin.java103
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryItemProviderAdapterFactory.java394
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EmployeeItemProvider.java151
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/ItemItemProvider.java164
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/LibraryItemProvider.java304
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PeriodicalItemProvider.java172
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PersonItemProvider.java224
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/VideoCassetteItemProvider.java151
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/WriterItemProvider.java183
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/.classpath7
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/.project28
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/META-INF/MANIFEST.MF21
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/about.html28
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/build.properties9
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/icons/full/obj16/EXTLibraryModelFile.gifbin0 -> 346 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/icons/full/wizban/NewEXTLibrary.gifbin0 -> 2462 bytes
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/plugin.properties63
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/plugin.xml32
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/AddLibraryCommand.java78
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/CreateLibraryAction.java55
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/EXTLibraryExtendedActionBarContributor.java114
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/ExtendedDeleteAction.java96
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/RemoveLibraryCommand.java81
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryActionBarContributor.java446
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryEditor.java1877
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryEditorPlugin.java107
-rw-r--r--tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryModelWizard.java658
-rw-r--r--tutorial/org.eclipse.emf.examples.library/.classpath7
-rw-r--r--tutorial/org.eclipse.emf.examples.library/.project28
-rw-r--r--tutorial/org.eclipse.emf.examples.library/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tutorial/org.eclipse.emf.examples.library/META-INF/MANIFEST.MF17
-rw-r--r--tutorial/org.eclipse.emf.examples.library/about.html28
-rw-r--r--tutorial/org.eclipse.emf.examples.library/build.properties9
-rw-r--r--tutorial/org.eclipse.emf.examples.library/model/extlibrary.ecore107
-rw-r--r--tutorial/org.eclipse.emf.examples.library/model/extlibrary.genmodel77
-rw-r--r--tutorial/org.eclipse.emf.examples.library/plugin.properties17
-rw-r--r--tutorial/org.eclipse.emf.examples.library/plugin.xml19
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Addressable.java57
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/AudioVisualItem.java100
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Book.java156
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/BookCategory.java238
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/BookOnTape.java77
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Borrower.java49
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/CirculatingItem.java27
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/EXTLibraryFactory.java116
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/EXTLibraryPackage.java1971
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Employee.java54
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Item.java59
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Lendable.java74
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Library.java181
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Periodical.java77
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Person.java77
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/VideoCassette.java47
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Writer.java72
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/AudioVisualItemImpl.java295
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BookImpl.java452
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BookOnTapeImpl.java240
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BorrowerImpl.java185
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/CirculatingItemImpl.java295
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/EXTLibraryFactoryImpl.java252
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/EXTLibraryPackageImpl.java921
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/EmployeeImpl.java175
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/ItemImpl.java185
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/LibraryImpl.java661
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/PeriodicalImpl.java237
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/PersonImpl.java295
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/VideoCassetteImpl.java148
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/WriterImpl.java271
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibraryAdapterFactory.java383
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibraryResourceFactoryImpl.java41
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibraryResourceImpl.java36
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibrarySwitch.java437
102 files changed, 15943 insertions, 0 deletions
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/.classpath b/tutorial/org.eclipse.emf.examples.library.edit/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/.project b/tutorial/org.eclipse.emf.examples.library.edit/.project
new file mode 100644
index 000000000..bf5b0812e
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.examples.library.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/.settings/org.eclipse.jdt.core.prefs b/tutorial/org.eclipse.emf.examples.library.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..d29b0f382
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Wed Nov 08 10:51:59 EST 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/META-INF/MANIFEST.MF b/tutorial/org.eclipse.emf.examples.library.edit/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..e43579072
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.examples.library.edit;singleton:=true
+Bundle-Version: 2.5.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.emf.examples.extlibrary.provider.EXTLibraryEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.emf.examples.extlibrary.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.examples.library;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport
+Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/about.html b/tutorial/org.eclipse.emf.examples.library.edit/about.html
new file mode 100644
index 000000000..1b8f94080
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/build.properties b/tutorial/org.eclipse.emf.examples.library.edit/build.properties
new file mode 100644
index 000000000..ca45351e6
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/build.properties
@@ -0,0 +1,9 @@
+bin.includes = icons/,\
+ .,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+source.. = src/
+output.. = bin/
+src.includes = about.html
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_borrowers_Borrower.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_borrowers_Borrower.gif
new file mode 100644
index 000000000..6b4e4321e
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_borrowers_Borrower.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_branches_Library.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_branches_Library.gif
new file mode 100644
index 000000000..883ce93b4
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_branches_Library.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_employees_Employee.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_employees_Employee.gif
new file mode 100644
index 000000000..5b7808087
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_employees_Employee.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_stock_Book.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_stock_Book.gif
new file mode 100644
index 000000000..9073955a8
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_stock_Book.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_stock_BookOnTape.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_stock_BookOnTape.gif
new file mode 100644
index 000000000..5d5000a7f
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_stock_BookOnTape.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_stock_VideoCassette.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_stock_VideoCassette.gif
new file mode 100644
index 000000000..cca8aec82
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_stock_VideoCassette.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_writers_Writer.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_writers_Writer.gif
new file mode 100644
index 000000000..564bdbd77
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/ctool16/CreateLibrary_writers_Writer.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Book.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Book.gif
new file mode 100644
index 000000000..9e665d5c7
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Book.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/BookOnTape.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/BookOnTape.gif
new file mode 100644
index 000000000..cb1755a71
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/BookOnTape.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Borrower.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Borrower.gif
new file mode 100644
index 000000000..10d222998
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Borrower.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/CirculatingItem.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/CirculatingItem.gif
new file mode 100644
index 000000000..c3370c7dd
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/CirculatingItem.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Employee.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Employee.gif
new file mode 100644
index 000000000..18ba1f1d8
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Employee.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Library.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Library.gif
new file mode 100644
index 000000000..4472e8ce5
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Library.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Person.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Person.gif
new file mode 100644
index 000000000..ea58a657d
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Person.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/VideoCassette.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/VideoCassette.gif
new file mode 100644
index 000000000..9250fecbf
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/VideoCassette.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Writer.gif b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Writer.gif
new file mode 100644
index 000000000..4a7e2021c
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/icons/full/obj16/Writer.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/plugin.properties b/tutorial/org.eclipse.emf.examples.library.edit/plugin.properties
new file mode 100644
index 000000000..e0c1c64d0
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/plugin.properties
@@ -0,0 +1,79 @@
+# /**
+# * Copyright (c) 2002-2008 IBM Corporation and others.
+# * All rights reserved. This program and the accompanying materials
+# * are made available under the terms of the Eclipse Public License v1.0
+# * which accompanies this distribution, and is available at
+# * http://www.eclipse.org/legal/epl-v10.html
+# *
+# * Contributors:
+# * IBM - Initial API and implementation
+# */
+
+# NLS_MESSAGEFORMAT_VAR
+
+pluginName = EMF Extended Library Edit Example
+providerName = Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_Book_type = Book
+_UI_Library_type = Library
+_UI_Writer_type = Writer
+_UI_Item_type = Item
+_UI_Lendable_type = Lendable
+_UI_CirculatingItem_type = Circulating Item
+_UI_Periodical_type = Periodical
+_UI_AudioVisualItem_type = Audio Visual Item
+_UI_BookOnTape_type = Book On Tape
+_UI_VideoCassette_type = Video Cassette
+_UI_Borrower_type = Borrower
+_UI_Person_type = Person
+_UI_Employee_type = Employee
+_UI_Addressable_type = Addressable
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_Book_title_feature = Title
+_UI_Book_pages_feature = Pages
+_UI_Book_category_feature = Category
+_UI_Book_author_feature = Author
+_UI_Library_name_feature = Name
+_UI_Library_writers_feature = Writers
+_UI_Library_employees_feature = Employees
+_UI_Library_borrowers_feature = Borrowers
+_UI_Library_stock_feature = Stock
+_UI_Library_books_feature = Books
+_UI_Library_branches_feature = Branches
+_UI_Library_parentBranch_feature = Parent Branch
+_UI_Library_people_feature = People
+_UI_Writer_name_feature = Name
+_UI_Writer_books_feature = Books
+_UI_Item_publicationDate_feature = Publication Date
+_UI_Lendable_copies_feature = Copies
+_UI_Lendable_borrowers_feature = Borrowers
+_UI_Periodical_title_feature = Title
+_UI_Periodical_issuesPerYear_feature = Issues Per Year
+_UI_AudioVisualItem_title_feature = Title
+_UI_AudioVisualItem_minutesLength_feature = Minutes Length
+_UI_AudioVisualItem_damaged_feature = Damaged
+_UI_BookOnTape_reader_feature = Reader
+_UI_BookOnTape_author_feature = Author
+_UI_VideoCassette_cast_feature = Cast
+_UI_Borrower_borrowed_feature = Borrowed
+_UI_Person_firstName_feature = First Name
+_UI_Person_lastName_feature = Last Name
+_UI_Employee_manager_feature = Manager
+_UI_Addressable_address_feature = Address
+_UI_Unknown_feature = Unspecified
+
+_UI_BookCategory_Mystery_literal = Mystery
+_UI_BookCategory_ScienceFiction_literal = ScienceFiction
+_UI_BookCategory_Biography_literal = Biography
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/plugin.xml b/tutorial/org.eclipse.emf.examples.library.edit/plugin.xml
new file mode 100644
index 000000000..1fdd258c0
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/plugin.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0"
+ class="org.eclipse.emf.examples.extlibrary.provider.EXTLibraryItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+</plugin>
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/AudioVisualItemItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/AudioVisualItemItemProvider.java
new file mode 100644
index 000000000..997863400
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/AudioVisualItemItemProvider.java
@@ -0,0 +1,197 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.emf.examples.extlibrary.AudioVisualItem;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.AudioVisualItem} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AudioVisualItemItemProvider
+ extends CirculatingItemItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AudioVisualItemItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addTitlePropertyDescriptor(object);
+ addMinutesLengthPropertyDescriptor(object);
+ addDamagedPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Title feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTitlePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AudioVisualItem_title_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_title_feature", "_UI_AudioVisualItem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__TITLE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Minutes Length feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addMinutesLengthPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AudioVisualItem_minutesLength_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_minutesLength_feature", "_UI_AudioVisualItem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__MINUTES_LENGTH,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Damaged feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDamagedPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AudioVisualItem_damaged_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_damaged_feature", "_UI_AudioVisualItem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__DAMAGED,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((AudioVisualItem)object).getTitle();
+ return label == null || label.length() == 0 ?
+ getString("_UI_AudioVisualItem_type") : //$NON-NLS-1$
+ getString("_UI_AudioVisualItem_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(AudioVisualItem.class)) {
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__TITLE:
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH:
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookItemProvider.java
new file mode 100644
index 000000000..0d793b743
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookItemProvider.java
@@ -0,0 +1,233 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.emf.examples.extlibrary.Book;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Book} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class BookItemProvider
+ extends CirculatingItemItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BookItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addTitlePropertyDescriptor(object);
+ addPagesPropertyDescriptor(object);
+ addCategoryPropertyDescriptor(object);
+ addAuthorPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Title feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTitlePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Book_title_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Book_title_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.BOOK__TITLE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Pages feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPagesPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Book_pages_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Book_pages_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.BOOK__PAGES,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Category feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCategoryPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Book_category_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Book_category_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.BOOK__CATEGORY,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Author feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAuthorPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Book_author_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Book_author_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.BOOK__AUTHOR,
+ true,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Book.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Book")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Book)object).getTitle();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Book_type") : //$NON-NLS-1$
+ getString("_UI_Book_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Book.class)) {
+ case EXTLibraryPackage.BOOK__TITLE:
+ case EXTLibraryPackage.BOOK__PAGES:
+ case EXTLibraryPackage.BOOK__CATEGORY:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookOnTapeItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookOnTapeItemProvider.java
new file mode 100644
index 000000000..710725d87
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookOnTapeItemProvider.java
@@ -0,0 +1,175 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.emf.examples.extlibrary.BookOnTape;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.BookOnTape} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class BookOnTapeItemProvider
+ extends AudioVisualItemItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BookOnTapeItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addReaderPropertyDescriptor(object);
+ addAuthorPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Reader feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addReaderPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_BookOnTape_reader_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_BookOnTape_reader_feature", "_UI_BookOnTape_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.BOOK_ON_TAPE__READER,
+ true,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Author feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAuthorPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_BookOnTape_author_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_BookOnTape_author_feature", "_UI_BookOnTape_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.BOOK_ON_TAPE__AUTHOR,
+ true,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns BookOnTape.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/BookOnTape")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((BookOnTape)object).getTitle();
+ return label == null || label.length() == 0 ?
+ getString("_UI_BookOnTape_type") : //$NON-NLS-1$
+ getString("_UI_BookOnTape_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BorrowerItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BorrowerItemProvider.java
new file mode 100644
index 000000000..6ad9f7bfe
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BorrowerItemProvider.java
@@ -0,0 +1,151 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.emf.examples.extlibrary.Borrower;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Borrower} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class BorrowerItemProvider
+ extends PersonItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BorrowerItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBorrowedPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Borrowed feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addBorrowedPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Borrower_borrowed_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Borrower_borrowed_feature", "_UI_Borrower_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.BORROWER__BORROWED,
+ true,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Borrower.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Borrower")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Borrower)object).getLastName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Borrower_type") : //$NON-NLS-1$
+ getString("_UI_Borrower_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/CirculatingItemItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/CirculatingItemItemProvider.java
new file mode 100644
index 000000000..8ce5617c0
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/CirculatingItemItemProvider.java
@@ -0,0 +1,185 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.emf.examples.extlibrary.CirculatingItem;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.CirculatingItem} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CirculatingItemItemProvider
+ extends ItemItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CirculatingItemItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addCopiesPropertyDescriptor(object);
+ addBorrowersPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Copies feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCopiesPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Lendable_copies_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Lendable_copies_feature", "_UI_Lendable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.LENDABLE__COPIES,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Borrowers feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addBorrowersPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Lendable_borrowers_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Lendable_borrowers_feature", "_UI_Lendable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.LENDABLE__BORROWERS,
+ true,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns CirculatingItem.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/CirculatingItem")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ Date labelValue = ((CirculatingItem)object).getPublicationDate();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ?
+ getString("_UI_CirculatingItem_type") : //$NON-NLS-1$
+ getString("_UI_CirculatingItem_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(CirculatingItem.class)) {
+ case EXTLibraryPackage.CIRCULATING_ITEM__COPIES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryEditPlugin.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryEditPlugin.java
new file mode 100644
index 000000000..5391de37b
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryEditPlugin.java
@@ -0,0 +1,103 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the EXTLibrary edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class EXTLibraryEditPlugin extends EMFPlugin
+{
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EXTLibraryEditPlugin INSTANCE = new EXTLibraryEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibraryEditPlugin()
+ {
+ super
+ (new ResourceLocator [] {
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator()
+ {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin()
+ {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin
+ {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation()
+ {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryItemProviderAdapterFactory.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryItemProviderAdapterFactory.java
new file mode 100644
index 000000000..1a4b5a55a
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryItemProviderAdapterFactory.java
@@ -0,0 +1,394 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.emf.examples.extlibrary.util.EXTLibraryAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibraryItemProviderAdapterFactory()
+ {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Book} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BookItemProvider bookItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Book}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createBookAdapter()
+ {
+ if (bookItemProvider == null) {
+ bookItemProvider = new BookItemProvider(this);
+ }
+
+ return bookItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Library} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected LibraryItemProvider libraryItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Library}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createLibraryAdapter()
+ {
+ if (libraryItemProvider == null) {
+ libraryItemProvider = new LibraryItemProvider(this);
+ }
+
+ return libraryItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Writer} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected WriterItemProvider writerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Writer}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createWriterAdapter()
+ {
+ if (writerItemProvider == null) {
+ writerItemProvider = new WriterItemProvider(this);
+ }
+
+ return writerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.BookOnTape} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BookOnTapeItemProvider bookOnTapeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.BookOnTape}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createBookOnTapeAdapter()
+ {
+ if (bookOnTapeItemProvider == null) {
+ bookOnTapeItemProvider = new BookOnTapeItemProvider(this);
+ }
+
+ return bookOnTapeItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.VideoCassette} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VideoCassetteItemProvider videoCassetteItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.VideoCassette}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createVideoCassetteAdapter()
+ {
+ if (videoCassetteItemProvider == null) {
+ videoCassetteItemProvider = new VideoCassetteItemProvider(this);
+ }
+
+ return videoCassetteItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Borrower} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BorrowerItemProvider borrowerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Borrower}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createBorrowerAdapter()
+ {
+ if (borrowerItemProvider == null) {
+ borrowerItemProvider = new BorrowerItemProvider(this);
+ }
+
+ return borrowerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Person} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PersonItemProvider personItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Person}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPersonAdapter()
+ {
+ if (personItemProvider == null) {
+ personItemProvider = new PersonItemProvider(this);
+ }
+
+ return personItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Employee} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EmployeeItemProvider employeeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Employee}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createEmployeeAdapter()
+ {
+ if (employeeItemProvider == null) {
+ employeeItemProvider = new EmployeeItemProvider(this);
+ }
+
+ return employeeItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory()
+ {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+ {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type)
+ {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type)
+ {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type)
+ {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener)
+ {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener)
+ {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification)
+ {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose()
+ {
+ if (bookItemProvider != null) bookItemProvider.dispose();
+ if (libraryItemProvider != null) libraryItemProvider.dispose();
+ if (writerItemProvider != null) writerItemProvider.dispose();
+ if (bookOnTapeItemProvider != null) bookOnTapeItemProvider.dispose();
+ if (videoCassetteItemProvider != null) videoCassetteItemProvider.dispose();
+ if (borrowerItemProvider != null) borrowerItemProvider.dispose();
+ if (personItemProvider != null) personItemProvider.dispose();
+ if (employeeItemProvider != null) employeeItemProvider.dispose();
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EmployeeItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EmployeeItemProvider.java
new file mode 100644
index 000000000..0fc3fe873
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EmployeeItemProvider.java
@@ -0,0 +1,151 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Employee;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Employee} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EmployeeItemProvider
+ extends PersonItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EmployeeItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addManagerPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Manager feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addManagerPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Employee_manager_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Employee_manager_feature", "_UI_Employee_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.EMPLOYEE__MANAGER,
+ true,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Employee.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Employee")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Employee)object).getLastName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Employee_type") : //$NON-NLS-1$
+ getString("_UI_Employee_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/ItemItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/ItemItemProvider.java
new file mode 100644
index 000000000..a342fd2e8
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/ItemItemProvider.java
@@ -0,0 +1,164 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Item;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Item} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ItemItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ItemItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addPublicationDatePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Publication Date feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPublicationDatePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Item_publicationDate_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Item_publicationDate_feature", "_UI_Item_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.ITEM__PUBLICATION_DATE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ Date labelValue = ((Item)object).getPublicationDate();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Item_type") : //$NON-NLS-1$
+ getString("_UI_Item_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Item.class)) {
+ case EXTLibraryPackage.ITEM__PUBLICATION_DATE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ return EXTLibraryEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/LibraryItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/LibraryItemProvider.java
new file mode 100644
index 000000000..2556ab310
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/LibraryItemProvider.java
@@ -0,0 +1,304 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.emf.examples.extlibrary.EXTLibraryFactory;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Library;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Library} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class LibraryItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LibraryItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addAddressPropertyDescriptor(object);
+ addNamePropertyDescriptor(object);
+ addBooksPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Address feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAddressPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Addressable_address_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Addressable_address_feature", "_UI_Addressable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.ADDRESSABLE__ADDRESS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNamePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Library_name_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Library_name_feature", "_UI_Library_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.LIBRARY__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Books feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addBooksPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Library_books_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Library_books_feature", "_UI_Library_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.LIBRARY__BOOKS,
+ false,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+ {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__WRITERS);
+ childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__EMPLOYEES);
+ childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__BORROWERS);
+ childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__STOCK);
+ childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__BRANCHES);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child)
+ {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Library.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Library")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Library)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Library_type") : //$NON-NLS-1$
+ getString("_UI_Library_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Library.class)) {
+ case EXTLibraryPackage.LIBRARY__ADDRESS:
+ case EXTLibraryPackage.LIBRARY__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case EXTLibraryPackage.LIBRARY__WRITERS:
+ case EXTLibraryPackage.LIBRARY__EMPLOYEES:
+ case EXTLibraryPackage.LIBRARY__BORROWERS:
+ case EXTLibraryPackage.LIBRARY__STOCK:
+ case EXTLibraryPackage.LIBRARY__BRANCHES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (EXTLibraryPackage.Literals.LIBRARY__WRITERS,
+ EXTLibraryFactory.eINSTANCE.createWriter()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (EXTLibraryPackage.Literals.LIBRARY__EMPLOYEES,
+ EXTLibraryFactory.eINSTANCE.createEmployee()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (EXTLibraryPackage.Literals.LIBRARY__BORROWERS,
+ EXTLibraryFactory.eINSTANCE.createBorrower()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (EXTLibraryPackage.Literals.LIBRARY__STOCK,
+ EXTLibraryFactory.eINSTANCE.createBook()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (EXTLibraryPackage.Literals.LIBRARY__STOCK,
+ EXTLibraryFactory.eINSTANCE.createBookOnTape()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (EXTLibraryPackage.Literals.LIBRARY__STOCK,
+ EXTLibraryFactory.eINSTANCE.createVideoCassette()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (EXTLibraryPackage.Literals.LIBRARY__BRANCHES,
+ EXTLibraryFactory.eINSTANCE.createLibrary()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ return EXTLibraryEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PeriodicalItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PeriodicalItemProvider.java
new file mode 100644
index 000000000..0a5a5620c
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PeriodicalItemProvider.java
@@ -0,0 +1,172 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Periodical;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Periodical} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PeriodicalItemProvider
+ extends ItemItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PeriodicalItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addTitlePropertyDescriptor(object);
+ addIssuesPerYearPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Title feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTitlePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Periodical_title_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Periodical_title_feature", "_UI_Periodical_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.PERIODICAL__TITLE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Issues Per Year feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addIssuesPerYearPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Periodical_issuesPerYear_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Periodical_issuesPerYear_feature", "_UI_Periodical_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.PERIODICAL__ISSUES_PER_YEAR,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Periodical)object).getTitle();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Periodical_type") : //$NON-NLS-1$
+ getString("_UI_Periodical_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Periodical.class)) {
+ case EXTLibraryPackage.PERIODICAL__TITLE:
+ case EXTLibraryPackage.PERIODICAL__ISSUES_PER_YEAR:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PersonItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PersonItemProvider.java
new file mode 100644
index 000000000..c3548d7a0
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PersonItemProvider.java
@@ -0,0 +1,224 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Person;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Person} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PersonItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PersonItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addAddressPropertyDescriptor(object);
+ addFirstNamePropertyDescriptor(object);
+ addLastNamePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Address feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAddressPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Addressable_address_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Addressable_address_feature", "_UI_Addressable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.ADDRESSABLE__ADDRESS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the First Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFirstNamePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Person_firstName_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Person_firstName_feature", "_UI_Person_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.PERSON__FIRST_NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Last Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLastNamePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Person_lastName_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Person_lastName_feature", "_UI_Person_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.PERSON__LAST_NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Person.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Person")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Person)object).getLastName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Person_type") : //$NON-NLS-1$
+ getString("_UI_Person_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Person.class)) {
+ case EXTLibraryPackage.PERSON__ADDRESS:
+ case EXTLibraryPackage.PERSON__FIRST_NAME:
+ case EXTLibraryPackage.PERSON__LAST_NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ return EXTLibraryEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/VideoCassetteItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/VideoCassetteItemProvider.java
new file mode 100644
index 000000000..6348fba36
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/VideoCassetteItemProvider.java
@@ -0,0 +1,151 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.VideoCassette;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.VideoCassette} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VideoCassetteItemProvider
+ extends AudioVisualItemItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VideoCassetteItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addCastPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Cast feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCastPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_VideoCassette_cast_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_VideoCassette_cast_feature", "_UI_VideoCassette_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.VIDEO_CASSETTE__CAST,
+ true,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns VideoCassette.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/VideoCassette")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((VideoCassette)object).getTitle();
+ return label == null || label.length() == 0 ?
+ getString("_UI_VideoCassette_type") : //$NON-NLS-1$
+ getString("_UI_VideoCassette_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/WriterItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/WriterItemProvider.java
new file mode 100644
index 000000000..a679bb091
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/WriterItemProvider.java
@@ -0,0 +1,183 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Writer;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Writer} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class WriterItemProvider
+ extends PersonItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public WriterItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNamePropertyDescriptor(object);
+ addBooksPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNamePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Writer_name_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Writer_name_feature", "_UI_Writer_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.WRITER__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Books feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addBooksPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Writer_books_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Writer_books_feature", "_UI_Writer_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.WRITER__BOOKS,
+ true,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Writer.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Writer")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Writer)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Writer_type") : //$NON-NLS-1$
+ getString("_UI_Writer_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Writer.class)) {
+ case EXTLibraryPackage.WRITER__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/.classpath b/tutorial/org.eclipse.emf.examples.library.editor/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/.project b/tutorial/org.eclipse.emf.examples.library.editor/.project
new file mode 100644
index 000000000..d902a0ec8
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.examples.library.editor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/.settings/org.eclipse.jdt.core.prefs b/tutorial/org.eclipse.emf.examples.library.editor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..d29b0f382
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Wed Nov 08 10:51:59 EST 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/META-INF/MANIFEST.MF b/tutorial/org.eclipse.emf.examples.library.editor/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..1170080f2
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.examples.library.editor;singleton:=true
+Bundle-Version: 2.5.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.emf.examples.extlibrary.presentation.EXTLibraryEditorPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.emf.examples.extlibrary.presentation,
+ org.eclipse.emf.examples.extlibrary.presentation,
+ org.eclipse.emf.examples.extlibrary.actions
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources;visibility:=reexport,
+ org.eclipse.emf.examples.library.edit;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.emf.edit.ui;visibility:=reexport,
+ org.eclipse.ui.ide;visibility:=reexport
+Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/about.html b/tutorial/org.eclipse.emf.examples.library.editor/about.html
new file mode 100644
index 000000000..1b8f94080
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/build.properties b/tutorial/org.eclipse.emf.examples.library.editor/build.properties
new file mode 100644
index 000000000..ca45351e6
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/build.properties
@@ -0,0 +1,9 @@
+bin.includes = icons/,\
+ .,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+source.. = src/
+output.. = bin/
+src.includes = about.html
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/icons/full/obj16/EXTLibraryModelFile.gif b/tutorial/org.eclipse.emf.examples.library.editor/icons/full/obj16/EXTLibraryModelFile.gif
new file mode 100644
index 000000000..fa2168160
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/icons/full/obj16/EXTLibraryModelFile.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/icons/full/wizban/NewEXTLibrary.gif b/tutorial/org.eclipse.emf.examples.library.editor/icons/full/wizban/NewEXTLibrary.gif
new file mode 100644
index 000000000..0e69a72e1
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/icons/full/wizban/NewEXTLibrary.gif
Binary files differ
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/plugin.properties b/tutorial/org.eclipse.emf.examples.library.editor/plugin.properties
new file mode 100644
index 000000000..75085f978
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/plugin.properties
@@ -0,0 +1,63 @@
+# /**
+# * Copyright (c) 2002-2008 IBM Corporation and others.
+# * All rights reserved. This program and the accompanying materials
+# * are made available under the terms of the Eclipse Public License v1.0
+# * which accompanies this distribution, and is available at
+# * http://www.eclipse.org/legal/epl-v10.html
+# *
+# * Contributors:
+# * IBM - Initial API and implementation
+# */
+
+# NLS_MESSAGEFORMAT_VAR
+
+pluginName = EMF Extended Library Editor Example
+providerName = Eclipse Modeling Project
+
+_UI_EXTLibraryEditor_menu = &EXTLibrary Editor
+
+_UI_CreateChild_menu_item = &New Child
+_UI_CreateSibling_menu_item = N&ew Sibling
+
+_UI_ShowPropertiesView_menu_item = Show &Properties View
+_UI_RefreshViewer_menu_item = &Refresh
+
+_UI_SelectionPage_label = Selection
+_UI_ParentPage_label = Parent
+_UI_ListPage_label = List
+_UI_TreePage_label = Tree
+_UI_TablePage_label = Table
+_UI_TreeWithColumnsPage_label = Tree with Columns
+_UI_ObjectColumn_label = Object
+_UI_SelfColumn_label = Self
+
+_UI_NoObjectSelected = Selected Nothing
+_UI_SingleObjectSelected = Selected Object: {0}
+_UI_MultiObjectSelected = Selected {0} Objects
+
+_UI_OpenEditorError_label = Open Editor
+
+_UI_Wizard_category = Example EMF Model Creation Wizards
+
+_UI_EXTLibraryModelWizard_label = EXTLibrary Model
+_UI_EXTLibraryModelWizard_description = Create a new EXTLibrary model
+
+_UI_EXTLibraryEditor_label = EXTLibrary Model Editor
+
+_UI_EXTLibraryEditorFilenameDefaultBase = My
+_UI_EXTLibraryEditorFilenameExtensions = extlibrary
+
+_UI_Wizard_label = New
+
+_WARN_FilenameExtension = The file name must end in ".{0}"
+_WARN_FilenameExtensions = The file name must have one of the following extensions: {0}
+
+_UI_ModelObject = &Model Object
+_UI_XMLEncoding = &XML Encoding
+_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1
+_UI_Wizard_initial_object_description = Select a model object to create
+
+_UI_FileConflict_label = File Conflict
+_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes?
+
+_UI_CreateModelError_message = Problems encountered in file "{0}"
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/plugin.xml b/tutorial/org.eclipse.emf.examples.library.editor/plugin.xml
new file mode 100644
index 000000000..daf7913c9
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/plugin.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <category
+ id="org.eclipse.emf.ecore.Wizard.category.ID"
+ name="%_UI_Wizard_category"/>
+ <wizard
+ id="org.eclipse.emf.examples.extlibrary.presentation.EXTLibraryModelWizardID"
+ name="%_UI_EXTLibraryModelWizard_label"
+ class="org.eclipse.emf.examples.extlibrary.presentation.EXTLibraryModelWizard"
+ category="org.eclipse.emf.ecore.Wizard.category.ID"
+ icon="icons/full/obj16/EXTLibraryModelFile.gif">
+ <description>%_UI_EXTLibraryModelWizard_description</description>
+ <selection class="org.eclipse.core.resources.IResource"/>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.emf.examples.extlibrary.presentation.EXTLibraryEditor"
+ contributorClass="org.eclipse.emf.examples.extlibrary.actions.EXTLibraryExtendedActionBarContributor"
+ default="true"
+ extensions="extlibrary"
+ icon="icons/full/obj16/EXTLibraryModelFile.gif"
+ id="org.eclipse.emf.examples.extlibrary.presentation.EXTLibraryEditorID"
+ name="%_UI_EXTLibraryEditor_label">
+ </editor>
+ </extension>
+</plugin>
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/AddLibraryCommand.java b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/AddLibraryCommand.java
new file mode 100644
index 000000000..3a4ba3ff9
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/AddLibraryCommand.java
@@ -0,0 +1,78 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.actions;
+
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.edit.EMFEditPlugin;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.CommandActionDelegate;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+
+
+/**
+ * The extended library example supports multi-rooted resources
+ * and therefore this command will add a library to the resource.
+ */
+public class AddLibraryCommand extends AddCommand implements CommandActionDelegate
+{
+ /* Attribute for the adapter factory */
+ private IItemLabelProvider labelProvider = null;
+
+ /**
+ * Constructor
+ *
+ * @param domain
+ * the editing domain
+ * @param list
+ * the list to add to
+ * @param value
+ * the value to add
+ */
+ public AddLibraryCommand(EditingDomain domain, EList<?> list, Object value)
+ {
+ super(domain, list, value);
+
+ if (domain instanceof AdapterFactoryEditingDomain)
+ {
+ labelProvider = (IItemLabelProvider)((AdapterFactoryEditingDomain)domain).getAdapterFactory().adapt(value, IItemLabelProvider.class);
+ }
+
+ setLabel(EMFEditPlugin.INSTANCE.getString("_UI_CreateChildCommand_label", new Object []{ getText() })); //$NON-NLS-1$
+ setDescription(EMFEditPlugin.INSTANCE.getString("_UI_CreateChildCommand_description")); //$NON-NLS-1$
+ }
+
+ /*
+ * @see org.eclipse.emf.edit.command.CommandActionDelegate#getImage()
+ */
+ public Object getImage()
+ {
+ return this.labelProvider != null ? this.labelProvider.getImage(getCollection().toArray()[0]) : null;
+ }
+
+ /*
+ * @see org.eclipse.emf.edit.command.CommandActionDelegate#getText()
+ */
+ public String getText()
+ {
+ return this.labelProvider != null ? this.labelProvider.getText(getCollection().toArray()[0]) : null;
+ }
+
+ /*
+ * @see org.eclipse.emf.edit.command.CommandActionDelegate#getToolTipText()
+ */
+ public String getToolTipText()
+ {
+ return getText();
+ }
+} \ No newline at end of file
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/CreateLibraryAction.java b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/CreateLibraryAction.java
new file mode 100644
index 000000000..76d17b360
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/CreateLibraryAction.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.actions;
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.ui.action.StaticSelectionCommandAction;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryFactory;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IEditorPart;
+
+
+/**
+ * The extended library example supports multi-rooted resources
+ * and therefore this action allows the user to create a library
+ * root on the resource.
+ */
+public class CreateLibraryAction extends StaticSelectionCommandAction
+{
+
+ /**
+ * This constructs an instance of an action that creates a library
+ */
+ public CreateLibraryAction(IEditorPart editorPart, ISelection selection)
+ {
+ super(editorPart);
+ configureAction(selection);
+ }
+
+ /*
+ * @see org.eclipse.emf.edit.ui.action.StaticSelectionCommandAction#createActionCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.util.Collection)
+ */
+ @Override
+ protected Command createActionCommand(EditingDomain inputEditingDomain, Collection<?> collection)
+ {
+
+ return new AddLibraryCommand(
+ inputEditingDomain,
+ ((Resource)collection.toArray()[0]).getContents(),
+ EXTLibraryFactory.eINSTANCE.createLibrary());
+ }
+} \ No newline at end of file
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/EXTLibraryExtendedActionBarContributor.java b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/EXTLibraryExtendedActionBarContributor.java
new file mode 100644
index 000000000..210164d5d
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/EXTLibraryExtendedActionBarContributor.java
@@ -0,0 +1,114 @@
+/**
+ * Copyright (c) 2005-2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.actions;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+
+import org.eclipse.emf.examples.extlibrary.Library;
+import org.eclipse.emf.examples.extlibrary.presentation.EXTLibraryActionBarContributor;
+
+
+/**
+ * Extension to the generated action bar contributor to handle creation of
+ * multi-rooted resources.
+ */
+public class EXTLibraryExtendedActionBarContributor extends EXTLibraryActionBarContributor
+{
+
+ /**
+ * Constructor
+ */
+ public EXTLibraryExtendedActionBarContributor()
+ {
+ super();
+ }
+
+ /*
+ * @see org.eclipse.emf.examples.library.presentation.EXTLibraryActionBarContributor#generateCreateChildActions(java.util.Collection,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ protected java.util.Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection)
+ {
+ Collection<IAction> actions = new ArrayList<IAction>(super.generateCreateChildActions(descriptors, selection));
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1)
+ {
+ Object object = ((IStructuredSelection)selection).getFirstElement();
+ if (object instanceof Resource)
+ {
+ actions.add(generateResourceAction(((Resource)object)));
+ }
+ }
+
+ return actions;
+ }
+
+ /*
+ * @see org.eclipse.emf.examples.extlibrary.presentation.EXTLibraryActionBarContributor#generateCreateSiblingActions(java.util.Collection,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection)
+ {
+ Collection<IAction> actions = new ArrayList<IAction>(super.generateCreateSiblingActions(descriptors, selection));
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1)
+ {
+ Object object = ((IStructuredSelection)selection).getFirstElement();
+ if (object instanceof Library)
+ {
+ actions.add(generateResourceAction(((Library)object).eResource()));
+ }
+ }
+
+ return actions;
+ }
+
+ /**
+ * Generates a library action for a given resource
+ *
+ * @param resource
+ * the containing resource
+ * @return the action
+ */
+ protected Action generateResourceAction(Resource resource)
+ {
+ return new CreateLibraryAction(activeEditorPart, new StructuredSelection(resource));
+ }
+
+ /*
+ * @see org.eclipse.ui.part.EditorActionBarContributor#init(org.eclipse.ui.IActionBars)
+ */
+ @Override
+ public void init(IActionBars actionBars)
+ {
+ super.init(actionBars);
+
+ ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
+ this.deleteAction = new ExtendedDeleteAction();
+ this.deleteAction.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
+ actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), this.deleteAction);
+
+ actionBars.updateActionBars();
+ }
+} \ No newline at end of file
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/ExtendedDeleteAction.java b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/ExtendedDeleteAction.java
new file mode 100644
index 000000000..8e8740aec
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/ExtendedDeleteAction.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.actions;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.ui.action.DeleteAction;
+
+import org.eclipse.emf.examples.extlibrary.Library;
+
+
+/**
+ * The extended library example supports multi-rooted resources
+ * and therefore this action allows the user to delete a library
+ * root from the resource.
+ */
+public class ExtendedDeleteAction extends DeleteAction
+{
+
+ /**
+ * Constructor
+ *
+ * @param domain
+ * the editing domain
+ */
+ public ExtendedDeleteAction(EditingDomain domain)
+ {
+ super(domain);
+ }
+
+ /**
+ * Constructor
+ */
+ public ExtendedDeleteAction()
+ {
+ super();
+ }
+
+ /*
+ * @see org.eclipse.emf.edit.ui.action.CommandActionHandler#createCommand(java.util.Collection)
+ */
+ @Override
+ public Command createCommand(Collection<?> selection)
+ {
+ Command cmd = super.createCommand(selection);
+ if (cmd != null)
+ {
+ ArrayList<Object> list = new ArrayList<Object>();
+ if (selection != null && !selection.isEmpty())
+ {
+ Iterator<?> iter = selection.iterator();
+ while (iter.hasNext())
+ {
+ Object next = iter.next();
+ if (next instanceof Library)
+ {
+ list.add(next);
+ }
+ }
+
+ if (!list.isEmpty())
+ {
+ Library library = (Library)list.get(0);
+ if (library.eResource() != null)
+ {
+ Command removeLibraries = new RemoveLibraryCommand(domain, library.eResource().getContents(), list);
+ if (cmd instanceof UnexecutableCommand)
+ {
+ return removeLibraries;
+ }
+ else
+ {
+ cmd.chain(removeLibraries);
+ }
+ }
+ }
+ }
+ }
+
+ return cmd;
+ }
+} \ No newline at end of file
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/RemoveLibraryCommand.java b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/RemoveLibraryCommand.java
new file mode 100644
index 000000000..8d8396fb2
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/actions/RemoveLibraryCommand.java
@@ -0,0 +1,81 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.actions;
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.edit.command.CommandActionDelegate;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+
+
+/**
+ * The extended library example supports multi-rooted resources
+ * and therefore this command will remove a library from the resource..
+ */
+public class RemoveLibraryCommand extends RemoveCommand implements CommandActionDelegate
+{
+
+ /* Attribute for the adapter factory */
+ private IItemLabelProvider labelProvider = null;
+
+ /**
+ * Constructor
+ *
+ * @param domain
+ * the editing domain
+ * @param list
+ * the list to modify
+ * @param collection
+ * the objects to be removed
+ */
+ public RemoveLibraryCommand(EditingDomain domain, EList<?> list, Collection<?> collection)
+ {
+ super(domain, list, collection);
+ if (domain instanceof AdapterFactoryEditingDomain)
+ {
+ labelProvider = (IItemLabelProvider)((AdapterFactoryEditingDomain)domain).getAdapterFactory().adapt(
+ collection.toArray()[0],
+ IItemLabelProvider.class);
+ }
+
+ setLabel(LABEL);
+ setDescription(DESCRIPTION);
+ }
+
+ /*
+ * @see org.eclipse.emf.edit.command.CommandActionDelegate#getImage()
+ */
+ public Object getImage()
+ {
+ return this.labelProvider != null ? this.labelProvider.getImage(getCollection().toArray()[0]) : null;
+ }
+
+ /*
+ * @see org.eclipse.emf.edit.command.CommandActionDelegate#getText()
+ */
+ public String getText()
+ {
+ return this.labelProvider != null ? this.labelProvider.getText(getCollection().toArray()[0]) : null;
+ }
+
+ /*
+ * @see org.eclipse.emf.edit.command.CommandActionDelegate#getToolTipText()
+ */
+ public String getToolTipText()
+ {
+ return getText();
+ }
+} \ No newline at end of file
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryActionBarContributor.java b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryActionBarContributor.java
new file mode 100644
index 000000000..41afb9a8d
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryActionBarContributor.java
@@ -0,0 +1,446 @@
+/**
+ * Copyright (c) 2005-2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.presentation;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+import org.eclipse.emf.edit.ui.action.ControlAction;
+import org.eclipse.emf.edit.ui.action.CreateChildAction;
+import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.action.LoadResourceAction;
+import org.eclipse.emf.edit.ui.action.ValidateAction;
+
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.SubContributionItem;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+
+
+/**
+ * This is the action bar contributor for the EXTLibrary model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EXTLibraryActionBarContributor extends EditingDomainActionBarContributor implements ISelectionChangedListener
+{
+ /**
+ * This keeps track of the active editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IEditorPart activeEditorPart;
+
+ /**
+ * This keeps track of the current selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionProvider selectionProvider;
+
+ /**
+ * This action opens the Properties view.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction showPropertiesViewAction =
+ new Action(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) //$NON-NLS-1$
+ {
+ @Override
+ public void run() {
+ try {
+ getPage().showView("org.eclipse.ui.views.PropertySheet"); //$NON-NLS-1$
+ }
+ catch (PartInitException exception) {
+ EXTLibraryEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * This action refreshes the viewer of the current editor if the editor
+ * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction refreshViewerAction =
+ new Action(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) //$NON-NLS-1$
+ {
+ @Override
+ public boolean isEnabled() {
+ return activeEditorPart instanceof IViewerProvider;
+ }
+
+ @Override
+ public void run() {
+ if (activeEditorPart instanceof IViewerProvider) {
+ Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer();
+ if (viewer != null) {
+ viewer.refresh();
+ }
+ }
+ }
+ };
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> createChildActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateChild actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createChildMenuManager;
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> createSiblingActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateSibling actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createSiblingMenuManager;
+
+ /**
+ * This creates an instance of the contributor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibraryActionBarContributor()
+ {
+ super(ADDITIONS_LAST_STYLE);
+ loadResourceAction = new LoadResourceAction();
+ validateAction = new ValidateAction();
+ controlAction = new ControlAction();
+ }
+
+ /**
+ * This adds Separators for editor additions to the tool bar.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void contributeToToolBar(IToolBarManager toolBarManager)
+ {
+ toolBarManager.add(new Separator("extlibrary-settings")); //$NON-NLS-1$
+ toolBarManager.add(new Separator("extlibrary-additions")); //$NON-NLS-1$
+ }
+
+ /**
+ * This adds to the menu bar a menu and some separators for editor additions,
+ * as well as the sub-menus for object creation items.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void contributeToMenu(IMenuManager menuManager)
+ {
+ super.contributeToMenu(menuManager);
+
+ IMenuManager submenuManager = new MenuManager(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_EXTLibraryEditor_menu"), "org.eclipse.emf.examples.extlibraryMenuID"); //$NON-NLS-1$ //$NON-NLS-2$
+ menuManager.insertAfter("additions", submenuManager); //$NON-NLS-1$
+ submenuManager.add(new Separator("settings")); //$NON-NLS-1$
+ submenuManager.add(new Separator("actions")); //$NON-NLS-1$
+ submenuManager.add(new Separator("additions")); //$NON-NLS-1$
+ submenuManager.add(new Separator("additions-end")); //$NON-NLS-1$
+
+ // Prepare for CreateChild item addition or removal.
+ //
+ createChildMenuManager = new MenuManager(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); //$NON-NLS-1$
+ submenuManager.insertBefore("additions", createChildMenuManager); //$NON-NLS-1$
+
+ // Prepare for CreateSibling item addition or removal.
+ //
+ createSiblingMenuManager = new MenuManager(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); //$NON-NLS-1$
+ submenuManager.insertBefore("additions", createSiblingMenuManager); //$NON-NLS-1$
+
+ // Force an update because Eclipse hides empty menus now.
+ //
+ submenuManager.addMenuListener
+ (new IMenuListener() {
+ public void menuAboutToShow(IMenuManager menuManager) {
+ menuManager.updateAll(true);
+ }
+ });
+
+ addGlobalActions(submenuManager);
+ }
+
+ /**
+ * When the active editor changes, this remembers the change and registers with it as a selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setActiveEditor(IEditorPart part)
+ {
+ super.setActiveEditor(part);
+ activeEditorPart = part;
+
+ // Switch to the new selection provider.
+ //
+ if (selectionProvider != null) {
+ selectionProvider.removeSelectionChangedListener(this);
+ }
+ if (part == null) {
+ selectionProvider = null;
+ }
+ else {
+ selectionProvider = part.getSite().getSelectionProvider();
+ selectionProvider.addSelectionChangedListener(this);
+
+ // Fake a selection changed event to update the menus.
+ //
+ if (selectionProvider.getSelection() != null) {
+ selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()));
+ }
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
+ * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
+ * that can be added to the selected object and updating the menus accordingly.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void selectionChanged(SelectionChangedEvent event)
+ {
+ // Remove any menu items for old selection.
+ //
+ if (createChildMenuManager != null) {
+ depopulateManager(createChildMenuManager, createChildActions);
+ }
+ if (createSiblingMenuManager != null) {
+ depopulateManager(createSiblingMenuManager, createSiblingActions);
+ }
+
+ // Query the new selection for appropriate new child/sibling descriptors
+ //
+ Collection<?> newChildDescriptors = null;
+ Collection<?> newSiblingDescriptors = null;
+
+ ISelection selection = event.getSelection();
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) {
+ Object object = ((IStructuredSelection)selection).getFirstElement();
+
+ EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain();
+
+ newChildDescriptors = domain.getNewChildDescriptors(object, null);
+ newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
+ }
+
+ // Generate actions for selection; populate and redraw the menus.
+ //
+ createChildActions = generateCreateChildActions(newChildDescriptors, selection);
+ createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
+
+ if (createChildMenuManager != null) {
+ populateManager(createChildMenuManager, createChildActions, null);
+ createChildMenuManager.update(true);
+ }
+ if (createSiblingMenuManager != null) {
+ populateManager(createSiblingMenuManager, createSiblingActions, null);
+ createSiblingMenuManager.update(true);
+ }
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection)
+ {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateChildAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection)
+ {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
+ * by inserting them before the specified contribution item <code>contributionID</code>.
+ * If <code>contributionID</code> is <code>null</code>, they are simply added.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID)
+ {
+ if (actions != null) {
+ for (IAction action : actions) {
+ if (contributionID != null) {
+ manager.insertBefore(contributionID, action);
+ }
+ else {
+ manager.add(action);
+ }
+ }
+ }
+ }
+
+ /**
+ * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions)
+ {
+ if (actions != null) {
+ IContributionItem[] items = manager.getItems();
+ for (int i = 0; i < items.length; i++) {
+ // Look into SubContributionItems
+ //
+ IContributionItem contributionItem = items[i];
+ while (contributionItem instanceof SubContributionItem) {
+ contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
+ }
+
+ // Delete the ActionContributionItems with matching action.
+ //
+ if (contributionItem instanceof ActionContributionItem) {
+ IAction action = ((ActionContributionItem)contributionItem).getAction();
+ if (actions.contains(action)) {
+ manager.remove(contributionItem);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This populates the pop-up menu before it appears.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager)
+ {
+ super.menuAboutToShow(menuManager);
+ MenuManager submenuManager = null;
+
+ submenuManager = new MenuManager(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); //$NON-NLS-1$
+ populateManager(submenuManager, createChildActions, null);
+ menuManager.insertBefore("edit", submenuManager); //$NON-NLS-1$
+
+ submenuManager = new MenuManager(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); //$NON-NLS-1$
+ populateManager(submenuManager, createSiblingActions, null);
+ menuManager.insertBefore("edit", submenuManager); //$NON-NLS-1$
+ }
+
+ /**
+ * This inserts global actions before the "additions-end" separator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void addGlobalActions(IMenuManager menuManager)
+ {
+ menuManager.insertAfter("additions-end", new Separator("ui-actions")); //$NON-NLS-1$ //$NON-NLS-2$
+ menuManager.insertAfter("ui-actions", showPropertiesViewAction); //$NON-NLS-1$
+
+ refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
+ menuManager.insertAfter("ui-actions", refreshViewerAction); //$NON-NLS-1$
+
+ super.addGlobalActions(menuManager);
+ }
+
+ /**
+ * This ensures that a delete action will clean up all references to deleted objects.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean removeAllReferencesOnDelete()
+ {
+ return true;
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryEditor.java b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryEditor.java
new file mode 100644
index 000000000..bafcf98ac
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryEditor.java
@@ -0,0 +1,1877 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.presentation;
+
+
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EValidator;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import java.io.IOException;
+
+import java.io.InputStream;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EventObject;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.custom.CTabFolder;
+
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.Transfer;
+
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPart;
+
+import org.eclipse.ui.PartInitException;
+
+import org.eclipse.ui.dialogs.SaveAsDialog;
+
+import org.eclipse.ui.ide.IGotoMarker;
+
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.MultiPageEditorPart;
+
+import org.eclipse.ui.views.contentoutline.ContentOutline;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheet;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+
+import org.eclipse.emf.examples.extlibrary.provider.EXTLibraryItemProviderAdapterFactory;
+
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+
+/**
+ * This is an example of a EXTLibrary model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EXTLibraryEditor extends MultiPageEditorPart
+ implements
+ IEditingDomainProvider,
+ ISelectionProvider,
+ IMenuListener,
+ IViewerProvider,
+ IGotoMarker
+{
+ /**
+ * This keeps track of the editing domain that is used to track all changes to the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AdapterFactoryEditingDomain editingDomain;
+
+ /**
+ * This is the one adapter factory used for providing views of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory adapterFactory;
+
+ /**
+ * This is the content outline page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IContentOutlinePage contentOutlinePage;
+
+ /**
+ * This is a kludge...
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStatusLineManager contentOutlineStatusLineManager;
+
+ /**
+ * This is the content outline page's viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer contentOutlineViewer;
+
+ /**
+ * This is the property sheet page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>();
+
+ /**
+ * This is the viewer that shadows the selection in the content outline.
+ * The parent relation must be correctly defined for this to work.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer selectionViewer;
+
+ /**
+ * This inverts the roll of parent and child in the content provider and show parents as a tree.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer parentViewer;
+
+ /**
+ * This shows how a tree view works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewer;
+
+ /**
+ * This shows how a list view works.
+ * A list viewer doesn't support icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ListViewer listViewer;
+
+ /**
+ * This shows how a table view works.
+ * A table can be used as a list with icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TableViewer tableViewer;
+
+ /**
+ * This shows how a tree view with columns works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewerWithColumns;
+
+ /**
+ * This keeps track of the active viewer pane, in the book.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ViewerPane currentViewerPane;
+
+ /**
+ * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Viewer currentViewer;
+
+ /**
+ * This listens to which ever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionChangedListener selectionChangedListener;
+
+ /**
+ * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>();
+
+ /**
+ * This keeps track of the selection of the editor as a whole.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelection editorSelection = StructuredSelection.EMPTY;
+
+ /**
+ * The MarkerHelper is responsible for creating workspace resource markers presented
+ * in Eclipse's Problems View.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MarkerHelper markerHelper = new EditUIMarkerHelper();
+
+ /**
+ * This listens for when the outline becomes active
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IPartListener partListener =
+ new IPartListener() {
+ public void partActivated(IWorkbenchPart p) {
+ if (p instanceof ContentOutline) {
+ if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
+ getActionBarContributor().setActiveEditor(EXTLibraryEditor.this);
+
+ setCurrentViewer(contentOutlineViewer);
+ }
+ }
+ else if (p instanceof PropertySheet) {
+ if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
+ getActionBarContributor().setActiveEditor(EXTLibraryEditor.this);
+ handleActivate();
+ }
+ }
+ else if (p == EXTLibraryEditor.this) {
+ handleActivate();
+ }
+ }
+ public void partBroughtToTop(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partClosed(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partDeactivated(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partOpened(IWorkbenchPart p) {
+ // Ignore.
+ }
+ };
+
+ /**
+ * Resources that have been removed since last activation.
+ * @generated
+ */
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been changed since last activation.
+ * @generated
+ */
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been saved.
+ * @generated
+ */
+ protected Collection<Resource> savedResources = new ArrayList<Resource>();
+
+ /**
+ * Map to store the diagnostic associated with a resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>();
+
+ /**
+ * Controls whether the problem indication should be updated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean updateProblemIndication = true;
+
+ /**
+ * Adapter used to update the problem indication when resources are demanded loaded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EContentAdapter problemIndicationAdapter =
+ new EContentAdapter() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getNotifier() instanceof Resource) {
+ switch (notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__IS_LOADED:
+ case Resource.RESOURCE__ERRORS:
+ case Resource.RESOURCE__WARNINGS: {
+ Resource resource = (Resource)notification.getNotifier();
+ Diagnostic diagnostic = analyzeResourceProblems(resource, null);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, diagnostic);
+ }
+ else {
+ resourceToDiagnosticMap.remove(resource);
+ }
+
+ if (updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ break;
+ }
+ }
+ }
+ else {
+ super.notifyChanged(notification);
+ }
+ }
+
+ @Override
+ protected void setTarget(Resource target) {
+ basicSetTarget(target);
+ }
+
+ @Override
+ protected void unsetTarget(Resource target) {
+ basicUnsetTarget(target);
+ resourceToDiagnosticMap.remove(target);
+ if (updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ }
+ };
+
+ /**
+ * This listens for workspace changes.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IResourceChangeListener resourceChangeListener =
+ new IResourceChangeListener() {
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta delta = event.getDelta();
+ try {
+ class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+ protected ResourceSet resourceSet = editingDomain.getResourceSet();
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ public boolean visit(IResourceDelta delta) {
+ if (delta.getResource().getType() == IResource.FILE) {
+ if (delta.getKind() == IResourceDelta.REMOVED ||
+ delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
+ Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ if (resource != null) {
+ if (delta.getKind() == IResourceDelta.REMOVED) {
+ removedResources.add(resource);
+ }
+ else if (!savedResources.remove(resource)) {
+ changedResources.add(resource);
+ }
+ }
+ }
+ return false;
+ }
+
+ return true;
+ }
+
+ public Collection<Resource> getChangedResources() {
+ return changedResources;
+ }
+
+ public Collection<Resource> getRemovedResources() {
+ return removedResources;
+ }
+ }
+
+ final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
+ delta.accept(visitor);
+
+ if (!visitor.getRemovedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ removedResources.addAll(visitor.getRemovedResources());
+ if (!isDirty()) {
+ getSite().getPage().closeEditor(EXTLibraryEditor.this, false);
+ }
+ }
+ });
+ }
+
+ if (!visitor.getChangedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ changedResources.addAll(visitor.getChangedResources());
+ if (getSite().getPage().getActiveEditor() == EXTLibraryEditor.this) {
+ handleActivate();
+ }
+ }
+ });
+ }
+ }
+ catch (CoreException exception) {
+ EXTLibraryEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * Handles activation of the editor or it's associated views.
+ * @generated
+ */
+ protected void handleActivate()
+ {
+ // Recompute the read only state.
+ //
+ if (editingDomain.getResourceToReadOnlyMap() != null) {
+ editingDomain.getResourceToReadOnlyMap().clear();
+
+ // Refresh any actions that may become enabled or disabled.
+ //
+ setSelection(getSelection());
+ }
+
+ if (!removedResources.isEmpty()) {
+ if (handleDirtyConflict()) {
+ getSite().getPage().closeEditor(EXTLibraryEditor.this, false);
+ }
+ else {
+ removedResources.clear();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+ else if (!changedResources.isEmpty()) {
+ changedResources.removeAll(savedResources);
+ handleChangedResources();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+
+ /**
+ * Handles what to do with changed resources on activation.
+ * @generated
+ */
+ protected void handleChangedResources()
+ {
+ if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if (isDirty()) {
+ changedResources.addAll(editingDomain.getResourceSet().getResources());
+ }
+ editingDomain.getCommandStack().flush();
+
+ updateProblemIndication = false;
+ for (Resource resource : changedResources) {
+ if (resource.isLoaded()) {
+ resource.unload();
+ try {
+ resource.load(Collections.EMPTY_MAP);
+ }
+ catch (IOException exception) {
+ if (!resourceToDiagnosticMap.containsKey(resource)) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ }
+ }
+ }
+
+ if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ setSelection(StructuredSelection.EMPTY);
+ }
+
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+ }
+
+ /**
+ * Updates the problems indication with the information described in the specified diagnostic.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void updateProblemIndication()
+ {
+ if (updateProblemIndication) {
+ BasicDiagnostic diagnostic =
+ new BasicDiagnostic
+ (Diagnostic.OK,
+ "org.eclipse.emf.examples.library.editor", //$NON-NLS-1$
+ 0,
+ null,
+ new Object [] { editingDomain.getResourceSet() });
+ for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
+ if (childDiagnostic.getSeverity() != Diagnostic.OK) {
+ diagnostic.add(childDiagnostic);
+ }
+ }
+
+ int lastEditorPage = getPageCount() - 1;
+ if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) {
+ ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ setActivePage(lastEditorPage);
+ }
+ }
+ else if (diagnostic.getSeverity() != Diagnostic.OK) {
+ ProblemEditorPart problemEditorPart = new ProblemEditorPart();
+ problemEditorPart.setDiagnostic(diagnostic);
+ problemEditorPart.setMarkerHelper(markerHelper);
+ try {
+ addPage(++lastEditorPage, problemEditorPart, getEditorInput());
+ setPageText(lastEditorPage, problemEditorPart.getPartName());
+ setActivePage(lastEditorPage);
+ showTabs();
+ }
+ catch (PartInitException exception) {
+ EXTLibraryEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+
+ if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
+ markerHelper.deleteMarkers(editingDomain.getResourceSet());
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ try {
+ markerHelper.createMarkers(diagnostic);
+ }
+ catch (CoreException exception) {
+ EXTLibraryEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Shows a dialog that asks if conflicting changes should be discarded.
+ * @generated
+ */
+ protected boolean handleDirtyConflict()
+ {
+ return
+ MessageDialog.openQuestion
+ (getSite().getShell(),
+ getString("_UI_FileConflict_label"), //$NON-NLS-1$
+ getString("_WARN_FileConflict")); //$NON-NLS-1$
+ }
+
+ /**
+ * This creates a model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibraryEditor()
+ {
+ super();
+ initializeEditingDomain();
+ }
+
+ /**
+ * This sets up the editing domain for the model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void initializeEditingDomain()
+ {
+ // Create an adapter factory that yields item providers.
+ //
+ adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new EXTLibraryItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+
+ // Create the command stack that will notify this editor as commands are executed.
+ //
+ BasicCommandStack commandStack = new BasicCommandStack();
+
+ // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
+ //
+ commandStack.addCommandStackListener
+ (new CommandStackListener() {
+ public void commandStackChanged(final EventObject event) {
+ getContainer().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+
+ // Try to select the affected objects.
+ //
+ Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
+ if (mostRecentCommand != null) {
+ setSelectionToViewer(mostRecentCommand.getAffectedObjects());
+ }
+ for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
+ PropertySheetPage propertySheetPage = i.next();
+ if (propertySheetPage.getControl().isDisposed()) {
+ i.remove();
+ }
+ else {
+ propertySheetPage.refresh();
+ }
+ }
+ }
+ });
+ }
+ });
+
+ // Create the editing domain with a special command stack.
+ //
+ editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ }
+
+ /**
+ * This is here for the listener to be able to call it.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void firePropertyChange(int action)
+ {
+ super.firePropertyChange(action);
+ }
+
+ /**
+ * This sets the selection into whichever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelectionToViewer(Collection<?> collection)
+ {
+ final Collection<?> theSelection = collection;
+ // Make sure it's okay.
+ //
+ if (theSelection != null && !theSelection.isEmpty()) {
+ Runnable runnable =
+ new Runnable() {
+ public void run() {
+ // Try to select the items in the current content viewer of the editor.
+ //
+ if (currentViewer != null) {
+ currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ }
+ }
+ };
+ getSite().getShell().getDisplay().asyncExec(runnable);
+ }
+ }
+
+ /**
+ * This returns the editing domain as required by the {@link IEditingDomainProvider} interface.
+ * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain}
+ * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomain getEditingDomain()
+ {
+ return editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider
+ {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object [] getElements(Object object)
+ {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object [] getChildren(Object object)
+ {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ Object parent = super.getParent(object);
+ return parent != null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getParent(Object object)
+ {
+ return null;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewerPane(ViewerPane viewerPane)
+ {
+ if (currentViewerPane != viewerPane) {
+ if (currentViewerPane != null) {
+ currentViewerPane.showFocus(false);
+ }
+ currentViewerPane = viewerPane;
+ }
+ setCurrentViewer(currentViewerPane.getViewer());
+ }
+
+ /**
+ * This makes sure that one content viewer, either for the current page or the outline view, if it has focus,
+ * is the current one.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewer(Viewer viewer)
+ {
+ // If it is changing...
+ //
+ if (currentViewer != viewer) {
+ if (selectionChangedListener == null) {
+ // Create the listener on demand.
+ //
+ selectionChangedListener =
+ new ISelectionChangedListener() {
+ // This just notifies those things that are affected by the section.
+ //
+ public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
+ setSelection(selectionChangedEvent.getSelection());
+ }
+ };
+ }
+
+ // Stop listening to the old one.
+ //
+ if (currentViewer != null) {
+ currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Start listening to the new one.
+ //
+ if (viewer != null) {
+ viewer.addSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Remember it.
+ //
+ currentViewer = viewer;
+
+ // Set the editors selection based on the current viewer's selection.
+ //
+ setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ }
+ }
+
+ /**
+ * This returns the viewer as required by the {@link IViewerProvider} interface.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Viewer getViewer()
+ {
+ return currentViewer;
+ }
+
+ /**
+ * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createContextMenuFor(StructuredViewer viewer)
+ {
+ MenuManager contextMenu = new MenuManager("#PopUp"); //$NON-NLS-1$
+ contextMenu.add(new Separator("additions")); //$NON-NLS-1$
+ contextMenu.setRemoveAllWhenShown(true);
+ contextMenu.addMenuListener(this);
+ Menu menu= contextMenu.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));
+
+ int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
+ Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
+ viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ }
+
+ /**
+ * This is the method called to load a resource into the editing domain's resource set based on the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createModel()
+ {
+ URI resourceURI = EditUIUtil.getURI(getEditorInput());
+ Exception exception = null;
+ Resource resource = null;
+ try {
+ // Load the resource through the editing domain.
+ //
+ resource = editingDomain.getResourceSet().getResource(resourceURI, true);
+ }
+ catch (Exception e) {
+ exception = e;
+ resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ }
+
+ Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
+ }
+
+ /**
+ * Returns a diagnostic describing the errors and warnings listed in the resource
+ * and the specified exception (if any).
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception)
+ {
+ if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
+ BasicDiagnostic basicDiagnostic =
+ new BasicDiagnostic
+ (Diagnostic.ERROR,
+ "org.eclipse.emf.examples.library.editor", //$NON-NLS-1$
+ 0,
+ getString("_UI_CreateModelError_message", resource.getURI()), //$NON-NLS-1$
+ new Object [] { exception == null ? (Object)resource : exception });
+ basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
+ return basicDiagnostic;
+ }
+ else if (exception != null) {
+ return
+ new BasicDiagnostic
+ (Diagnostic.ERROR,
+ "org.eclipse.emf.examples.library.editor", //$NON-NLS-1$
+ 0,
+ getString("_UI_CreateModelError_message", resource.getURI()), //$NON-NLS-1$
+ new Object[] { exception });
+ }
+ else {
+ return Diagnostic.OK_INSTANCE;
+ }
+ }
+
+ /**
+ * This is the method used by the framework to install your own controls.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void createPages()
+ {
+ // Creates the model from the editor input
+ //
+ createModel();
+
+ // Only creates the other pages if there is something that can be edited
+ //
+ if (!getEditingDomain().getResourceSet().getResources().isEmpty()) {
+ // Create a page for the selection tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), EXTLibraryEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ selectionViewer = (TreeViewer)viewerPane.getViewer();
+ selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+
+ selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ selectionViewer.setInput(editingDomain.getResourceSet());
+ selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(editingDomain.getResourceSet());
+
+ new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(selectionViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
+ }
+
+ // Create a page for the parent tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), EXTLibraryEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ parentViewer = (TreeViewer)viewerPane.getViewer();
+ parentViewer.setAutoExpandLevel(30);
+ parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
+ parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(parentViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ParentPage_label")); //$NON-NLS-1$
+ }
+
+ // This is the page for the list viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), EXTLibraryEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new ListViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ listViewer = (ListViewer)viewerPane.getViewer();
+ listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(listViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ListPage_label")); //$NON-NLS-1$
+ }
+
+ // This is the page for the tree viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), EXTLibraryEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ treeViewer = (TreeViewer)viewerPane.getViewer();
+ treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(treeViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreePage_label")); //$NON-NLS-1$
+ }
+
+ // This is the page for the table viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), EXTLibraryEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TableViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ tableViewer = (TableViewer)viewerPane.getViewer();
+
+ Table table = tableViewer.getTable();
+ TableLayout layout = new TableLayout();
+ table.setLayout(layout);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ TableColumn objectColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(3, 100, true));
+ objectColumn.setText(getString("_UI_ObjectColumn_label")); //$NON-NLS-1$
+ objectColumn.setResizable(true);
+
+ TableColumn selfColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(2, 100, true));
+ selfColumn.setText(getString("_UI_SelfColumn_label")); //$NON-NLS-1$
+ selfColumn.setResizable(true);
+
+ tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(tableViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TablePage_label")); //$NON-NLS-1$
+ }
+
+ // This is the page for the table tree viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), EXTLibraryEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+
+ Tree tree = treeViewerWithColumns.getTree();
+ tree.setLayoutData(new FillLayout());
+ tree.setHeaderVisible(true);
+ tree.setLinesVisible(true);
+
+ TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);
+ objectColumn.setText(getString("_UI_ObjectColumn_label")); //$NON-NLS-1$
+ objectColumn.setResizable(true);
+ objectColumn.setWidth(250);
+
+ TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);
+ selfColumn.setText(getString("_UI_SelfColumn_label")); //$NON-NLS-1$
+ selfColumn.setResizable(true);
+ selfColumn.setWidth(200);
+
+ treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(treeViewerWithColumns);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); //$NON-NLS-1$
+ }
+
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ setActivePage(0);
+ }
+ });
+ }
+
+ // Ensures that this editor will only display the page's tab
+ // area if there are more than one page
+ //
+ getContainer().addControlListener
+ (new ControlAdapter() {
+ boolean guard = false;
+ @Override
+ public void controlResized(ControlEvent event) {
+ if (!guard) {
+ guard = true;
+ hideTabs();
+ guard = false;
+ }
+ }
+ });
+
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+
+ /**
+ * If there is just one page in the multi-page editor part,
+ * this hides the single tab at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void hideTabs()
+ {
+ if (getPageCount() <= 1) {
+ setPageText(0, ""); //$NON-NLS-1$
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(1);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y + 6);
+ }
+ }
+ }
+
+ /**
+ * If there is more than one page in the multi-page editor part,
+ * this shows the tabs at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void showTabs()
+ {
+ if (getPageCount() > 1) {
+ setPageText(0, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y - 6);
+ }
+ }
+ }
+
+ /**
+ * This is used to track the active viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void pageChange(int pageIndex)
+ {
+ super.pageChange(pageIndex);
+
+ if (contentOutlinePage != null) {
+ handleContentOutlineSelection(contentOutlinePage.getSelection());
+ }
+ }
+
+ /**
+ * This is how the framework determines which interfaces we implement.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("rawtypes")
+ @Override
+ public Object getAdapter(Class key)
+ {
+ if (key.equals(IContentOutlinePage.class)) {
+ return showOutlineView() ? getContentOutlinePage() : null;
+ }
+ else if (key.equals(IPropertySheetPage.class)) {
+ return getPropertySheetPage();
+ }
+ else if (key.equals(IGotoMarker.class)) {
+ return this;
+ }
+ else {
+ return super.getAdapter(key);
+ }
+ }
+
+ /**
+ * This accesses a cached version of the content outliner.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IContentOutlinePage getContentOutlinePage()
+ {
+ if (contentOutlinePage == null) {
+ // The content outline is just a tree.
+ //
+ class MyContentOutlinePage extends ContentOutlinePage {
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ contentOutlineViewer = getTreeViewer();
+ contentOutlineViewer.addSelectionChangedListener(this);
+
+ // Set up the tree viewer.
+ //
+ contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ contentOutlineViewer.setInput(editingDomain.getResourceSet());
+
+ // Make sure our popups work.
+ //
+ createContextMenuFor(contentOutlineViewer);
+
+ if (!editingDomain.getResourceSet().getResources().isEmpty()) {
+ // Select the root object in the view.
+ //
+ contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ }
+ }
+
+ @Override
+ public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+ super.makeContributions(menuManager, toolBarManager, statusLineManager);
+ contentOutlineStatusLineManager = statusLineManager;
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ }
+
+ contentOutlinePage = new MyContentOutlinePage();
+
+ // Listen to selection so that we can handle it is a special way.
+ //
+ contentOutlinePage.addSelectionChangedListener
+ (new ISelectionChangedListener() {
+ // This ensures that we handle selections correctly.
+ //
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleContentOutlineSelection(event.getSelection());
+ }
+ });
+ }
+
+ return contentOutlinePage;
+ }
+
+ /**
+ * This accesses a cached version of the property sheet.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IPropertySheetPage getPropertySheetPage()
+ {
+ PropertySheetPage propertySheetPage =
+ new ExtendedPropertySheetPage(editingDomain) {
+ @Override
+ public void setSelectionToViewer(List<?> selection) {
+ EXTLibraryEditor.this.setSelectionToViewer(selection);
+ EXTLibraryEditor.this.setFocus();
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ };
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
+ propertySheetPages.add(propertySheetPage);
+
+ return propertySheetPage;
+ }
+
+ /**
+ * This deals with how we want selection in the outliner to affect the other views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void handleContentOutlineSelection(ISelection selection)
+ {
+ if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
+ if (selectedElements.hasNext()) {
+ // Get the first selected element.
+ //
+ Object selectedElement = selectedElements.next();
+
+ // If it's the selection viewer, then we want it to select the same selection as this selection.
+ //
+ if (currentViewerPane.getViewer() == selectionViewer) {
+ ArrayList<Object> selectionList = new ArrayList<Object>();
+ selectionList.add(selectedElement);
+ while (selectedElements.hasNext()) {
+ selectionList.add(selectedElements.next());
+ }
+
+ // Set the selection to the widget.
+ //
+ selectionViewer.setSelection(new StructuredSelection(selectionList));
+ }
+ else {
+ // Set the input to the widget.
+ //
+ if (currentViewerPane.getViewer().getInput() != selectedElement) {
+ currentViewerPane.getViewer().setInput(selectedElement);
+ currentViewerPane.setTitle(selectedElement);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply tests the command stack.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isDirty()
+ {
+ return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply saves the model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor)
+ {
+ // Save only resources that have actually changed.
+ //
+ final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
+ saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
+
+ // Do the work within an operation because this is a long running activity that modifies the workbench.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ // This is the method that gets invoked when the operation runs.
+ //
+ @Override
+ public void execute(IProgressMonitor monitor) {
+ // Save the resources to the file system.
+ //
+ boolean first = true;
+ for (Resource resource : editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
+ try {
+ long timeStamp = resource.getTimeStamp();
+ resource.save(saveOptions);
+ if (resource.getTimeStamp() != timeStamp) {
+ savedResources.add(resource);
+ }
+ }
+ catch (Exception exception) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ first = false;
+ }
+ }
+ }
+ };
+
+ updateProblemIndication = false;
+ try {
+ // This runs the options, and shows progress.
+ //
+ new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);
+
+ // Refresh the necessary state.
+ //
+ ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ catch (Exception exception) {
+ // Something went wrong that shouldn't.
+ //
+ EXTLibraryEditorPlugin.INSTANCE.log(exception);
+ }
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+
+ /**
+ * This returns whether something has been persisted to the URI of the specified resource.
+ * The implementation uses the URI converter from the editor's resource set to try to open an input stream.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean isPersisted(Resource resource)
+ {
+ boolean result = false;
+ try {
+ InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ if (stream != null) {
+ result = true;
+ stream.close();
+ }
+ }
+ catch (IOException e) {
+ // Ignore
+ }
+ return result;
+ }
+
+ /**
+ * This always returns true because it is not currently supported.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isSaveAsAllowed()
+ {
+ return true;
+ }
+
+ /**
+ * This also changes the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void doSaveAs()
+ {
+ SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
+ saveAsDialog.open();
+ IPath path = saveAsDialog.getResult();
+ if (path != null) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if (file != null) {
+ doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void doSaveAs(URI uri, IEditorInput editorInput)
+ {
+ (editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ IProgressMonitor progressMonitor =
+ getActionBars().getStatusLineManager() != null ?
+ getActionBars().getStatusLineManager().getProgressMonitor() :
+ new NullProgressMonitor();
+ doSave(progressMonitor);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void gotoMarker(IMarker marker)
+ {
+ List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
+ if (!targetObjects.isEmpty()) {
+ setSelectionToViewer(targetObjects);
+ }
+ }
+
+ /**
+ * This is called during startup.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput editorInput)
+ {
+ setSite(site);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ site.setSelectionProvider(this);
+ site.getPage().addPartListener(partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setFocus()
+ {
+ if (currentViewerPane != null) {
+ currentViewerPane.setFocus();
+ }
+ else {
+ getControl(getActivePage()).setFocus();
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addSelectionChangedListener(ISelectionChangedListener listener)
+ {
+ selectionChangedListeners.add(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeSelectionChangedListener(ISelectionChangedListener listener)
+ {
+ selectionChangedListeners.remove(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ISelection getSelection()
+ {
+ return editorSelection;
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection.
+ * Calling this result will notify the listeners.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelection(ISelection selection)
+ {
+ editorSelection = selection;
+
+ for (ISelectionChangedListener listener : selectionChangedListeners) {
+ listener.selectionChanged(new SelectionChangedEvent(this, selection));
+ }
+ setStatusLineManager(selection);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStatusLineManager(ISelection selection)
+ {
+ IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
+ contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+
+ if (statusLineManager != null) {
+ if (selection instanceof IStructuredSelection) {
+ Collection<?> collection = ((IStructuredSelection)selection).toList();
+ switch (collection.size()) {
+ case 0: {
+ statusLineManager.setMessage(getString("_UI_NoObjectSelected")); //$NON-NLS-1$
+ break;
+ }
+ case 1: {
+ String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); //$NON-NLS-1$
+ break;
+ }
+ default: {
+ statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); //$NON-NLS-1$
+ break;
+ }
+ }
+ }
+ else {
+ statusLineManager.setMessage(""); //$NON-NLS-1$
+ }
+ }
+ }
+
+ /**
+ * This looks up a string in the plugin's plugin.properties file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key)
+ {
+ return EXTLibraryEditorPlugin.INSTANCE.getString(key);
+ }
+
+ /**
+ * This looks up a string in plugin.properties, making a substitution.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key, Object s1)
+ {
+ return EXTLibraryEditorPlugin.INSTANCE.getString(key, new Object [] { s1 });
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void menuAboutToShow(IMenuManager menuManager)
+ {
+ ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomainActionBarContributor getActionBarContributor()
+ {
+ return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IActionBars getActionBars()
+ {
+ return getActionBarContributor().getActionBars();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AdapterFactory getAdapterFactory()
+ {
+ return adapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void dispose()
+ {
+ updateProblemIndication = false;
+
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+
+ getSite().getPage().removePartListener(partListener);
+
+ adapterFactory.dispose();
+
+ if (getActionBarContributor().getActiveEditor() == this) {
+ getActionBarContributor().setActiveEditor(null);
+ }
+
+ for (PropertySheetPage propertySheetPage : propertySheetPages) {
+ propertySheetPage.dispose();
+ }
+
+ if (contentOutlinePage != null) {
+ contentOutlinePage.dispose();
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * Returns whether the outline view should be presented to the user.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean showOutlineView()
+ {
+ return true;
+ }
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryEditorPlugin.java b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryEditorPlugin.java
new file mode 100644
index 000000000..aeb97add8
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryEditorPlugin.java
@@ -0,0 +1,107 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.presentation;
+
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+
+/**
+ * This is the central singleton for the EXTLibrary editor plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class EXTLibraryEditorPlugin extends EMFPlugin
+{
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EXTLibraryEditorPlugin INSTANCE = new EXTLibraryEditorPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibraryEditorPlugin()
+ {
+ super
+ (new ResourceLocator [] {
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator()
+ {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin()
+ {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipseUIPlugin
+ {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation()
+ {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryModelWizard.java b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryModelWizard.java
new file mode 100644
index 000000000..aa90b9756
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryModelWizard.java
@@ -0,0 +1,658 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.presentation;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.StringTokenizer;
+
+import org.eclipse.emf.common.CommonPlugin;
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.ModifyEvent;
+
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.ISetSelectionTarget;
+
+import org.eclipse.emf.examples.extlibrary.EXTLibraryFactory;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.provider.EXTLibraryEditPlugin;
+
+import org.eclipse.core.runtime.Path;
+
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+
+
+/**
+ * This is a simple wizard for creating a new model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EXTLibraryModelWizard extends Wizard implements INewWizard
+{
+ /**
+ * The supported extensions for created files.
+ * <!-- begin-user-doc -->
+ * @since 2.4
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<String> FILE_EXTENSIONS =
+ Collections.unmodifiableList(Arrays.asList(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_EXTLibraryEditorFilenameExtensions").split("\\s*,\\s*"))); //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * A formatted list of supported file extensions, suitable for display.
+ * <!-- begin-user-doc -->
+ * @since 2.4
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String FORMATTED_FILE_EXTENSIONS =
+ EXTLibraryEditorPlugin.INSTANCE.getString("_UI_EXTLibraryEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", ");
+
+ /**
+ * This caches an instance of the model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EXTLibraryPackage extLibraryPackage = EXTLibraryPackage.eINSTANCE;
+
+ /**
+ * This caches an instance of the model factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EXTLibraryFactory extLibraryFactory = extLibraryPackage.getEXTLibraryFactory();
+
+ /**
+ * This is the file creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EXTLibraryModelWizardNewFileCreationPage newFileCreationPage;
+
+ /**
+ * This is the initial object creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EXTLibraryModelWizardInitialObjectCreationPage initialObjectCreationPage;
+
+ /**
+ * Remember the selection during initialization for populating the default container.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStructuredSelection selection;
+
+ /**
+ * Remember the workbench during initialization.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IWorkbench workbench;
+
+ /**
+ * Caches the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<String> initialObjectNames;
+
+ /**
+ * This just records the information.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection)
+ {
+ this.workbench = workbench;
+ this.selection = selection;
+ setWindowTitle(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); //$NON-NLS-1$
+ setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(EXTLibraryEditorPlugin.INSTANCE.getImage("full/wizban/NewEXTLibrary"))); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<String> getInitialObjectNames()
+ {
+ if (initialObjectNames == null) {
+ initialObjectNames = new ArrayList<String>();
+ for (EClassifier eClassifier : extLibraryPackage.getEClassifiers()) {
+ if (eClassifier instanceof EClass) {
+ EClass eClass = (EClass)eClassifier;
+ if (!eClass.isAbstract()) {
+ initialObjectNames.add(eClass.getName());
+ }
+ }
+ }
+ Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
+ }
+ return initialObjectNames;
+ }
+
+ /**
+ * Create a new model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EObject createInitialModel()
+ {
+ EClass eClass = (EClass)extLibraryPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
+ EObject rootObject = extLibraryFactory.create(eClass);
+ return rootObject;
+ }
+
+ /**
+ * Do the work after everything is specified.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean performFinish()
+ {
+ try {
+ // Remember the file.
+ //
+ final IFile modelFile = getModelFile();
+
+ // Do the work within an operation.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ @Override
+ protected void execute(IProgressMonitor progressMonitor) {
+ try {
+ // Create a resource set
+ //
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ // Get the URI of the model file.
+ //
+ URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
+
+ // Create a resource for this file.
+ //
+ Resource resource = resourceSet.createResource(fileURI, EXTLibraryPackage.eCONTENT_TYPE);
+
+ // Add the initial model object to the contents.
+ //
+ EObject rootObject = createInitialModel();
+ if (rootObject != null) {
+ resource.getContents().add(rootObject);
+ }
+
+ // Save the contents of the resource to the file system.
+ //
+ Map<Object, Object> options = new HashMap<Object, Object>();
+ options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
+ resource.save(options);
+ }
+ catch (Exception exception) {
+ EXTLibraryEditorPlugin.INSTANCE.log(exception);
+ }
+ finally {
+ progressMonitor.done();
+ }
+ }
+ };
+
+ getContainer().run(false, false, operation);
+
+ // Select the new file resource in the current view.
+ //
+ IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbenchWindow.getActivePage();
+ final IWorkbenchPart activePart = page.getActivePart();
+ if (activePart instanceof ISetSelectionTarget) {
+ final ISelection targetSelection = new StructuredSelection(modelFile);
+ getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ ((ISetSelectionTarget)activePart).selectReveal(targetSelection);
+ }
+ });
+ }
+
+ // Open an editor on the new file.
+ //
+ try {
+ page.openEditor
+ (new FileEditorInput(modelFile),
+ workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
+ }
+ catch (PartInitException exception) {
+ MessageDialog.openError(workbenchWindow.getShell(), EXTLibraryEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); //$NON-NLS-1$
+ return false;
+ }
+
+ return true;
+ }
+ catch (Exception exception) {
+ EXTLibraryEditorPlugin.INSTANCE.log(exception);
+ return false;
+ }
+ }
+
+ /**
+ * This is the one page of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class EXTLibraryModelWizardNewFileCreationPage extends WizardNewFileCreationPage
+ {
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibraryModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection)
+ {
+ super(pageId, selection);
+ }
+
+ /**
+ * The framework calls this to see if the file is correct.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean validatePage()
+ {
+ if (super.validatePage()) {
+ String extension = new Path(getFileName()).getFileExtension();
+ if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
+ String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; //$NON-NLS-1$ //$NON-NLS-2$
+ setErrorMessage(EXTLibraryEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile()
+ {
+ return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
+ }
+ }
+
+ /**
+ * This is the page where the type of object to create is selected.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class EXTLibraryModelWizardInitialObjectCreationPage extends WizardPage
+ {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo initialObjectField;
+
+ /**
+ * @generated
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected List<String> encodings;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo encodingField;
+
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibraryModelWizardInitialObjectCreationPage(String pageId)
+ {
+ super(pageId);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createControl(Composite parent)
+ {
+ Composite composite = new Composite(parent, SWT.NONE); {
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ layout.verticalSpacing = 12;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.grabExcessVerticalSpace = true;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+ }
+
+ Label containerLabel = new Label(composite, SWT.LEFT);
+ {
+ containerLabel.setText(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_ModelObject")); //$NON-NLS-1$
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ containerLabel.setLayoutData(data);
+ }
+
+ initialObjectField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ initialObjectField.setLayoutData(data);
+ }
+
+ for (String objectName : getInitialObjectNames()) {
+ initialObjectField.add(getLabel(objectName));
+ }
+
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.select(0);
+ }
+ initialObjectField.addModifyListener(validator);
+
+ Label encodingLabel = new Label(composite, SWT.LEFT);
+ {
+ encodingLabel.setText(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); //$NON-NLS-1$
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ encodingLabel.setLayoutData(data);
+ }
+ encodingField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ encodingField.setLayoutData(data);
+ }
+
+ for (String encoding : getEncodings()) {
+ encodingField.add(encoding);
+ }
+
+ encodingField.select(0);
+ encodingField.addModifyListener(validator);
+
+ setPageComplete(validatePage());
+ setControl(composite);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModifyListener validator =
+ new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ setPageComplete(validatePage());
+ }
+ };
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean validatePage()
+ {
+ return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setVisible(boolean visible)
+ {
+ super.setVisible(visible);
+ if (visible) {
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.clearSelection();
+ encodingField.setFocus();
+ }
+ else {
+ encodingField.clearSelection();
+ initialObjectField.setFocus();
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getInitialObjectName()
+ {
+ String label = initialObjectField.getText();
+
+ for (String name : getInitialObjectNames()) {
+ if (getLabel(name).equals(label)) {
+ return name;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getEncoding()
+ {
+ return encodingField.getText();
+ }
+
+ /**
+ * Returns the label for the specified type name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected String getLabel(String typeName)
+ {
+ try {
+ return EXTLibraryEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ catch(MissingResourceException mre) {
+ EXTLibraryEditorPlugin.INSTANCE.log(mre);
+ }
+ return typeName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<String> getEncodings()
+ {
+ if (encodings == null) {
+ encodings = new ArrayList<String>();
+ for (StringTokenizer stringTokenizer = new StringTokenizer(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) //$NON-NLS-1$
+ {
+ encodings.add(stringTokenizer.nextToken());
+ }
+ }
+ return encodings;
+ }
+ }
+
+ /**
+ * The framework calls this to create the contents of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void addPages()
+ {
+ // Create a page, set the title, and the initial model file name.
+ //
+ newFileCreationPage = new EXTLibraryModelWizardNewFileCreationPage("Whatever", selection); //$NON-NLS-1$
+ newFileCreationPage.setTitle(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_EXTLibraryModelWizard_label")); //$NON-NLS-1$
+ newFileCreationPage.setDescription(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_EXTLibraryModelWizard_description")); //$NON-NLS-1$
+ newFileCreationPage.setFileName(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_EXTLibraryEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); //$NON-NLS-1$ //$NON-NLS-2$
+ addPage(newFileCreationPage);
+
+ // Try and get the resource selection to determine a current directory for the file dialog.
+ //
+ if (selection != null && !selection.isEmpty()) {
+ // Get the resource...
+ //
+ Object selectedElement = selection.iterator().next();
+ if (selectedElement instanceof IResource) {
+ // Get the resource parent, if its a file.
+ //
+ IResource selectedResource = (IResource)selectedElement;
+ if (selectedResource.getType() == IResource.FILE) {
+ selectedResource = selectedResource.getParent();
+ }
+
+ // This gives us a directory...
+ //
+ if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
+ // Set this for the container.
+ //
+ newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
+
+ // Make up a unique new name here.
+ //
+ String defaultModelBaseFilename = EXTLibraryEditorPlugin.INSTANCE.getString("_UI_EXTLibraryEditorFilenameDefaultBase"); //$NON-NLS-1$
+ String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0);
+ String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; //$NON-NLS-1$
+ for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) {
+ modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; //$NON-NLS-1$
+ }
+ newFileCreationPage.setFileName(modelFilename);
+ }
+ }
+ }
+ initialObjectCreationPage = new EXTLibraryModelWizardInitialObjectCreationPage("Whatever2"); //$NON-NLS-1$
+ initialObjectCreationPage.setTitle(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_EXTLibraryModelWizard_label")); //$NON-NLS-1$
+ initialObjectCreationPage.setDescription(EXTLibraryEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); //$NON-NLS-1$
+ addPage(initialObjectCreationPage);
+ }
+
+ /**
+ * Get the file from the page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile()
+ {
+ return newFileCreationPage.getModelFile();
+ }
+
+}
diff --git a/tutorial/org.eclipse.emf.examples.library/.classpath b/tutorial/org.eclipse.emf.examples.library/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tutorial/org.eclipse.emf.examples.library/.project b/tutorial/org.eclipse.emf.examples.library/.project
new file mode 100644
index 000000000..2cd9f6065
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.examples.library</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tutorial/org.eclipse.emf.examples.library/.settings/org.eclipse.jdt.core.prefs b/tutorial/org.eclipse.emf.examples.library/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..d29b0f382
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Wed Nov 08 10:51:59 EST 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tutorial/org.eclipse.emf.examples.library/META-INF/MANIFEST.MF b/tutorial/org.eclipse.emf.examples.library/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..0b7c740bf
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.examples.library;singleton:=true
+Bundle-Version: 2.5.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.emf.examples.extlibrary,
+ org.eclipse.emf.examples.extlibrary.impl,
+ org.eclipse.emf.examples.extlibrary.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport
+Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
diff --git a/tutorial/org.eclipse.emf.examples.library/about.html b/tutorial/org.eclipse.emf.examples.library/about.html
new file mode 100644
index 000000000..1b8f94080
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tutorial/org.eclipse.emf.examples.library/build.properties b/tutorial/org.eclipse.emf.examples.library/build.properties
new file mode 100644
index 000000000..833a42733
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/build.properties
@@ -0,0 +1,9 @@
+bin.includes = model/,\
+ .,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+source.. = src/
+output.. = bin/
+src.includes = about.html
diff --git a/tutorial/org.eclipse.emf.examples.library/model/extlibrary.ecore b/tutorial/org.eclipse.emf.examples.library/model/extlibrary.ecore
new file mode 100644
index 000000000..4d637438a
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/model/extlibrary.ecore
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="extlibrary" nsURI="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0"
+ nsPrefix="extlib">
+ <eClassifiers xsi:type="ecore:EClass" name="Book" eSuperTypes="#//CirculatingItem">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="pages" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
+ defaultValueLiteral="100"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="category" eType="#//BookCategory"
+ unsettable="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="author" lowerBound="1"
+ eType="#//Writer" eOpposite="#//Writer/books"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Library" eSuperTypes="#//Addressable">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="writers" upperBound="-1"
+ eType="#//Writer" volatile="true" transient="true" derived="true" containment="true"
+ resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="employees" upperBound="-1"
+ eType="#//Employee" volatile="true" transient="true" derived="true" containment="true"
+ resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="borrowers" upperBound="-1"
+ eType="#//Borrower" volatile="true" transient="true" derived="true" containment="true"
+ resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stock" ordered="false"
+ upperBound="-1" eType="#//Item" containment="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="books" ordered="false"
+ upperBound="-1" eType="#//Book" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="branches" upperBound="-1"
+ eType="#//Library" containment="true" eOpposite="#//Library/parentBranch"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parentBranch" eType="#//Library"
+ eOpposite="#//Library/branches"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="people" upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="group"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Writer" eSuperTypes="#//Person">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ volatile="true" transient="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
+ eType="#//Book" eOpposite="#//Book/author"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="BookCategory">
+ <eLiterals name="Mystery"/>
+ <eLiterals name="ScienceFiction" value="1"/>
+ <eLiterals name="Biography" value="2"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Item" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="publicationDate" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Lendable" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="copies" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="borrowers" ordered="false"
+ upperBound="-1" eType="#//Borrower" eOpposite="#//Borrower/borrowed"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="CirculatingItem" abstract="true" eSuperTypes="#//Item #//Lendable"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Periodical" abstract="true" eSuperTypes="#//Item">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="issuesPerYear" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AudioVisualItem" abstract="true" eSuperTypes="#//CirculatingItem">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="minutesLength" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="damaged" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="BookOnTape" eSuperTypes="#//AudioVisualItem">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="reader" eType="#//Person"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="author" eType="#//Writer"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="VideoCassette" eSuperTypes="#//AudioVisualItem">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="cast" upperBound="-1" eType="#//Person"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Borrower" eSuperTypes="#//Person">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="borrowed" upperBound="-1"
+ eType="#//Lendable" eOpposite="#//Lendable/borrowers"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Person" eSuperTypes="#//Addressable">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="firstName" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="lastName" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Employee" eSuperTypes="#//Person">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="manager" eType="#//Employee"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Addressable" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="address" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/tutorial/org.eclipse.emf.examples.library/model/extlibrary.genmodel b/tutorial/org.eclipse.emf.examples.library/model/extlibrary.genmodel
new file mode 100644
index 000000000..d616143c0
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/model/extlibrary.genmodel
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.emf.examples.library/src" editDirectory="/org.eclipse.emf.examples.library.edit/src"
+ editorDirectory="/org.eclipse.emf.examples.library.editor/src" modelPluginID="org.eclipse.emf.examples.library"
+ runtimeJar="true" modelName="EXTLibrary" editPluginClass="org.eclipse.emf.examples.extlibrary.provider.EXTLibraryEditPlugin"
+ editorPluginClass="org.eclipse.emf.examples.extlibrary.presentation.EXTLibraryEditorPlugin"
+ nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ testsDirectory="" booleanFlagsField="" importerID="org.eclipse.emf.importer.ecore"
+ containmentProxies="true" complianceLevel="6.0" language="en" operationReflection="true">
+ <foreignModel>extlibrary.ecore</foreignModel>
+ <genPackages prefix="EXTLibrary" basePackage="org.eclipse.emf.examples" resource="XMI"
+ disposableProviderFactory="true" contentTypeIdentifier="extendedLibrary" ecorePackage="extlibrary.ecore#/">
+ <genEnums ecoreEnum="extlibrary.ecore#//BookCategory">
+ <genEnumLiterals ecoreEnumLiteral="extlibrary.ecore#//BookCategory/Mystery"/>
+ <genEnumLiterals ecoreEnumLiteral="extlibrary.ecore#//BookCategory/ScienceFiction"/>
+ <genEnumLiterals ecoreEnumLiteral="extlibrary.ecore#//BookCategory/Biography"/>
+ </genEnums>
+ <genClasses ecoreClass="extlibrary.ecore#//Book" labelFeature="#//extlibrary/Book/title">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Book/title"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Book/pages"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Book/category"/>
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//Book/author"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//Library">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Library/name"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/writers"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/employees"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/borrowers"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/stock"/>
+ <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/books"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/branches"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/parentBranch"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Library/people"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//Writer">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Writer/name"/>
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//Writer/books"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="extlibrary.ecore#//Item">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Item/publicationDate"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//Lendable">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Lendable/copies"/>
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//Lendable/borrowers"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//CirculatingItem"/>
+ <genClasses image="false" ecoreClass="extlibrary.ecore#//Periodical" labelFeature="#//extlibrary/Periodical/title">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Periodical/title"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Periodical/issuesPerYear"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="extlibrary.ecore#//AudioVisualItem" labelFeature="#//extlibrary/AudioVisualItem/title">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//AudioVisualItem/title"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//AudioVisualItem/minutesLength"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//AudioVisualItem/damaged"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//BookOnTape" labelFeature="#//extlibrary/AudioVisualItem/title">
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//BookOnTape/reader"/>
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//BookOnTape/author"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//VideoCassette" labelFeature="#//extlibrary/AudioVisualItem/title">
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//VideoCassette/cast"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//Borrower" labelFeature="#//extlibrary/Person/lastName">
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//Borrower/borrowed"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//Person" labelFeature="#//extlibrary/Person/lastName">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Person/firstName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Person/lastName"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//Employee" labelFeature="#//extlibrary/Person/lastName">
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//Employee/manager"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//Addressable">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Addressable/address"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/tutorial/org.eclipse.emf.examples.library/plugin.properties b/tutorial/org.eclipse.emf.examples.library/plugin.properties
new file mode 100644
index 000000000..fa77047af
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/plugin.properties
@@ -0,0 +1,17 @@
+# /**
+# * Copyright (c) 2002-2008 IBM Corporation and others.
+# * All rights reserved. This program and the accompanying materials
+# * are made available under the terms of the Eclipse Public License v1.0
+# * which accompanies this distribution, and is available at
+# * http://www.eclipse.org/legal/epl-v10.html
+# *
+# * Contributors:
+# * IBM - Initial API and implementation
+# */
+
+# NLS_MESSAGEFORMAT_VAR
+
+pluginName = EMF Extended Library Model Example
+providerName = Eclipse Modeling Project
+
+_UI_EXTLibrary_content_type = Extended Library File
diff --git a/tutorial/org.eclipse.emf.examples.library/plugin.xml b/tutorial/org.eclipse.emf.examples.library/plugin.xml
new file mode 100644
index 000000000..604468d12
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/plugin.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0"
+ class="org.eclipse.emf.examples.extlibrary.EXTLibraryPackage"
+ genModel="model/extlibrary.genmodel"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.eclipse.emf.examples.extlibrary.util.EXTLibraryResourceFactoryImpl"
+ type="extlibrary">
+ </parser>
+ </extension>
+</plugin>
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Addressable.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Addressable.java
new file mode 100644
index 000000000..03a8b0a3b
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Addressable.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+import org.eclipse.emf.ecore.EObject;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Addressable</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Addressable#getAddress <em>Address</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getAddressable()
+ * @model interface="true" abstract="true"
+ * @generated
+ */
+public interface Addressable extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Address</em>' attribute.
+ * @see #setAddress(String)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getAddressable_Address()
+ * @model
+ * @generated
+ */
+ String getAddress();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Addressable#getAddress <em>Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Address</em>' attribute.
+ * @see #getAddress()
+ * @generated
+ */
+ void setAddress(String value);
+
+} // Addressable
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/AudioVisualItem.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/AudioVisualItem.java
new file mode 100644
index 000000000..d66886d21
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/AudioVisualItem.java
@@ -0,0 +1,100 @@
+/**
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Audo Visual Item</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.AudioVisualItem#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.AudioVisualItem#getMinutesLength <em>Minutes Length</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.AudioVisualItem#isDamaged <em>Damaged</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getAudioVisualItem()
+ * @model abstract="true"
+ * @generated
+ */
+public interface AudioVisualItem extends CirculatingItem
+{
+ /**
+ * Returns the value of the '<em><b>Title</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Title</em>' attribute.
+ * @see #setTitle(String)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getAudioVisualItem_Title()
+ * @model
+ * @generated
+ */
+ String getTitle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.AudioVisualItem#getTitle <em>Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Title</em>' attribute.
+ * @see #getTitle()
+ * @generated
+ */
+ void setTitle(String value);
+
+ /**
+ * Returns the value of the '<em><b>Minutes Length</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Minutes Length</em>' attribute.
+ * @see #setMinutesLength(int)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getAudioVisualItem_MinutesLength()
+ * @model required="true"
+ * @generated
+ */
+ int getMinutesLength();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.AudioVisualItem#getMinutesLength <em>Minutes Length</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Minutes Length</em>' attribute.
+ * @see #getMinutesLength()
+ * @generated
+ */
+ void setMinutesLength(int value);
+
+ /**
+ * Returns the value of the '<em><b>Damaged</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Damaged</em>' attribute.
+ * @see #setDamaged(boolean)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getAudioVisualItem_Damaged()
+ * @model
+ * @generated
+ */
+ boolean isDamaged();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.AudioVisualItem#isDamaged <em>Damaged</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Damaged</em>' attribute.
+ * @see #isDamaged()
+ * @generated
+ */
+ void setDamaged(boolean value);
+
+} // AudioVisualItem
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Book.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Book.java
new file mode 100644
index 000000000..dad814c10
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Book.java
@@ -0,0 +1,156 @@
+/**
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Book</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Book#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Book#getPages <em>Pages</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Book#getCategory <em>Category</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Book#getAuthor <em>Author</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getBook()
+ * @model
+ * @generated
+ */
+public interface Book extends CirculatingItem
+{
+ /**
+ * Returns the value of the '<em><b>Title</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Title</em>' attribute.
+ * @see #setTitle(String)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getBook_Title()
+ * @model
+ * @generated
+ */
+ String getTitle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Book#getTitle <em>Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Title</em>' attribute.
+ * @see #getTitle()
+ * @generated
+ */
+ void setTitle(String value);
+
+ /**
+ * Returns the value of the '<em><b>Pages</b></em>' attribute.
+ * The default value is <code>"100"</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Pages</em>' attribute.
+ * @see #setPages(int)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getBook_Pages()
+ * @model default="100"
+ * @generated
+ */
+ int getPages();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Book#getPages <em>Pages</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Pages</em>' attribute.
+ * @see #getPages()
+ * @generated
+ */
+ void setPages(int value);
+
+ /**
+ * Returns the value of the '<em><b>Category</b></em>' attribute.
+ * The literals are from the enumeration {@link org.eclipse.emf.examples.extlibrary.BookCategory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Category</em>' attribute.
+ * @see org.eclipse.emf.examples.extlibrary.BookCategory
+ * @see #isSetCategory()
+ * @see #unsetCategory()
+ * @see #setCategory(BookCategory)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getBook_Category()
+ * @model unsettable="true"
+ * @generated
+ */
+ BookCategory getCategory();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Book#getCategory <em>Category</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Category</em>' attribute.
+ * @see org.eclipse.emf.examples.extlibrary.BookCategory
+ * @see #isSetCategory()
+ * @see #unsetCategory()
+ * @see #getCategory()
+ * @generated
+ */
+ void setCategory(BookCategory value);
+
+ /**
+ * Unsets the value of the '{@link org.eclipse.emf.examples.extlibrary.Book#getCategory <em>Category</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetCategory()
+ * @see #getCategory()
+ * @see #setCategory(BookCategory)
+ * @generated
+ */
+ void unsetCategory();
+
+ /**
+ * Returns whether the value of the '{@link org.eclipse.emf.examples.extlibrary.Book#getCategory <em>Category</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Category</em>' attribute is set.
+ * @see #unsetCategory()
+ * @see #getCategory()
+ * @see #setCategory(BookCategory)
+ * @generated
+ */
+ boolean isSetCategory();
+
+ /**
+ * Returns the value of the '<em><b>Author</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.examples.extlibrary.Writer#getBooks <em>Books</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Author</em>' reference.
+ * @see #setAuthor(Writer)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getBook_Author()
+ * @see org.eclipse.emf.examples.extlibrary.Writer#getBooks
+ * @model opposite="books" required="true"
+ * @generated
+ */
+ Writer getAuthor();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Book#getAuthor <em>Author</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Author</em>' reference.
+ * @see #getAuthor()
+ * @generated
+ */
+ void setAuthor(Writer value);
+
+} // Book
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/BookCategory.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/BookCategory.java
new file mode 100644
index 000000000..8571dc6c3
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/BookCategory.java
@@ -0,0 +1,238 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Book Category</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getBookCategory()
+ * @model
+ * @generated
+ */
+public enum BookCategory implements Enumerator
+{
+ /**
+ * The '<em><b>Mystery</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #MYSTERY
+ * @generated
+ * @ordered
+ */
+ MYSTERY_LITERAL(0, "Mystery", "Mystery"),
+ /**
+ * The '<em><b>Science Fiction</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #SCIENCE_FICTION
+ * @generated
+ * @ordered
+ */
+ SCIENCE_FICTION_LITERAL(1, "ScienceFiction", "ScienceFiction"),
+ /**
+ * The '<em><b>Biography</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #BIOGRAPHY
+ * @generated
+ * @ordered
+ */
+ BIOGRAPHY_LITERAL(2, "Biography", "Biography");
+ /**
+ * The '<em><b>Mystery</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #MYSTERY_LITERAL
+ * @model name="Mystery"
+ * @generated
+ * @ordered
+ */
+ public static final int MYSTERY = 0;
+
+ /**
+ * The '<em><b>Science Fiction</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #SCIENCE_FICTION_LITERAL
+ * @model name="ScienceFiction"
+ * @generated
+ * @ordered
+ */
+ public static final int SCIENCE_FICTION = 1;
+
+ /**
+ * The '<em><b>Biography</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #BIOGRAPHY_LITERAL
+ * @model name="Biography"
+ * @generated
+ * @ordered
+ */
+ public static final int BIOGRAPHY = 2;
+
+ /**
+ * An array of all the '<em><b>Book Category</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final BookCategory[] VALUES_ARRAY =
+ new BookCategory[] {
+ MYSTERY_LITERAL,
+ SCIENCE_FICTION_LITERAL,
+ BIOGRAPHY_LITERAL,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Book Category</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<BookCategory> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Book Category</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static BookCategory get(String literal)
+ {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ BookCategory result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Book Category</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static BookCategory getByName(String name)
+ {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ BookCategory result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Book Category</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static BookCategory get(int value)
+ {
+ switch (value) {
+ case MYSTERY: return MYSTERY_LITERAL;
+ case SCIENCE_FICTION: return SCIENCE_FICTION_LITERAL;
+ case BIOGRAPHY: return BIOGRAPHY_LITERAL;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private BookCategory(int value, String name, String literal)
+ {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue()
+ {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral()
+ {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ return literal;
+ }
+}
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/BookOnTape.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/BookOnTape.java
new file mode 100644
index 000000000..f4fa4183a
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/BookOnTape.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Book On Tape</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.BookOnTape#getReader <em>Reader</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.BookOnTape#getAuthor <em>Author</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getBookOnTape()
+ * @model
+ * @generated
+ */
+public interface BookOnTape extends AudioVisualItem
+{
+ /**
+ * Returns the value of the '<em><b>Reader</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Reader</em>' reference.
+ * @see #setReader(Person)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getBookOnTape_Reader()
+ * @model
+ * @generated
+ */
+ Person getReader();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.BookOnTape#getReader <em>Reader</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Reader</em>' reference.
+ * @see #getReader()
+ * @generated
+ */
+ void setReader(Person value);
+
+ /**
+ * Returns the value of the '<em><b>Author</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Author</em>' reference.
+ * @see #setAuthor(Writer)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getBookOnTape_Author()
+ * @model
+ * @generated
+ */
+ Writer getAuthor();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.BookOnTape#getAuthor <em>Author</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Author</em>' reference.
+ * @see #getAuthor()
+ * @generated
+ */
+ void setAuthor(Writer value);
+
+} // BookOnTape
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Borrower.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Borrower.java
new file mode 100644
index 000000000..04e78e8c5
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Borrower.java
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+import org.eclipse.emf.common.util.EList;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Borrower</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Borrower#getBorrowed <em>Borrowed</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getBorrower()
+ * @model
+ * @generated
+ */
+public interface Borrower extends Person
+{
+ /**
+ * Returns the value of the '<em><b>Borrowed</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.examples.extlibrary.Lendable}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.examples.extlibrary.Lendable#getBorrowers <em>Borrowers</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Borrowed</em>' reference list.
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getBorrower_Borrowed()
+ * @see org.eclipse.emf.examples.extlibrary.Lendable#getBorrowers
+ * @model opposite="borrowers"
+ * @generated
+ */
+ EList<Lendable> getBorrowed();
+
+} // Borrower
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/CirculatingItem.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/CirculatingItem.java
new file mode 100644
index 000000000..fbb24101c
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/CirculatingItem.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Circulating Item</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getCirculatingItem()
+ * @model abstract="true"
+ * @generated
+ */
+public interface CirculatingItem extends Item, Lendable
+{
+ // No additional features
+} // CirculatingItem
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/EXTLibraryFactory.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/EXTLibraryFactory.java
new file mode 100644
index 000000000..350e56d55
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/EXTLibraryFactory.java
@@ -0,0 +1,116 @@
+/**
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+import org.eclipse.emf.ecore.EFactory;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage
+ * @generated
+ */
+public interface EXTLibraryFactory extends EFactory
+{
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EXTLibraryFactory eINSTANCE = org.eclipse.emf.examples.extlibrary.impl.EXTLibraryFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Book</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Book</em>'.
+ * @generated
+ */
+ Book createBook();
+
+ /**
+ * Returns a new object of class '<em>Library</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Library</em>'.
+ * @generated
+ */
+ Library createLibrary();
+
+ /**
+ * Returns a new object of class '<em>Writer</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Writer</em>'.
+ * @generated
+ */
+ Writer createWriter();
+
+ /**
+ * Returns a new object of class '<em>Book On Tape</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Book On Tape</em>'.
+ * @generated
+ */
+ BookOnTape createBookOnTape();
+
+ /**
+ * Returns a new object of class '<em>Video Cassette</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Video Cassette</em>'.
+ * @generated
+ */
+ VideoCassette createVideoCassette();
+
+ /**
+ * Returns a new object of class '<em>Borrower</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Borrower</em>'.
+ * @generated
+ */
+ Borrower createBorrower();
+
+ /**
+ * Returns a new object of class '<em>Person</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Person</em>'.
+ * @generated
+ */
+ Person createPerson();
+
+ /**
+ * Returns a new object of class '<em>Employee</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Employee</em>'.
+ * @generated
+ */
+ Employee createEmployee();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ EXTLibraryPackage getEXTLibraryPackage();
+
+} //EXTLibraryFactory
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/EXTLibraryPackage.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/EXTLibraryPackage.java
new file mode 100644
index 000000000..5d21d536f
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/EXTLibraryPackage.java
@@ -0,0 +1,1971 @@
+/**
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface EXTLibraryPackage extends EPackage
+{
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "extlibrary"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "extlib"; //$NON-NLS-1$
+
+ /**
+ * The package content type ID.
+ * <!-- begin-user-doc -->
+ * @since 2.4
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eCONTENT_TYPE = "extendedLibrary"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EXTLibraryPackage eINSTANCE = org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.impl.ItemImpl <em>Item</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.ItemImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getItem()
+ * @generated
+ */
+ int ITEM = 3;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ITEM__PUBLICATION_DATE = 0;
+
+ /**
+ * The number of structural features of the '<em>Item</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ITEM_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Item</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ITEM_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.impl.CirculatingItemImpl <em>Circulating Item</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.CirculatingItemImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getCirculatingItem()
+ * @generated
+ */
+ int CIRCULATING_ITEM = 5;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CIRCULATING_ITEM__PUBLICATION_DATE = ITEM__PUBLICATION_DATE;
+
+ /**
+ * The feature id for the '<em><b>Copies</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CIRCULATING_ITEM__COPIES = ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CIRCULATING_ITEM__BORROWERS = ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Circulating Item</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CIRCULATING_ITEM_FEATURE_COUNT = ITEM_FEATURE_COUNT + 2;
+
+ /**
+ * The number of operations of the '<em>Circulating Item</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CIRCULATING_ITEM_OPERATION_COUNT = ITEM_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.impl.BookImpl <em>Book</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.BookImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getBook()
+ * @generated
+ */
+ int BOOK = 0;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK__PUBLICATION_DATE = CIRCULATING_ITEM__PUBLICATION_DATE;
+
+ /**
+ * The feature id for the '<em><b>Copies</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK__COPIES = CIRCULATING_ITEM__COPIES;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK__BORROWERS = CIRCULATING_ITEM__BORROWERS;
+
+ /**
+ * The feature id for the '<em><b>Title</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK__TITLE = CIRCULATING_ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Pages</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK__PAGES = CIRCULATING_ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Category</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK__CATEGORY = CIRCULATING_ITEM_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Author</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK__AUTHOR = CIRCULATING_ITEM_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Book</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK_FEATURE_COUNT = CIRCULATING_ITEM_FEATURE_COUNT + 4;
+
+ /**
+ * The number of operations of the '<em>Book</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK_OPERATION_COUNT = CIRCULATING_ITEM_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.Addressable <em>Addressable</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.Addressable
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getAddressable()
+ * @generated
+ */
+ int ADDRESSABLE = 13;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ADDRESSABLE__ADDRESS = 0;
+
+ /**
+ * The number of structural features of the '<em>Addressable</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ADDRESSABLE_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Addressable</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ADDRESSABLE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.impl.LibraryImpl <em>Library</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.LibraryImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getLibrary()
+ * @generated
+ */
+ int LIBRARY = 1;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__ADDRESS = ADDRESSABLE__ADDRESS;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__NAME = ADDRESSABLE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Writers</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__WRITERS = ADDRESSABLE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Employees</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__EMPLOYEES = ADDRESSABLE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__BORROWERS = ADDRESSABLE_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Stock</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__STOCK = ADDRESSABLE_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Books</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__BOOKS = ADDRESSABLE_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Branches</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__BRANCHES = ADDRESSABLE_FEATURE_COUNT + 6;
+
+ /**
+ * The feature id for the '<em><b>Parent Branch</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__PARENT_BRANCH = ADDRESSABLE_FEATURE_COUNT + 7;
+
+ /**
+ * The feature id for the '<em><b>People</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__PEOPLE = ADDRESSABLE_FEATURE_COUNT + 8;
+
+ /**
+ * The number of structural features of the '<em>Library</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LIBRARY_FEATURE_COUNT = ADDRESSABLE_FEATURE_COUNT + 9;
+
+ /**
+ * The number of operations of the '<em>Library</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LIBRARY_OPERATION_COUNT = ADDRESSABLE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.impl.PersonImpl <em>Person</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.PersonImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getPerson()
+ * @generated
+ */
+ int PERSON = 11;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PERSON__ADDRESS = ADDRESSABLE__ADDRESS;
+
+ /**
+ * The feature id for the '<em><b>First Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PERSON__FIRST_NAME = ADDRESSABLE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Last Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PERSON__LAST_NAME = ADDRESSABLE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Person</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PERSON_FEATURE_COUNT = ADDRESSABLE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of operations of the '<em>Person</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PERSON_OPERATION_COUNT = ADDRESSABLE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.impl.WriterImpl <em>Writer</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.WriterImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getWriter()
+ * @generated
+ */
+ int WRITER = 2;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WRITER__ADDRESS = PERSON__ADDRESS;
+
+ /**
+ * The feature id for the '<em><b>First Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WRITER__FIRST_NAME = PERSON__FIRST_NAME;
+
+ /**
+ * The feature id for the '<em><b>Last Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WRITER__LAST_NAME = PERSON__LAST_NAME;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WRITER__NAME = PERSON_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Books</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WRITER__BOOKS = PERSON_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Writer</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WRITER_FEATURE_COUNT = PERSON_FEATURE_COUNT + 2;
+
+ /**
+ * The number of operations of the '<em>Writer</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WRITER_OPERATION_COUNT = PERSON_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.Lendable <em>Lendable</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.Lendable
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getLendable()
+ * @generated
+ */
+ int LENDABLE = 4;
+
+ /**
+ * The feature id for the '<em><b>Copies</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LENDABLE__COPIES = 0;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LENDABLE__BORROWERS = 1;
+
+ /**
+ * The number of structural features of the '<em>Lendable</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LENDABLE_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Lendable</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LENDABLE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.impl.PeriodicalImpl <em>Periodical</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.PeriodicalImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getPeriodical()
+ * @generated
+ */
+ int PERIODICAL = 6;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PERIODICAL__PUBLICATION_DATE = ITEM__PUBLICATION_DATE;
+
+ /**
+ * The feature id for the '<em><b>Title</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PERIODICAL__TITLE = ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Issues Per Year</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PERIODICAL__ISSUES_PER_YEAR = ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Periodical</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PERIODICAL_FEATURE_COUNT = ITEM_FEATURE_COUNT + 2;
+
+ /**
+ * The number of operations of the '<em>Periodical</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PERIODICAL_OPERATION_COUNT = ITEM_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.impl.AudioVisualItemImpl <em>Audio Visual Item</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.AudioVisualItemImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getAudioVisualItem()
+ * @generated
+ */
+ int AUDIO_VISUAL_ITEM = 7;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM__PUBLICATION_DATE = CIRCULATING_ITEM__PUBLICATION_DATE;
+
+ /**
+ * The feature id for the '<em><b>Copies</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM__COPIES = CIRCULATING_ITEM__COPIES;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM__BORROWERS = CIRCULATING_ITEM__BORROWERS;
+
+ /**
+ * The feature id for the '<em><b>Title</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM__TITLE = CIRCULATING_ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Minutes Length</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM__MINUTES_LENGTH = CIRCULATING_ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Damaged</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM__DAMAGED = CIRCULATING_ITEM_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Audio Visual Item</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM_FEATURE_COUNT = CIRCULATING_ITEM_FEATURE_COUNT + 3;
+
+ /**
+ * The number of operations of the '<em>Audio Visual Item</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM_OPERATION_COUNT = CIRCULATING_ITEM_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.impl.BookOnTapeImpl <em>Book On Tape</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.BookOnTapeImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getBookOnTape()
+ * @generated
+ */
+ int BOOK_ON_TAPE = 8;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__PUBLICATION_DATE = AUDIO_VISUAL_ITEM__PUBLICATION_DATE;
+
+ /**
+ * The feature id for the '<em><b>Copies</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__COPIES = AUDIO_VISUAL_ITEM__COPIES;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__BORROWERS = AUDIO_VISUAL_ITEM__BORROWERS;
+
+ /**
+ * The feature id for the '<em><b>Title</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__TITLE = AUDIO_VISUAL_ITEM__TITLE;
+
+ /**
+ * The feature id for the '<em><b>Minutes Length</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__MINUTES_LENGTH = AUDIO_VISUAL_ITEM__MINUTES_LENGTH;
+
+ /**
+ * The feature id for the '<em><b>Damaged</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__DAMAGED = AUDIO_VISUAL_ITEM__DAMAGED;
+
+ /**
+ * The feature id for the '<em><b>Reader</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__READER = AUDIO_VISUAL_ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Author</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__AUTHOR = AUDIO_VISUAL_ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Book On Tape</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE_FEATURE_COUNT = AUDIO_VISUAL_ITEM_FEATURE_COUNT + 2;
+
+ /**
+ * The number of operations of the '<em>Book On Tape</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE_OPERATION_COUNT = AUDIO_VISUAL_ITEM_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.impl.VideoCassetteImpl <em>Video Cassette</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.VideoCassetteImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getVideoCassette()
+ * @generated
+ */
+ int VIDEO_CASSETTE = 9;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__PUBLICATION_DATE = AUDIO_VISUAL_ITEM__PUBLICATION_DATE;
+
+ /**
+ * The feature id for the '<em><b>Copies</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__COPIES = AUDIO_VISUAL_ITEM__COPIES;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__BORROWERS = AUDIO_VISUAL_ITEM__BORROWERS;
+
+ /**
+ * The feature id for the '<em><b>Title</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__TITLE = AUDIO_VISUAL_ITEM__TITLE;
+
+ /**
+ * The feature id for the '<em><b>Minutes Length</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__MINUTES_LENGTH = AUDIO_VISUAL_ITEM__MINUTES_LENGTH;
+
+ /**
+ * The feature id for the '<em><b>Damaged</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__DAMAGED = AUDIO_VISUAL_ITEM__DAMAGED;
+
+ /**
+ * The feature id for the '<em><b>Cast</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__CAST = AUDIO_VISUAL_ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Video Cassette</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE_FEATURE_COUNT = AUDIO_VISUAL_ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Video Cassette</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE_OPERATION_COUNT = AUDIO_VISUAL_ITEM_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.impl.BorrowerImpl <em>Borrower</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.BorrowerImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getBorrower()
+ * @generated
+ */
+ int BORROWER = 10;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BORROWER__ADDRESS = PERSON__ADDRESS;
+
+ /**
+ * The feature id for the '<em><b>First Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BORROWER__FIRST_NAME = PERSON__FIRST_NAME;
+
+ /**
+ * The feature id for the '<em><b>Last Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BORROWER__LAST_NAME = PERSON__LAST_NAME;
+
+ /**
+ * The feature id for the '<em><b>Borrowed</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BORROWER__BORROWED = PERSON_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Borrower</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BORROWER_FEATURE_COUNT = PERSON_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Borrower</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BORROWER_OPERATION_COUNT = PERSON_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.impl.EmployeeImpl <em>Employee</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.EmployeeImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getEmployee()
+ * @generated
+ */
+ int EMPLOYEE = 12;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__ADDRESS = PERSON__ADDRESS;
+
+ /**
+ * The feature id for the '<em><b>First Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__FIRST_NAME = PERSON__FIRST_NAME;
+
+ /**
+ * The feature id for the '<em><b>Last Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__LAST_NAME = PERSON__LAST_NAME;
+
+ /**
+ * The feature id for the '<em><b>Manager</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__MANAGER = PERSON_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Employee</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE_FEATURE_COUNT = PERSON_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Employee</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE_OPERATION_COUNT = PERSON_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.examples.extlibrary.BookCategory <em>Book Category</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.BookCategory
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getBookCategory()
+ * @generated
+ */
+ int BOOK_CATEGORY = 14;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.Book <em>Book</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Book</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Book
+ * @generated
+ */
+ EClass getBook();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.Book#getTitle <em>Title</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Title</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Book#getTitle()
+ * @see #getBook()
+ * @generated
+ */
+ EAttribute getBook_Title();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.Book#getPages <em>Pages</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Pages</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Book#getPages()
+ * @see #getBook()
+ * @generated
+ */
+ EAttribute getBook_Pages();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.Book#getCategory <em>Category</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Category</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Book#getCategory()
+ * @see #getBook()
+ * @generated
+ */
+ EAttribute getBook_Category();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.examples.extlibrary.Book#getAuthor <em>Author</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Author</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Book#getAuthor()
+ * @see #getBook()
+ * @generated
+ */
+ EReference getBook_Author();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.Library <em>Library</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Library</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Library
+ * @generated
+ */
+ EClass getLibrary();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.Library#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Library#getName()
+ * @see #getLibrary()
+ * @generated
+ */
+ EAttribute getLibrary_Name();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.examples.extlibrary.Library#getWriters <em>Writers</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Writers</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Library#getWriters()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_Writers();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.examples.extlibrary.Library#getEmployees <em>Employees</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Employees</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Library#getEmployees()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_Employees();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.examples.extlibrary.Library#getBorrowers <em>Borrowers</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Borrowers</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Library#getBorrowers()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_Borrowers();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.examples.extlibrary.Library#getStock <em>Stock</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Stock</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Library#getStock()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_Stock();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.examples.extlibrary.Library#getBooks <em>Books</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Books</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Library#getBooks()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_Books();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.examples.extlibrary.Library#getBranches <em>Branches</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Branches</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Library#getBranches()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_Branches();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.emf.examples.extlibrary.Library#getParentBranch <em>Parent Branch</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Parent Branch</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Library#getParentBranch()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_ParentBranch();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.emf.examples.extlibrary.Library#getPeople <em>People</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>People</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Library#getPeople()
+ * @see #getLibrary()
+ * @generated
+ */
+ EAttribute getLibrary_People();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.Writer <em>Writer</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Writer</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Writer
+ * @generated
+ */
+ EClass getWriter();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.Writer#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Writer#getName()
+ * @see #getWriter()
+ * @generated
+ */
+ EAttribute getWriter_Name();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.examples.extlibrary.Writer#getBooks <em>Books</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Books</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Writer#getBooks()
+ * @see #getWriter()
+ * @generated
+ */
+ EReference getWriter_Books();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.Item <em>Item</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Item</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Item
+ * @generated
+ */
+ EClass getItem();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.Item#getPublicationDate <em>Publication Date</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Publication Date</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Item#getPublicationDate()
+ * @see #getItem()
+ * @generated
+ */
+ EAttribute getItem_PublicationDate();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.Lendable <em>Lendable</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Lendable</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Lendable
+ * @generated
+ */
+ EClass getLendable();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.Lendable#getCopies <em>Copies</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Copies</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Lendable#getCopies()
+ * @see #getLendable()
+ * @generated
+ */
+ EAttribute getLendable_Copies();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.examples.extlibrary.Lendable#getBorrowers <em>Borrowers</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Borrowers</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Lendable#getBorrowers()
+ * @see #getLendable()
+ * @generated
+ */
+ EReference getLendable_Borrowers();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.CirculatingItem <em>Circulating Item</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Circulating Item</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.CirculatingItem
+ * @generated
+ */
+ EClass getCirculatingItem();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.Periodical <em>Periodical</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Periodical</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Periodical
+ * @generated
+ */
+ EClass getPeriodical();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.Periodical#getTitle <em>Title</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Title</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Periodical#getTitle()
+ * @see #getPeriodical()
+ * @generated
+ */
+ EAttribute getPeriodical_Title();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.Periodical#getIssuesPerYear <em>Issues Per Year</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Issues Per Year</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Periodical#getIssuesPerYear()
+ * @see #getPeriodical()
+ * @generated
+ */
+ EAttribute getPeriodical_IssuesPerYear();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.AudioVisualItem <em>Audio Visual Item</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Audio Visual Item</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.AudioVisualItem
+ * @generated
+ */
+ EClass getAudioVisualItem();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.AudioVisualItem#getTitle <em>Title</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Title</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.AudioVisualItem#getTitle()
+ * @see #getAudioVisualItem()
+ * @generated
+ */
+ EAttribute getAudioVisualItem_Title();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.AudioVisualItem#getMinutesLength <em>Minutes Length</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Minutes Length</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.AudioVisualItem#getMinutesLength()
+ * @see #getAudioVisualItem()
+ * @generated
+ */
+ EAttribute getAudioVisualItem_MinutesLength();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.AudioVisualItem#isDamaged <em>Damaged</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Damaged</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.AudioVisualItem#isDamaged()
+ * @see #getAudioVisualItem()
+ * @generated
+ */
+ EAttribute getAudioVisualItem_Damaged();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.BookOnTape <em>Book On Tape</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Book On Tape</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.BookOnTape
+ * @generated
+ */
+ EClass getBookOnTape();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.examples.extlibrary.BookOnTape#getReader <em>Reader</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Reader</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.BookOnTape#getReader()
+ * @see #getBookOnTape()
+ * @generated
+ */
+ EReference getBookOnTape_Reader();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.examples.extlibrary.BookOnTape#getAuthor <em>Author</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Author</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.BookOnTape#getAuthor()
+ * @see #getBookOnTape()
+ * @generated
+ */
+ EReference getBookOnTape_Author();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.VideoCassette <em>Video Cassette</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Video Cassette</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.VideoCassette
+ * @generated
+ */
+ EClass getVideoCassette();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.examples.extlibrary.VideoCassette#getCast <em>Cast</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Cast</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.VideoCassette#getCast()
+ * @see #getVideoCassette()
+ * @generated
+ */
+ EReference getVideoCassette_Cast();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.Borrower <em>Borrower</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Borrower</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Borrower
+ * @generated
+ */
+ EClass getBorrower();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.examples.extlibrary.Borrower#getBorrowed <em>Borrowed</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Borrowed</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Borrower#getBorrowed()
+ * @see #getBorrower()
+ * @generated
+ */
+ EReference getBorrower_Borrowed();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.Person <em>Person</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Person</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Person
+ * @generated
+ */
+ EClass getPerson();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.Person#getFirstName <em>First Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>First Name</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Person#getFirstName()
+ * @see #getPerson()
+ * @generated
+ */
+ EAttribute getPerson_FirstName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.Person#getLastName <em>Last Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Last Name</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Person#getLastName()
+ * @see #getPerson()
+ * @generated
+ */
+ EAttribute getPerson_LastName();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.Employee <em>Employee</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Employee</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Employee
+ * @generated
+ */
+ EClass getEmployee();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.examples.extlibrary.Employee#getManager <em>Manager</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Manager</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Employee#getManager()
+ * @see #getEmployee()
+ * @generated
+ */
+ EReference getEmployee_Manager();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.examples.extlibrary.Addressable <em>Addressable</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Addressable</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Addressable
+ * @generated
+ */
+ EClass getAddressable();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.examples.extlibrary.Addressable#getAddress <em>Address</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Address</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.Addressable#getAddress()
+ * @see #getAddressable()
+ * @generated
+ */
+ EAttribute getAddressable_Address();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.emf.examples.extlibrary.BookCategory <em>Book Category</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Book Category</em>'.
+ * @see org.eclipse.emf.examples.extlibrary.BookCategory
+ * @generated
+ */
+ EEnum getBookCategory();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ EXTLibraryFactory getEXTLibraryFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals
+ {
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.impl.BookImpl <em>Book</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.BookImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getBook()
+ * @generated
+ */
+ EClass BOOK = eINSTANCE.getBook();
+
+ /**
+ * The meta object literal for the '<em><b>Title</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute BOOK__TITLE = eINSTANCE.getBook_Title();
+
+ /**
+ * The meta object literal for the '<em><b>Pages</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute BOOK__PAGES = eINSTANCE.getBook_Pages();
+
+ /**
+ * The meta object literal for the '<em><b>Category</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute BOOK__CATEGORY = eINSTANCE.getBook_Category();
+
+ /**
+ * The meta object literal for the '<em><b>Author</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference BOOK__AUTHOR = eINSTANCE.getBook_Author();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.impl.LibraryImpl <em>Library</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.LibraryImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getLibrary()
+ * @generated
+ */
+ EClass LIBRARY = eINSTANCE.getLibrary();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute LIBRARY__NAME = eINSTANCE.getLibrary_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Writers</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LIBRARY__WRITERS = eINSTANCE.getLibrary_Writers();
+
+ /**
+ * The meta object literal for the '<em><b>Employees</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LIBRARY__EMPLOYEES = eINSTANCE.getLibrary_Employees();
+
+ /**
+ * The meta object literal for the '<em><b>Borrowers</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LIBRARY__BORROWERS = eINSTANCE.getLibrary_Borrowers();
+
+ /**
+ * The meta object literal for the '<em><b>Stock</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LIBRARY__STOCK = eINSTANCE.getLibrary_Stock();
+
+ /**
+ * The meta object literal for the '<em><b>Books</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LIBRARY__BOOKS = eINSTANCE.getLibrary_Books();
+
+ /**
+ * The meta object literal for the '<em><b>Branches</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LIBRARY__BRANCHES = eINSTANCE.getLibrary_Branches();
+
+ /**
+ * The meta object literal for the '<em><b>Parent Branch</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LIBRARY__PARENT_BRANCH = eINSTANCE.getLibrary_ParentBranch();
+
+ /**
+ * The meta object literal for the '<em><b>People</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute LIBRARY__PEOPLE = eINSTANCE.getLibrary_People();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.impl.WriterImpl <em>Writer</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.WriterImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getWriter()
+ * @generated
+ */
+ EClass WRITER = eINSTANCE.getWriter();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute WRITER__NAME = eINSTANCE.getWriter_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Books</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference WRITER__BOOKS = eINSTANCE.getWriter_Books();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.impl.ItemImpl <em>Item</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.ItemImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getItem()
+ * @generated
+ */
+ EClass ITEM = eINSTANCE.getItem();
+
+ /**
+ * The meta object literal for the '<em><b>Publication Date</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ITEM__PUBLICATION_DATE = eINSTANCE.getItem_PublicationDate();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.Lendable <em>Lendable</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.Lendable
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getLendable()
+ * @generated
+ */
+ EClass LENDABLE = eINSTANCE.getLendable();
+
+ /**
+ * The meta object literal for the '<em><b>Copies</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute LENDABLE__COPIES = eINSTANCE.getLendable_Copies();
+
+ /**
+ * The meta object literal for the '<em><b>Borrowers</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LENDABLE__BORROWERS = eINSTANCE.getLendable_Borrowers();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.impl.CirculatingItemImpl <em>Circulating Item</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.CirculatingItemImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getCirculatingItem()
+ * @generated
+ */
+ EClass CIRCULATING_ITEM = eINSTANCE.getCirculatingItem();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.impl.PeriodicalImpl <em>Periodical</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.PeriodicalImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getPeriodical()
+ * @generated
+ */
+ EClass PERIODICAL = eINSTANCE.getPeriodical();
+
+ /**
+ * The meta object literal for the '<em><b>Title</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PERIODICAL__TITLE = eINSTANCE.getPeriodical_Title();
+
+ /**
+ * The meta object literal for the '<em><b>Issues Per Year</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PERIODICAL__ISSUES_PER_YEAR = eINSTANCE.getPeriodical_IssuesPerYear();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.impl.AudioVisualItemImpl <em>Audio Visual Item</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.AudioVisualItemImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getAudioVisualItem()
+ * @generated
+ */
+ EClass AUDIO_VISUAL_ITEM = eINSTANCE.getAudioVisualItem();
+
+ /**
+ * The meta object literal for the '<em><b>Title</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute AUDIO_VISUAL_ITEM__TITLE = eINSTANCE.getAudioVisualItem_Title();
+
+ /**
+ * The meta object literal for the '<em><b>Minutes Length</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute AUDIO_VISUAL_ITEM__MINUTES_LENGTH = eINSTANCE.getAudioVisualItem_MinutesLength();
+
+ /**
+ * The meta object literal for the '<em><b>Damaged</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute AUDIO_VISUAL_ITEM__DAMAGED = eINSTANCE.getAudioVisualItem_Damaged();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.impl.BookOnTapeImpl <em>Book On Tape</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.BookOnTapeImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getBookOnTape()
+ * @generated
+ */
+ EClass BOOK_ON_TAPE = eINSTANCE.getBookOnTape();
+
+ /**
+ * The meta object literal for the '<em><b>Reader</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference BOOK_ON_TAPE__READER = eINSTANCE.getBookOnTape_Reader();
+
+ /**
+ * The meta object literal for the '<em><b>Author</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference BOOK_ON_TAPE__AUTHOR = eINSTANCE.getBookOnTape_Author();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.impl.VideoCassetteImpl <em>Video Cassette</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.VideoCassetteImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getVideoCassette()
+ * @generated
+ */
+ EClass VIDEO_CASSETTE = eINSTANCE.getVideoCassette();
+
+ /**
+ * The meta object literal for the '<em><b>Cast</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference VIDEO_CASSETTE__CAST = eINSTANCE.getVideoCassette_Cast();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.impl.BorrowerImpl <em>Borrower</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.BorrowerImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getBorrower()
+ * @generated
+ */
+ EClass BORROWER = eINSTANCE.getBorrower();
+
+ /**
+ * The meta object literal for the '<em><b>Borrowed</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference BORROWER__BORROWED = eINSTANCE.getBorrower_Borrowed();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.impl.PersonImpl <em>Person</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.PersonImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getPerson()
+ * @generated
+ */
+ EClass PERSON = eINSTANCE.getPerson();
+
+ /**
+ * The meta object literal for the '<em><b>First Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PERSON__FIRST_NAME = eINSTANCE.getPerson_FirstName();
+
+ /**
+ * The meta object literal for the '<em><b>Last Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PERSON__LAST_NAME = eINSTANCE.getPerson_LastName();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.impl.EmployeeImpl <em>Employee</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.impl.EmployeeImpl
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getEmployee()
+ * @generated
+ */
+ EClass EMPLOYEE = eINSTANCE.getEmployee();
+
+ /**
+ * The meta object literal for the '<em><b>Manager</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference EMPLOYEE__MANAGER = eINSTANCE.getEmployee_Manager();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.Addressable <em>Addressable</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.Addressable
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getAddressable()
+ * @generated
+ */
+ EClass ADDRESSABLE = eINSTANCE.getAddressable();
+
+ /**
+ * The meta object literal for the '<em><b>Address</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ADDRESSABLE__ADDRESS = eINSTANCE.getAddressable_Address();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.examples.extlibrary.BookCategory <em>Book Category</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.BookCategory
+ * @see org.eclipse.emf.examples.extlibrary.impl.EXTLibraryPackageImpl#getBookCategory()
+ * @generated
+ */
+ EEnum BOOK_CATEGORY = eINSTANCE.getBookCategory();
+
+ }
+
+} //EXTLibraryPackage
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Employee.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Employee.java
new file mode 100644
index 000000000..8730dafb2
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Employee.java
@@ -0,0 +1,54 @@
+/**
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Employee</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Employee#getManager <em>Manager</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getEmployee()
+ * @model
+ * @generated
+ */
+public interface Employee extends Person
+{
+ /**
+ * Returns the value of the '<em><b>Manager</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Manager</em>' reference.
+ * @see #setManager(Employee)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getEmployee_Manager()
+ * @model
+ * @generated
+ */
+ Employee getManager();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Employee#getManager <em>Manager</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Manager</em>' reference.
+ * @see #getManager()
+ * @generated
+ */
+ void setManager(Employee value);
+
+} // Employee
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Item.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Item.java
new file mode 100644
index 000000000..4602e5d08
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Item.java
@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+import java.util.Date;
+
+import org.eclipse.emf.ecore.EObject;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Item</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Item#getPublicationDate <em>Publication Date</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getItem()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Item extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Publication Date</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Publication Date</em>' attribute.
+ * @see #setPublicationDate(Date)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getItem_PublicationDate()
+ * @model
+ * @generated
+ */
+ Date getPublicationDate();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Item#getPublicationDate <em>Publication Date</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Publication Date</em>' attribute.
+ * @see #getPublicationDate()
+ * @generated
+ */
+ void setPublicationDate(Date value);
+
+} // Item
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Lendable.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Lendable.java
new file mode 100644
index 000000000..56668ec1c
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Lendable.java
@@ -0,0 +1,74 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Lendable</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Lendable#getCopies <em>Copies</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Lendable#getBorrowers <em>Borrowers</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLendable()
+ * @model interface="true" abstract="true"
+ * @generated
+ */
+public interface Lendable extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Copies</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Copies</em>' attribute.
+ * @see #setCopies(int)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLendable_Copies()
+ * @model required="true"
+ * @generated
+ */
+ int getCopies();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Lendable#getCopies <em>Copies</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Copies</em>' attribute.
+ * @see #getCopies()
+ * @generated
+ */
+ void setCopies(int value);
+
+ /**
+ * Returns the value of the '<em><b>Borrowers</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.examples.extlibrary.Borrower}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.examples.extlibrary.Borrower#getBorrowed <em>Borrowed</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Borrowers</em>' reference list.
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLendable_Borrowers()
+ * @see org.eclipse.emf.examples.extlibrary.Borrower#getBorrowed
+ * @model opposite="borrowed" ordered="false"
+ * @generated
+ */
+ EList<Borrower> getBorrowers();
+
+} // Lendable
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Library.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Library.java
new file mode 100644
index 000000000..db03ff40b
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Library.java
@@ -0,0 +1,181 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.util.FeatureMap;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Library</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Library#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Library#getWriters <em>Writers</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Library#getEmployees <em>Employees</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Library#getBorrowers <em>Borrowers</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Library#getStock <em>Stock</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Library#getBooks <em>Books</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Library#getBranches <em>Branches</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Library#getParentBranch <em>Parent Branch</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Library#getPeople <em>People</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLibrary()
+ * @model
+ * @generated
+ */
+public interface Library extends Addressable
+{
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLibrary_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Library#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Writers</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.examples.extlibrary.Writer}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Writers</em>' containment reference list.
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLibrary_Writers()
+ * @model containment="true" transient="true" volatile="true" derived="true"
+ * extendedMetaData="group='#people'"
+ * @generated
+ */
+ EList<Writer> getWriters();
+
+ /**
+ * Returns the value of the '<em><b>Employees</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.examples.extlibrary.Employee}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Employees</em>' containment reference list.
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLibrary_Employees()
+ * @model containment="true" transient="true" volatile="true" derived="true"
+ * extendedMetaData="group='#people'"
+ * @generated
+ */
+ EList<Employee> getEmployees();
+
+ /**
+ * Returns the value of the '<em><b>Borrowers</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.examples.extlibrary.Borrower}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Borrowers</em>' containment reference list.
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLibrary_Borrowers()
+ * @model containment="true" transient="true" volatile="true" derived="true"
+ * extendedMetaData="group='#people'"
+ * @generated
+ */
+ EList<Borrower> getBorrowers();
+
+ /**
+ * Returns the value of the '<em><b>Stock</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.examples.extlibrary.Item}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Stock</em>' containment reference list.
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLibrary_Stock()
+ * @model containment="true" ordered="false"
+ * @generated
+ */
+ EList<Item> getStock();
+
+ /**
+ * Returns the value of the '<em><b>Books</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.examples.extlibrary.Book}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Books</em>' reference list.
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLibrary_Books()
+ * @model transient="true" derived="true" ordered="false"
+ * @generated
+ */
+ EList<Book> getBooks();
+
+ /**
+ * Returns the value of the '<em><b>Branches</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.examples.extlibrary.Library}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.examples.extlibrary.Library#getParentBranch <em>Parent Branch</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Branches</em>' containment reference list.
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLibrary_Branches()
+ * @see org.eclipse.emf.examples.extlibrary.Library#getParentBranch
+ * @model opposite="parentBranch" containment="true" resolveProxies="true"
+ * @generated
+ */
+ EList<Library> getBranches();
+
+ /**
+ * Returns the value of the '<em><b>Parent Branch</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.examples.extlibrary.Library#getBranches <em>Branches</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Parent Branch</em>' container reference.
+ * @see #setParentBranch(Library)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLibrary_ParentBranch()
+ * @see org.eclipse.emf.examples.extlibrary.Library#getBranches
+ * @model opposite="branches" transient="false"
+ * @generated
+ */
+ Library getParentBranch();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Library#getParentBranch <em>Parent Branch</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Parent Branch</em>' container reference.
+ * @see #getParentBranch()
+ * @generated
+ */
+ void setParentBranch(Library value);
+
+ /**
+ * Returns the value of the '<em><b>People</b></em>' attribute list.
+ * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>People</em>' attribute list.
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getLibrary_People()
+ * @model dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
+ * extendedMetaData="kind='group'"
+ * @generated
+ */
+ FeatureMap getPeople();
+
+} // Library
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Periodical.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Periodical.java
new file mode 100644
index 000000000..80f2168d1
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Periodical.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Periodical</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Periodical#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Periodical#getIssuesPerYear <em>Issues Per Year</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getPeriodical()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Periodical extends Item
+{
+ /**
+ * Returns the value of the '<em><b>Title</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Title</em>' attribute.
+ * @see #setTitle(String)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getPeriodical_Title()
+ * @model
+ * @generated
+ */
+ String getTitle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Periodical#getTitle <em>Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Title</em>' attribute.
+ * @see #getTitle()
+ * @generated
+ */
+ void setTitle(String value);
+
+ /**
+ * Returns the value of the '<em><b>Issues Per Year</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Issues Per Year</em>' attribute.
+ * @see #setIssuesPerYear(int)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getPeriodical_IssuesPerYear()
+ * @model required="true"
+ * @generated
+ */
+ int getIssuesPerYear();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Periodical#getIssuesPerYear <em>Issues Per Year</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Issues Per Year</em>' attribute.
+ * @see #getIssuesPerYear()
+ * @generated
+ */
+ void setIssuesPerYear(int value);
+
+} // Periodical
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Person.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Person.java
new file mode 100644
index 000000000..2ca5152fe
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Person.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Person</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Person#getFirstName <em>First Name</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Person#getLastName <em>Last Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getPerson()
+ * @model
+ * @generated
+ */
+public interface Person extends Addressable
+{
+ /**
+ * Returns the value of the '<em><b>First Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>First Name</em>' attribute.
+ * @see #setFirstName(String)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getPerson_FirstName()
+ * @model required="true"
+ * @generated
+ */
+ String getFirstName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Person#getFirstName <em>First Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>First Name</em>' attribute.
+ * @see #getFirstName()
+ * @generated
+ */
+ void setFirstName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Last Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Last Name</em>' attribute.
+ * @see #setLastName(String)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getPerson_LastName()
+ * @model required="true"
+ * @generated
+ */
+ String getLastName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Person#getLastName <em>Last Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Last Name</em>' attribute.
+ * @see #getLastName()
+ * @generated
+ */
+ void setLastName(String value);
+
+} // Person
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/VideoCassette.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/VideoCassette.java
new file mode 100644
index 000000000..66a02ca33
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/VideoCassette.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+import org.eclipse.emf.common.util.EList;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Video Cassette</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.VideoCassette#getCast <em>Cast</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getVideoCassette()
+ * @model
+ * @generated
+ */
+public interface VideoCassette extends AudioVisualItem
+{
+ /**
+ * Returns the value of the '<em><b>Cast</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.examples.extlibrary.Person}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Cast</em>' reference list.
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getVideoCassette_Cast()
+ * @model
+ * @generated
+ */
+ EList<Person> getCast();
+
+} // VideoCassette
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Writer.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Writer.java
new file mode 100644
index 000000000..7c25d5e75
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/Writer.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary;
+
+
+import org.eclipse.emf.common.util.EList;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Writer</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Writer#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.Writer#getBooks <em>Books</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getWriter()
+ * @model
+ * @generated
+ */
+public interface Writer extends Person
+{
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getWriter_Name()
+ * @model transient="true" volatile="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.examples.extlibrary.Writer#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Books</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.examples.extlibrary.Book}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.examples.extlibrary.Book#getAuthor <em>Author</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Books</em>' reference list.
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#getWriter_Books()
+ * @see org.eclipse.emf.examples.extlibrary.Book#getAuthor
+ * @model opposite="author"
+ * @generated
+ */
+ EList<Book> getBooks();
+
+} // Writer
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/AudioVisualItemImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/AudioVisualItemImpl.java
new file mode 100644
index 000000000..cc91dc634
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/AudioVisualItemImpl.java
@@ -0,0 +1,295 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.examples.extlibrary.AudioVisualItem;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Audo Visual Item</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.AudioVisualItemImpl#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.AudioVisualItemImpl#getMinutesLength <em>Minutes Length</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.AudioVisualItemImpl#isDamaged <em>Damaged</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class AudioVisualItemImpl extends CirculatingItemImpl implements AudioVisualItem
+{
+ /**
+ * The default value of the '{@link #getTitle() <em>Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTitle()
+ * @generated
+ * @ordered
+ */
+ protected static final String TITLE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTitle() <em>Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTitle()
+ * @generated
+ * @ordered
+ */
+ protected String title = TITLE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getMinutesLength() <em>Minutes Length</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMinutesLength()
+ * @generated
+ * @ordered
+ */
+ protected static final int MINUTES_LENGTH_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getMinutesLength() <em>Minutes Length</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMinutesLength()
+ * @generated
+ * @ordered
+ */
+ protected int minutesLength = MINUTES_LENGTH_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isDamaged() <em>Damaged</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isDamaged()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean DAMAGED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isDamaged() <em>Damaged</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isDamaged()
+ * @generated
+ * @ordered
+ */
+ protected boolean damaged = DAMAGED_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AudioVisualItemImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTitle()
+ {
+ return title;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTitle(String newTitle)
+ {
+ String oldTitle = title;
+ title = newTitle;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.AUDIO_VISUAL_ITEM__TITLE, oldTitle, title));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getMinutesLength()
+ {
+ return minutesLength;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMinutesLength(int newMinutesLength)
+ {
+ int oldMinutesLength = minutesLength;
+ minutesLength = newMinutesLength;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH, oldMinutesLength, minutesLength));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isDamaged()
+ {
+ return damaged;
+ }
+
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDamaged(boolean newDamaged)
+ {
+ boolean oldDamaged = damaged;
+ damaged = newDamaged;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED, oldDamaged, damaged));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__TITLE:
+ return getTitle();
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH:
+ return getMinutesLength();
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED:
+ return isDamaged();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__TITLE:
+ setTitle((String)newValue);
+ return;
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH:
+ setMinutesLength((Integer)newValue);
+ return;
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED:
+ setDamaged((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__TITLE:
+ setTitle(TITLE_EDEFAULT);
+ return;
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH:
+ setMinutesLength(MINUTES_LENGTH_EDEFAULT);
+ return;
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED:
+ setDamaged(DAMAGED_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__TITLE:
+ return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH:
+ return minutesLength != MINUTES_LENGTH_EDEFAULT;
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED:
+ return damaged != DAMAGED_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (title: "); //$NON-NLS-1$
+ result.append(title);
+ result.append(", minutesLength: "); //$NON-NLS-1$
+ result.append(minutesLength);
+ result.append(", damaged: "); //$NON-NLS-1$
+ result.append(damaged);
+ result.append(')');
+ return result.toString();
+ }
+
+} //AudioVisualItemImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BookImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BookImpl.java
new file mode 100644
index 000000000..c983e1f88
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BookImpl.java
@@ -0,0 +1,452 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.examples.extlibrary.Book;
+import org.eclipse.emf.examples.extlibrary.BookCategory;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Writer;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Book</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.BookImpl#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.BookImpl#getPages <em>Pages</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.BookImpl#getCategory <em>Category</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.BookImpl#getAuthor <em>Author</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BookImpl extends CirculatingItemImpl implements Book
+{
+ /**
+ * The default value of the '{@link #getTitle() <em>Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTitle()
+ * @generated
+ * @ordered
+ */
+ protected static final String TITLE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTitle() <em>Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTitle()
+ * @generated
+ * @ordered
+ */
+ protected String title = TITLE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getPages() <em>Pages</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPages()
+ * @generated
+ * @ordered
+ */
+ protected static final int PAGES_EDEFAULT = 100;
+
+ /**
+ * The cached value of the '{@link #getPages() <em>Pages</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPages()
+ * @generated
+ * @ordered
+ */
+ protected int pages = PAGES_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getCategory() <em>Category</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCategory()
+ * @generated
+ * @ordered
+ */
+ protected static final BookCategory CATEGORY_EDEFAULT = BookCategory.MYSTERY_LITERAL;
+
+ /**
+ * The cached value of the '{@link #getCategory() <em>Category</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCategory()
+ * @generated
+ * @ordered
+ */
+ protected BookCategory category = CATEGORY_EDEFAULT;
+
+ /**
+ * This is true if the Category attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean categoryESet;
+
+ /**
+ * The cached value of the '{@link #getAuthor() <em>Author</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAuthor()
+ * @generated
+ * @ordered
+ */
+ protected Writer author;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BookImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.BOOK;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTitle()
+ {
+ return title;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTitle(String newTitle)
+ {
+ String oldTitle = title;
+ title = newTitle;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.BOOK__TITLE, oldTitle, title));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getPages()
+ {
+ return pages;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPages(int newPages)
+ {
+ int oldPages = pages;
+ pages = newPages;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.BOOK__PAGES, oldPages, pages));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BookCategory getCategory()
+ {
+ return category;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCategory(BookCategory newCategory)
+ {
+ BookCategory oldCategory = category;
+ category = newCategory == null ? CATEGORY_EDEFAULT : newCategory;
+ boolean oldCategoryESet = categoryESet;
+ categoryESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.BOOK__CATEGORY, oldCategory, category, !oldCategoryESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetCategory()
+ {
+ BookCategory oldCategory = category;
+ boolean oldCategoryESet = categoryESet;
+ category = CATEGORY_EDEFAULT;
+ categoryESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, EXTLibraryPackage.BOOK__CATEGORY, oldCategory, CATEGORY_EDEFAULT, oldCategoryESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetCategory()
+ {
+ return categoryESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Writer getAuthor()
+ {
+ if (author != null && author.eIsProxy()) {
+ InternalEObject oldAuthor = (InternalEObject)author;
+ author = (Writer)eResolveProxy(oldAuthor);
+ if (author != oldAuthor) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, EXTLibraryPackage.BOOK__AUTHOR, oldAuthor, author));
+ }
+ }
+ return author;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Writer basicGetAuthor()
+ {
+ return author;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetAuthor(Writer newAuthor, NotificationChain msgs)
+ {
+ Writer oldAuthor = author;
+ author = newAuthor;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.BOOK__AUTHOR, oldAuthor, newAuthor);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAuthor(Writer newAuthor)
+ {
+ if (newAuthor != author) {
+ NotificationChain msgs = null;
+ if (author != null)
+ msgs = ((InternalEObject)author).eInverseRemove(this, EXTLibraryPackage.WRITER__BOOKS, Writer.class, msgs);
+ if (newAuthor != null)
+ msgs = ((InternalEObject)newAuthor).eInverseAdd(this, EXTLibraryPackage.WRITER__BOOKS, Writer.class, msgs);
+ msgs = basicSetAuthor(newAuthor, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.BOOK__AUTHOR, newAuthor, newAuthor));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BOOK__AUTHOR:
+ if (author != null)
+ msgs = ((InternalEObject)author).eInverseRemove(this, EXTLibraryPackage.WRITER__BOOKS, Writer.class, msgs);
+ return basicSetAuthor((Writer)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BOOK__AUTHOR:
+ return basicSetAuthor(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BOOK__TITLE:
+ return getTitle();
+ case EXTLibraryPackage.BOOK__PAGES:
+ return getPages();
+ case EXTLibraryPackage.BOOK__CATEGORY:
+ return getCategory();
+ case EXTLibraryPackage.BOOK__AUTHOR:
+ if (resolve) return getAuthor();
+ return basicGetAuthor();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BOOK__TITLE:
+ setTitle((String)newValue);
+ return;
+ case EXTLibraryPackage.BOOK__PAGES:
+ setPages((Integer)newValue);
+ return;
+ case EXTLibraryPackage.BOOK__CATEGORY:
+ setCategory((BookCategory)newValue);
+ return;
+ case EXTLibraryPackage.BOOK__AUTHOR:
+ setAuthor((Writer)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BOOK__TITLE:
+ setTitle(TITLE_EDEFAULT);
+ return;
+ case EXTLibraryPackage.BOOK__PAGES:
+ setPages(PAGES_EDEFAULT);
+ return;
+ case EXTLibraryPackage.BOOK__CATEGORY:
+ unsetCategory();
+ return;
+ case EXTLibraryPackage.BOOK__AUTHOR:
+ setAuthor((Writer)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BOOK__TITLE:
+ return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
+ case EXTLibraryPackage.BOOK__PAGES:
+ return pages != PAGES_EDEFAULT;
+ case EXTLibraryPackage.BOOK__CATEGORY:
+ return isSetCategory();
+ case EXTLibraryPackage.BOOK__AUTHOR:
+ return author != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (title: "); //$NON-NLS-1$
+ result.append(title);
+ result.append(", pages: "); //$NON-NLS-1$
+ result.append(pages);
+ result.append(", category: "); //$NON-NLS-1$
+ if (categoryESet) result.append(category); else result.append("<unset>"); //$NON-NLS-1$
+ result.append(')');
+ return result.toString();
+ }
+
+} //BookImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BookOnTapeImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BookOnTapeImpl.java
new file mode 100644
index 000000000..8c133f72d
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BookOnTapeImpl.java
@@ -0,0 +1,240 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.examples.extlibrary.BookOnTape;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Person;
+import org.eclipse.emf.examples.extlibrary.Writer;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Book On Tape</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.BookOnTapeImpl#getReader <em>Reader</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.BookOnTapeImpl#getAuthor <em>Author</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BookOnTapeImpl extends AudioVisualItemImpl implements BookOnTape
+{
+ /**
+ * The cached value of the '{@link #getReader() <em>Reader</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getReader()
+ * @generated
+ * @ordered
+ */
+ protected Person reader;
+
+ /**
+ * The cached value of the '{@link #getAuthor() <em>Author</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAuthor()
+ * @generated
+ * @ordered
+ */
+ protected Writer author;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BookOnTapeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.BOOK_ON_TAPE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Person getReader()
+ {
+ if (reader != null && reader.eIsProxy()) {
+ InternalEObject oldReader = (InternalEObject)reader;
+ reader = (Person)eResolveProxy(oldReader);
+ if (reader != oldReader) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, EXTLibraryPackage.BOOK_ON_TAPE__READER, oldReader, reader));
+ }
+ }
+ return reader;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Person basicGetReader()
+ {
+ return reader;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setReader(Person newReader)
+ {
+ Person oldReader = reader;
+ reader = newReader;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.BOOK_ON_TAPE__READER, oldReader, reader));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Writer getAuthor()
+ {
+ if (author != null && author.eIsProxy()) {
+ InternalEObject oldAuthor = (InternalEObject)author;
+ author = (Writer)eResolveProxy(oldAuthor);
+ if (author != oldAuthor) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, EXTLibraryPackage.BOOK_ON_TAPE__AUTHOR, oldAuthor, author));
+ }
+ }
+ return author;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Writer basicGetAuthor()
+ {
+ return author;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAuthor(Writer newAuthor)
+ {
+ Writer oldAuthor = author;
+ author = newAuthor;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.BOOK_ON_TAPE__AUTHOR, oldAuthor, author));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BOOK_ON_TAPE__READER:
+ if (resolve) return getReader();
+ return basicGetReader();
+ case EXTLibraryPackage.BOOK_ON_TAPE__AUTHOR:
+ if (resolve) return getAuthor();
+ return basicGetAuthor();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BOOK_ON_TAPE__READER:
+ setReader((Person)newValue);
+ return;
+ case EXTLibraryPackage.BOOK_ON_TAPE__AUTHOR:
+ setAuthor((Writer)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BOOK_ON_TAPE__READER:
+ setReader((Person)null);
+ return;
+ case EXTLibraryPackage.BOOK_ON_TAPE__AUTHOR:
+ setAuthor((Writer)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BOOK_ON_TAPE__READER:
+ return reader != null;
+ case EXTLibraryPackage.BOOK_ON_TAPE__AUTHOR:
+ return author != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //BookOnTapeImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BorrowerImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BorrowerImpl.java
new file mode 100644
index 000000000..567328f08
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BorrowerImpl.java
@@ -0,0 +1,185 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.emf.examples.extlibrary.Borrower;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Lendable;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Borrower</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.BorrowerImpl#getBorrowed <em>Borrowed</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BorrowerImpl extends PersonImpl implements Borrower
+{
+ /**
+ * The cached value of the '{@link #getBorrowed() <em>Borrowed</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBorrowed()
+ * @generated
+ * @ordered
+ */
+ protected EList<Lendable> borrowed;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BorrowerImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.BORROWER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Lendable> getBorrowed()
+ {
+ if (borrowed == null) {
+ borrowed = new EObjectWithInverseResolvingEList.ManyInverse<Lendable>(Lendable.class, this, EXTLibraryPackage.BORROWER__BORROWED, EXTLibraryPackage.LENDABLE__BORROWERS);
+ }
+ return borrowed;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BORROWER__BORROWED:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getBorrowed()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BORROWER__BORROWED:
+ return ((InternalEList<?>)getBorrowed()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BORROWER__BORROWED:
+ return getBorrowed();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BORROWER__BORROWED:
+ getBorrowed().clear();
+ getBorrowed().addAll((Collection<? extends Lendable>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BORROWER__BORROWED:
+ getBorrowed().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BORROWER__BORROWED:
+ return borrowed != null && !borrowed.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //BorrowerImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/CirculatingItemImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/CirculatingItemImpl.java
new file mode 100644
index 000000000..51beb857a
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/CirculatingItemImpl.java
@@ -0,0 +1,295 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.emf.examples.extlibrary.Borrower;
+import org.eclipse.emf.examples.extlibrary.CirculatingItem;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Lendable;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Circulating Item</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.CirculatingItemImpl#getCopies <em>Copies</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.CirculatingItemImpl#getBorrowers <em>Borrowers</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class CirculatingItemImpl extends ItemImpl implements CirculatingItem
+{
+ /**
+ * The default value of the '{@link #getCopies() <em>Copies</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCopies()
+ * @generated
+ * @ordered
+ */
+ protected static final int COPIES_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getCopies() <em>Copies</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCopies()
+ * @generated
+ * @ordered
+ */
+ protected int copies = COPIES_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getBorrowers() <em>Borrowers</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBorrowers()
+ * @generated
+ * @ordered
+ */
+ protected EList<Borrower> borrowers;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CirculatingItemImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.CIRCULATING_ITEM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getCopies()
+ {
+ return copies;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCopies(int newCopies)
+ {
+ int oldCopies = copies;
+ copies = newCopies;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.CIRCULATING_ITEM__COPIES, oldCopies, copies));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Borrower> getBorrowers()
+ {
+ if (borrowers == null) {
+ borrowers = new EObjectWithInverseResolvingEList.ManyInverse<Borrower>(Borrower.class, this, EXTLibraryPackage.CIRCULATING_ITEM__BORROWERS, EXTLibraryPackage.BORROWER__BORROWED);
+ }
+ return borrowers;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getBorrowers()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ return ((InternalEList<?>)getBorrowers()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.CIRCULATING_ITEM__COPIES:
+ return getCopies();
+ case EXTLibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ return getBorrowers();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.CIRCULATING_ITEM__COPIES:
+ setCopies((Integer)newValue);
+ return;
+ case EXTLibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ getBorrowers().clear();
+ getBorrowers().addAll((Collection<? extends Borrower>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.CIRCULATING_ITEM__COPIES:
+ setCopies(COPIES_EDEFAULT);
+ return;
+ case EXTLibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ getBorrowers().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.CIRCULATING_ITEM__COPIES:
+ return copies != COPIES_EDEFAULT;
+ case EXTLibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ return borrowers != null && !borrowers.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+ {
+ if (baseClass == Lendable.class) {
+ switch (derivedFeatureID) {
+ case EXTLibraryPackage.CIRCULATING_ITEM__COPIES: return EXTLibraryPackage.LENDABLE__COPIES;
+ case EXTLibraryPackage.CIRCULATING_ITEM__BORROWERS: return EXTLibraryPackage.LENDABLE__BORROWERS;
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+ {
+ if (baseClass == Lendable.class) {
+ switch (baseFeatureID) {
+ case EXTLibraryPackage.LENDABLE__COPIES: return EXTLibraryPackage.CIRCULATING_ITEM__COPIES;
+ case EXTLibraryPackage.LENDABLE__BORROWERS: return EXTLibraryPackage.CIRCULATING_ITEM__BORROWERS;
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (copies: "); //$NON-NLS-1$
+ result.append(copies);
+ result.append(')');
+ return result.toString();
+ }
+
+} //CirculatingItemImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/EXTLibraryFactoryImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/EXTLibraryFactoryImpl.java
new file mode 100644
index 000000000..8a72be2f2
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/EXTLibraryFactoryImpl.java
@@ -0,0 +1,252 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.emf.examples.extlibrary.*;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EXTLibraryFactoryImpl extends EFactoryImpl implements EXTLibraryFactory
+{
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static EXTLibraryFactory init()
+ {
+ try {
+ EXTLibraryFactory theEXTLibraryFactory = (EXTLibraryFactory)EPackage.Registry.INSTANCE.getEFactory(EXTLibraryPackage.eNS_URI);
+ if (theEXTLibraryFactory != null) {
+ return theEXTLibraryFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new EXTLibraryFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibraryFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass)
+ {
+ switch (eClass.getClassifierID()) {
+ case EXTLibraryPackage.BOOK: return createBook();
+ case EXTLibraryPackage.LIBRARY: return createLibrary();
+ case EXTLibraryPackage.WRITER: return createWriter();
+ case EXTLibraryPackage.BOOK_ON_TAPE: return createBookOnTape();
+ case EXTLibraryPackage.VIDEO_CASSETTE: return createVideoCassette();
+ case EXTLibraryPackage.BORROWER: return createBorrower();
+ case EXTLibraryPackage.PERSON: return createPerson();
+ case EXTLibraryPackage.EMPLOYEE: return createEmployee();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue)
+ {
+ switch (eDataType.getClassifierID()) {
+ case EXTLibraryPackage.BOOK_CATEGORY:
+ return createBookCategoryFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue)
+ {
+ switch (eDataType.getClassifierID()) {
+ case EXTLibraryPackage.BOOK_CATEGORY:
+ return convertBookCategoryToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Book createBook()
+ {
+ BookImpl book = new BookImpl();
+ return book;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Library createLibrary()
+ {
+ LibraryImpl library = new LibraryImpl();
+ return library;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Writer createWriter()
+ {
+ WriterImpl writer = new WriterImpl();
+ return writer;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BookOnTape createBookOnTape()
+ {
+ BookOnTapeImpl bookOnTape = new BookOnTapeImpl();
+ return bookOnTape;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VideoCassette createVideoCassette()
+ {
+ VideoCassetteImpl videoCassette = new VideoCassetteImpl();
+ return videoCassette;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Borrower createBorrower()
+ {
+ BorrowerImpl borrower = new BorrowerImpl();
+ return borrower;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Person createPerson()
+ {
+ PersonImpl person = new PersonImpl();
+ return person;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Employee createEmployee()
+ {
+ EmployeeImpl employee = new EmployeeImpl();
+ return employee;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BookCategory createBookCategoryFromString(EDataType eDataType, String initialValue)
+ {
+ BookCategory result = BookCategory.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertBookCategoryToString(EDataType eDataType, Object instanceValue)
+ {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibraryPackage getEXTLibraryPackage()
+ {
+ return (EXTLibraryPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static EXTLibraryPackage getPackage()
+ {
+ return EXTLibraryPackage.eINSTANCE;
+ }
+
+} //EXTLibraryFactoryImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/EXTLibraryPackageImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/EXTLibraryPackageImpl.java
new file mode 100644
index 000000000..f74e7bd6d
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/EXTLibraryPackageImpl.java
@@ -0,0 +1,921 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.emf.examples.extlibrary.Addressable;
+import org.eclipse.emf.examples.extlibrary.AudioVisualItem;
+import org.eclipse.emf.examples.extlibrary.Book;
+import org.eclipse.emf.examples.extlibrary.BookCategory;
+import org.eclipse.emf.examples.extlibrary.BookOnTape;
+import org.eclipse.emf.examples.extlibrary.Borrower;
+import org.eclipse.emf.examples.extlibrary.CirculatingItem;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryFactory;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Employee;
+import org.eclipse.emf.examples.extlibrary.Item;
+import org.eclipse.emf.examples.extlibrary.Lendable;
+import org.eclipse.emf.examples.extlibrary.Library;
+import org.eclipse.emf.examples.extlibrary.Periodical;
+import org.eclipse.emf.examples.extlibrary.Person;
+import org.eclipse.emf.examples.extlibrary.VideoCassette;
+import org.eclipse.emf.examples.extlibrary.Writer;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EXTLibraryPackageImpl extends EPackageImpl implements EXTLibraryPackage
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass bookEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass libraryEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass writerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass itemEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass lendableEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass circulatingItemEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass periodicalEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass audioVisualItemEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass bookOnTapeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass videoCassetteEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass borrowerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass personEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass employeeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass addressableEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum bookCategoryEEnum = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private EXTLibraryPackageImpl()
+ {
+ super(eNS_URI, EXTLibraryFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link EXTLibraryPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static EXTLibraryPackage init()
+ {
+ if (isInited) return (EXTLibraryPackage)EPackage.Registry.INSTANCE.getEPackage(EXTLibraryPackage.eNS_URI);
+
+ // Obtain or create and register package
+ EXTLibraryPackageImpl theEXTLibraryPackage = (EXTLibraryPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EXTLibraryPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new EXTLibraryPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theEXTLibraryPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theEXTLibraryPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theEXTLibraryPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(EXTLibraryPackage.eNS_URI, theEXTLibraryPackage);
+ return theEXTLibraryPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getBook()
+ {
+ return bookEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getBook_Title()
+ {
+ return (EAttribute)bookEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getBook_Pages()
+ {
+ return (EAttribute)bookEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getBook_Category()
+ {
+ return (EAttribute)bookEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getBook_Author()
+ {
+ return (EReference)bookEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getLibrary()
+ {
+ return libraryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getLibrary_Name()
+ {
+ return (EAttribute)libraryEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLibrary_Writers()
+ {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLibrary_Employees()
+ {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLibrary_Borrowers()
+ {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLibrary_Stock()
+ {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLibrary_Books()
+ {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLibrary_Branches()
+ {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLibrary_ParentBranch()
+ {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getLibrary_People()
+ {
+ return (EAttribute)libraryEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getWriter()
+ {
+ return writerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getWriter_Name()
+ {
+ return (EAttribute)writerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getWriter_Books()
+ {
+ return (EReference)writerEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getItem()
+ {
+ return itemEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getItem_PublicationDate()
+ {
+ return (EAttribute)itemEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getLendable()
+ {
+ return lendableEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getLendable_Copies()
+ {
+ return (EAttribute)lendableEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLendable_Borrowers()
+ {
+ return (EReference)lendableEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCirculatingItem()
+ {
+ return circulatingItemEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPeriodical()
+ {
+ return periodicalEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPeriodical_Title()
+ {
+ return (EAttribute)periodicalEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPeriodical_IssuesPerYear()
+ {
+ return (EAttribute)periodicalEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAudioVisualItem()
+ {
+ return audioVisualItemEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAudioVisualItem_Title()
+ {
+ return (EAttribute)audioVisualItemEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAudioVisualItem_MinutesLength()
+ {
+ return (EAttribute)audioVisualItemEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAudioVisualItem_Damaged()
+ {
+ return (EAttribute)audioVisualItemEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getBookOnTape()
+ {
+ return bookOnTapeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getBookOnTape_Reader()
+ {
+ return (EReference)bookOnTapeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getBookOnTape_Author()
+ {
+ return (EReference)bookOnTapeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getVideoCassette()
+ {
+ return videoCassetteEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getVideoCassette_Cast()
+ {
+ return (EReference)videoCassetteEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getBorrower()
+ {
+ return borrowerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getBorrower_Borrowed()
+ {
+ return (EReference)borrowerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPerson()
+ {
+ return personEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPerson_FirstName()
+ {
+ return (EAttribute)personEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPerson_LastName()
+ {
+ return (EAttribute)personEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getEmployee()
+ {
+ return employeeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getEmployee_Manager()
+ {
+ return (EReference)employeeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAddressable()
+ {
+ return addressableEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAddressable_Address()
+ {
+ return (EAttribute)addressableEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getBookCategory()
+ {
+ return bookCategoryEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibraryFactory getEXTLibraryFactory()
+ {
+ return (EXTLibraryFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ bookEClass = createEClass(BOOK);
+ createEAttribute(bookEClass, BOOK__TITLE);
+ createEAttribute(bookEClass, BOOK__PAGES);
+ createEAttribute(bookEClass, BOOK__CATEGORY);
+ createEReference(bookEClass, BOOK__AUTHOR);
+
+ libraryEClass = createEClass(LIBRARY);
+ createEAttribute(libraryEClass, LIBRARY__NAME);
+ createEReference(libraryEClass, LIBRARY__WRITERS);
+ createEReference(libraryEClass, LIBRARY__EMPLOYEES);
+ createEReference(libraryEClass, LIBRARY__BORROWERS);
+ createEReference(libraryEClass, LIBRARY__STOCK);
+ createEReference(libraryEClass, LIBRARY__BOOKS);
+ createEReference(libraryEClass, LIBRARY__BRANCHES);
+ createEReference(libraryEClass, LIBRARY__PARENT_BRANCH);
+ createEAttribute(libraryEClass, LIBRARY__PEOPLE);
+
+ writerEClass = createEClass(WRITER);
+ createEAttribute(writerEClass, WRITER__NAME);
+ createEReference(writerEClass, WRITER__BOOKS);
+
+ itemEClass = createEClass(ITEM);
+ createEAttribute(itemEClass, ITEM__PUBLICATION_DATE);
+
+ lendableEClass = createEClass(LENDABLE);
+ createEAttribute(lendableEClass, LENDABLE__COPIES);
+ createEReference(lendableEClass, LENDABLE__BORROWERS);
+
+ circulatingItemEClass = createEClass(CIRCULATING_ITEM);
+
+ periodicalEClass = createEClass(PERIODICAL);
+ createEAttribute(periodicalEClass, PERIODICAL__TITLE);
+ createEAttribute(periodicalEClass, PERIODICAL__ISSUES_PER_YEAR);
+
+ audioVisualItemEClass = createEClass(AUDIO_VISUAL_ITEM);
+ createEAttribute(audioVisualItemEClass, AUDIO_VISUAL_ITEM__TITLE);
+ createEAttribute(audioVisualItemEClass, AUDIO_VISUAL_ITEM__MINUTES_LENGTH);
+ createEAttribute(audioVisualItemEClass, AUDIO_VISUAL_ITEM__DAMAGED);
+
+ bookOnTapeEClass = createEClass(BOOK_ON_TAPE);
+ createEReference(bookOnTapeEClass, BOOK_ON_TAPE__READER);
+ createEReference(bookOnTapeEClass, BOOK_ON_TAPE__AUTHOR);
+
+ videoCassetteEClass = createEClass(VIDEO_CASSETTE);
+ createEReference(videoCassetteEClass, VIDEO_CASSETTE__CAST);
+
+ borrowerEClass = createEClass(BORROWER);
+ createEReference(borrowerEClass, BORROWER__BORROWED);
+
+ personEClass = createEClass(PERSON);
+ createEAttribute(personEClass, PERSON__FIRST_NAME);
+ createEAttribute(personEClass, PERSON__LAST_NAME);
+
+ employeeEClass = createEClass(EMPLOYEE);
+ createEReference(employeeEClass, EMPLOYEE__MANAGER);
+
+ addressableEClass = createEClass(ADDRESSABLE);
+ createEAttribute(addressableEClass, ADDRESSABLE__ADDRESS);
+
+ // Create enums
+ bookCategoryEEnum = createEEnum(BOOK_CATEGORY);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ bookEClass.getESuperTypes().add(this.getCirculatingItem());
+ libraryEClass.getESuperTypes().add(this.getAddressable());
+ writerEClass.getESuperTypes().add(this.getPerson());
+ circulatingItemEClass.getESuperTypes().add(this.getItem());
+ circulatingItemEClass.getESuperTypes().add(this.getLendable());
+ periodicalEClass.getESuperTypes().add(this.getItem());
+ audioVisualItemEClass.getESuperTypes().add(this.getCirculatingItem());
+ bookOnTapeEClass.getESuperTypes().add(this.getAudioVisualItem());
+ videoCassetteEClass.getESuperTypes().add(this.getAudioVisualItem());
+ borrowerEClass.getESuperTypes().add(this.getPerson());
+ personEClass.getESuperTypes().add(this.getAddressable());
+ employeeEClass.getESuperTypes().add(this.getPerson());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(bookEClass, Book.class, "Book", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getBook_Title(), ecorePackage.getEString(), "title", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getBook_Pages(), ecorePackage.getEInt(), "pages", "100", 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+ initEAttribute(getBook_Category(), this.getBookCategory(), "category", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getBook_Author(), this.getWriter(), this.getWriter_Books(), "author", null, 1, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(libraryEClass, Library.class, "Library", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getLibrary_Name(), ecorePackage.getEString(), "name", null, 0, 1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getLibrary_Writers(), this.getWriter(), null, "writers", null, 0, -1, Library.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getLibrary_Employees(), this.getEmployee(), null, "employees", null, 0, -1, Library.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getLibrary_Borrowers(), this.getBorrower(), null, "borrowers", null, 0, -1, Library.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getLibrary_Stock(), this.getItem(), null, "stock", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
+ initEReference(getLibrary_Books(), this.getBook(), null, "books", null, 0, -1, Library.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
+ initEReference(getLibrary_Branches(), this.getLibrary(), this.getLibrary_ParentBranch(), "branches", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getLibrary_ParentBranch(), this.getLibrary(), this.getLibrary_Branches(), "parentBranch", null, 0, 1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getLibrary_People(), ecorePackage.getEFeatureMapEntry(), "people", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(writerEClass, Writer.class, "Writer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getWriter_Name(), ecorePackage.getEString(), "name", null, 0, 1, Writer.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getWriter_Books(), this.getBook(), this.getBook_Author(), "books", null, 0, -1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(itemEClass, Item.class, "Item", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getItem_PublicationDate(), ecorePackage.getEDate(), "publicationDate", null, 0, 1, Item.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(lendableEClass, Lendable.class, "Lendable", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getLendable_Copies(), ecorePackage.getEInt(), "copies", null, 1, 1, Lendable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getLendable_Borrowers(), this.getBorrower(), this.getBorrower_Borrowed(), "borrowers", null, 0, -1, Lendable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(circulatingItemEClass, CirculatingItem.class, "CirculatingItem", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(periodicalEClass, Periodical.class, "Periodical", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getPeriodical_Title(), ecorePackage.getEString(), "title", null, 0, 1, Periodical.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPeriodical_IssuesPerYear(), ecorePackage.getEInt(), "issuesPerYear", null, 1, 1, Periodical.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(audioVisualItemEClass, AudioVisualItem.class, "AudioVisualItem", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getAudioVisualItem_Title(), ecorePackage.getEString(), "title", null, 0, 1, AudioVisualItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getAudioVisualItem_MinutesLength(), ecorePackage.getEInt(), "minutesLength", null, 1, 1, AudioVisualItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getAudioVisualItem_Damaged(), ecorePackage.getEBoolean(), "damaged", null, 0, 1, AudioVisualItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(bookOnTapeEClass, BookOnTape.class, "BookOnTape", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getBookOnTape_Reader(), this.getPerson(), null, "reader", null, 0, 1, BookOnTape.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getBookOnTape_Author(), this.getWriter(), null, "author", null, 0, 1, BookOnTape.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(videoCassetteEClass, VideoCassette.class, "VideoCassette", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getVideoCassette_Cast(), this.getPerson(), null, "cast", null, 0, -1, VideoCassette.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(borrowerEClass, Borrower.class, "Borrower", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getBorrower_Borrowed(), this.getLendable(), this.getLendable_Borrowers(), "borrowed", null, 0, -1, Borrower.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(personEClass, Person.class, "Person", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getPerson_FirstName(), ecorePackage.getEString(), "firstName", null, 1, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPerson_LastName(), ecorePackage.getEString(), "lastName", null, 1, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(employeeEClass, Employee.class, "Employee", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getEmployee_Manager(), this.getEmployee(), null, "manager", null, 0, 1, Employee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(addressableEClass, Addressable.class, "Addressable", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getAddressable_Address(), ecorePackage.getEString(), "address", null, 0, 1, Addressable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ // Initialize enums and add enum literals
+ initEEnum(bookCategoryEEnum, BookCategory.class, "BookCategory"); //$NON-NLS-1$
+ addEEnumLiteral(bookCategoryEEnum, BookCategory.MYSTERY_LITERAL);
+ addEEnumLiteral(bookCategoryEEnum, BookCategory.SCIENCE_FICTION_LITERAL);
+ addEEnumLiteral(bookCategoryEEnum, BookCategory.BIOGRAPHY_LITERAL);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
+ createExtendedMetaDataAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createExtendedMetaDataAnnotations()
+ {
+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$
+ addAnnotation
+ (getLibrary_Writers(),
+ source,
+ new String[] {
+ "group", "#people" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation
+ (getLibrary_Employees(),
+ source,
+ new String[] {
+ "group", "#people" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation
+ (getLibrary_Borrowers(),
+ source,
+ new String[] {
+ "group", "#people" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation
+ (getLibrary_People(),
+ source,
+ new String[] {
+ "kind", "group" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+} //EXTLibraryPackageImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/EmployeeImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/EmployeeImpl.java
new file mode 100644
index 000000000..5e1130ffd
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/EmployeeImpl.java
@@ -0,0 +1,175 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Employee;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Employee</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.EmployeeImpl#getManager <em>Manager</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EmployeeImpl extends PersonImpl implements Employee
+{
+ /**
+ * The cached value of the '{@link #getManager() <em>Manager</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getManager()
+ * @generated
+ * @ordered
+ */
+ protected Employee manager;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EmployeeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.EMPLOYEE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Employee getManager()
+ {
+ if (manager != null && manager.eIsProxy()) {
+ InternalEObject oldManager = (InternalEObject)manager;
+ manager = (Employee)eResolveProxy(oldManager);
+ if (manager != oldManager) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, EXTLibraryPackage.EMPLOYEE__MANAGER, oldManager, manager));
+ }
+ }
+ return manager;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Employee basicGetManager()
+ {
+ return manager;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setManager(Employee newManager)
+ {
+ Employee oldManager = manager;
+ manager = newManager;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.EMPLOYEE__MANAGER, oldManager, manager));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.EMPLOYEE__MANAGER:
+ if (resolve) return getManager();
+ return basicGetManager();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.EMPLOYEE__MANAGER:
+ setManager((Employee)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.EMPLOYEE__MANAGER:
+ setManager((Employee)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.EMPLOYEE__MANAGER:
+ return manager != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //EmployeeImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/ItemImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/ItemImpl.java
new file mode 100644
index 000000000..b72b4975d
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/ItemImpl.java
@@ -0,0 +1,185 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import java.util.Date;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Item;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Item</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.ItemImpl#getPublicationDate <em>Publication Date</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ItemImpl extends MinimalEObjectImpl.Container implements Item
+{
+ /**
+ * The default value of the '{@link #getPublicationDate() <em>Publication Date</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPublicationDate()
+ * @generated
+ * @ordered
+ */
+ protected static final Date PUBLICATION_DATE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPublicationDate() <em>Publication Date</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPublicationDate()
+ * @generated
+ * @ordered
+ */
+ protected Date publicationDate = PUBLICATION_DATE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ItemImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.ITEM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Date getPublicationDate()
+ {
+ return publicationDate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPublicationDate(Date newPublicationDate)
+ {
+ Date oldPublicationDate = publicationDate;
+ publicationDate = newPublicationDate;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.ITEM__PUBLICATION_DATE, oldPublicationDate, publicationDate));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.ITEM__PUBLICATION_DATE:
+ return getPublicationDate();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.ITEM__PUBLICATION_DATE:
+ setPublicationDate((Date)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.ITEM__PUBLICATION_DATE:
+ setPublicationDate(PUBLICATION_DATE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.ITEM__PUBLICATION_DATE:
+ return PUBLICATION_DATE_EDEFAULT == null ? publicationDate != null : !PUBLICATION_DATE_EDEFAULT.equals(publicationDate);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (publicationDate: "); //$NON-NLS-1$
+ result.append(publicationDate);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ItemImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/LibraryImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/LibraryImpl.java
new file mode 100644
index 000000000..40cc477b3
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/LibraryImpl.java
@@ -0,0 +1,661 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.BasicFeatureMap;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EObjectEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.FeatureMap;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.emf.examples.extlibrary.Book;
+import org.eclipse.emf.examples.extlibrary.Borrower;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Employee;
+import org.eclipse.emf.examples.extlibrary.Item;
+import org.eclipse.emf.examples.extlibrary.Library;
+import org.eclipse.emf.examples.extlibrary.Writer;
+
+//import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Library</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.LibraryImpl#getAddress <em>Address</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.LibraryImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.LibraryImpl#getWriters <em>Writers</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.LibraryImpl#getEmployees <em>Employees</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.LibraryImpl#getBorrowers <em>Borrowers</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.LibraryImpl#getStock <em>Stock</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.LibraryImpl#getBooks <em>Books</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.LibraryImpl#getBranches <em>Branches</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.LibraryImpl#getParentBranch <em>Parent Branch</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.LibraryImpl#getPeople <em>People</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class LibraryImpl extends MinimalEObjectImpl.Container implements Library
+{
+ /**
+ * The default value of the '{@link #getAddress() <em>Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAddress()
+ * @generated
+ * @ordered
+ */
+ protected static final String ADDRESS_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getAddress() <em>Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAddress()
+ * @generated
+ * @ordered
+ */
+ protected String address = ADDRESS_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getStock() <em>Stock</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStock()
+ * @generated
+ * @ordered
+ */
+ protected EList<Item> stock;
+
+ /**
+ * The cached value of the '{@link #getBooks() <em>Books</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBooks()
+ * @generated
+ * @ordered
+ */
+ protected EList<Book> books;
+
+ /**
+ * The cached value of the '{@link #getBranches() <em>Branches</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBranches()
+ * @generated
+ * @ordered
+ */
+ protected EList<Library> branches;
+
+ /**
+ * The cached value of the '{@link #getPeople() <em>People</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPeople()
+ * @generated
+ * @ordered
+ */
+ protected FeatureMap people;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected LibraryImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.LIBRARY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getAddress()
+ {
+ return address;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAddress(String newAddress)
+ {
+ String oldAddress = address;
+ address = newAddress;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.LIBRARY__ADDRESS, oldAddress, address));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.LIBRARY__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Writer> getWriters()
+ {
+ return getPeople().list(EXTLibraryPackage.Literals.LIBRARY__WRITERS);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Employee> getEmployees()
+ {
+ return getPeople().list(EXTLibraryPackage.Literals.LIBRARY__EMPLOYEES);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Borrower> getBorrowers()
+ {
+ return getPeople().list(EXTLibraryPackage.Literals.LIBRARY__BORROWERS);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<Item> getStock()
+ {
+ if (stock == null)
+ {
+ // create a custom list implementation that synchronizes its book
+ // content with the "books" subset
+ stock = new EObjectContainmentEList<Item>(Item.class, this, EXTLibraryPackage.LIBRARY__STOCK)
+ {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void didAdd(int index, Item newObject)
+ {
+ if ((newObject instanceof Book) && !getBooks().contains(newObject))
+ {
+ // these lists are unordered, so index doesn't matter
+ getBooks().add((Book)newObject);
+ }
+ }
+
+ @Override
+ protected void didRemove(int index, Item oldObject)
+ {
+ if ((oldObject instanceof Book) && getBooks().contains(oldObject))
+ {
+ // these lists are unordered, so index doesn't matter
+ getBooks().remove(oldObject);
+ }
+ }
+
+ @Override
+ protected void didSet(int index, Item newObject, Item oldObject)
+ {
+ didRemove(index, oldObject);
+ didAdd(index, newObject);
+ }
+ };
+ }
+ return stock;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<Book> getBooks()
+ {
+ if (books == null)
+ {
+ // create a custom list implementation that synchronizes its content
+ // with the "stock" superset
+ books = new EObjectEList<Book>(Book.class, this, EXTLibraryPackage.LIBRARY__BOOKS)
+ {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void didAdd(int index, Book newObject)
+ {
+ if (getStock().indexOf(newObject) == -1)
+ {
+ // these lists are unordered, so index doesn't matter
+ getStock().add(newObject);
+ }
+ }
+
+ @Override
+ protected void didRemove(int index, Book oldObject)
+ {
+ if (getStock().indexOf(oldObject) != -1)
+ {
+ // these lists are unordered, so index doesn't matter
+ getStock().remove(oldObject);
+ }
+ }
+
+ @Override
+ protected void didSet(int index, Book newObject, Book oldObject)
+ {
+ didRemove(index, oldObject);
+ didAdd(index, newObject);
+ }
+ };
+ }
+
+ return books;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Library> getBranches()
+ {
+ if (branches == null) {
+ branches = new EObjectContainmentWithInverseEList.Resolving<Library>(Library.class, this, EXTLibraryPackage.LIBRARY__BRANCHES, EXTLibraryPackage.LIBRARY__PARENT_BRANCH);
+ }
+ return branches;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Library getParentBranch()
+ {
+ if (eContainerFeatureID() != EXTLibraryPackage.LIBRARY__PARENT_BRANCH) return null;
+ return (Library)eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Library basicGetParentBranch()
+ {
+ if (eContainerFeatureID() != EXTLibraryPackage.LIBRARY__PARENT_BRANCH) return null;
+ return (Library)eInternalContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetParentBranch(Library newParentBranch, NotificationChain msgs)
+ {
+ msgs = eBasicSetContainer((InternalEObject)newParentBranch, EXTLibraryPackage.LIBRARY__PARENT_BRANCH, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentBranch(Library newParentBranch)
+ {
+ if (newParentBranch != eInternalContainer() || (eContainerFeatureID() != EXTLibraryPackage.LIBRARY__PARENT_BRANCH && newParentBranch != null)) {
+ if (EcoreUtil.isAncestor(this, newParentBranch))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newParentBranch != null)
+ msgs = ((InternalEObject)newParentBranch).eInverseAdd(this, EXTLibraryPackage.LIBRARY__BRANCHES, Library.class, msgs);
+ msgs = basicSetParentBranch(newParentBranch, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.LIBRARY__PARENT_BRANCH, newParentBranch, newParentBranch));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FeatureMap getPeople()
+ {
+ if (people == null) {
+ people = new BasicFeatureMap(this, EXTLibraryPackage.LIBRARY__PEOPLE);
+ }
+ return people;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.LIBRARY__BRANCHES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getBranches()).basicAdd(otherEnd, msgs);
+ case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetParentBranch((Library)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.LIBRARY__WRITERS:
+ return ((InternalEList<?>)getWriters()).basicRemove(otherEnd, msgs);
+ case EXTLibraryPackage.LIBRARY__EMPLOYEES:
+ return ((InternalEList<?>)getEmployees()).basicRemove(otherEnd, msgs);
+ case EXTLibraryPackage.LIBRARY__BORROWERS:
+ return ((InternalEList<?>)getBorrowers()).basicRemove(otherEnd, msgs);
+ case EXTLibraryPackage.LIBRARY__STOCK:
+ return ((InternalEList<?>)getStock()).basicRemove(otherEnd, msgs);
+ case EXTLibraryPackage.LIBRARY__BRANCHES:
+ return ((InternalEList<?>)getBranches()).basicRemove(otherEnd, msgs);
+ case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
+ return basicSetParentBranch(null, msgs);
+ case EXTLibraryPackage.LIBRARY__PEOPLE:
+ return ((InternalEList<?>)getPeople()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+ {
+ switch (eContainerFeatureID()) {
+ case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
+ return eInternalContainer().eInverseRemove(this, EXTLibraryPackage.LIBRARY__BRANCHES, Library.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.LIBRARY__ADDRESS:
+ return getAddress();
+ case EXTLibraryPackage.LIBRARY__NAME:
+ return getName();
+ case EXTLibraryPackage.LIBRARY__WRITERS:
+ return getWriters();
+ case EXTLibraryPackage.LIBRARY__EMPLOYEES:
+ return getEmployees();
+ case EXTLibraryPackage.LIBRARY__BORROWERS:
+ return getBorrowers();
+ case EXTLibraryPackage.LIBRARY__STOCK:
+ return getStock();
+ case EXTLibraryPackage.LIBRARY__BOOKS:
+ return getBooks();
+ case EXTLibraryPackage.LIBRARY__BRANCHES:
+ return getBranches();
+ case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
+ if (resolve) return getParentBranch();
+ return basicGetParentBranch();
+ case EXTLibraryPackage.LIBRARY__PEOPLE:
+ if (coreType) return getPeople();
+ return ((FeatureMap.Internal)getPeople()).getWrapper();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.LIBRARY__ADDRESS:
+ setAddress((String)newValue);
+ return;
+ case EXTLibraryPackage.LIBRARY__NAME:
+ setName((String)newValue);
+ return;
+ case EXTLibraryPackage.LIBRARY__WRITERS:
+ getWriters().clear();
+ getWriters().addAll((Collection<? extends Writer>)newValue);
+ return;
+ case EXTLibraryPackage.LIBRARY__EMPLOYEES:
+ getEmployees().clear();
+ getEmployees().addAll((Collection<? extends Employee>)newValue);
+ return;
+ case EXTLibraryPackage.LIBRARY__BORROWERS:
+ getBorrowers().clear();
+ getBorrowers().addAll((Collection<? extends Borrower>)newValue);
+ return;
+ case EXTLibraryPackage.LIBRARY__STOCK:
+ getStock().clear();
+ getStock().addAll((Collection<? extends Item>)newValue);
+ return;
+ case EXTLibraryPackage.LIBRARY__BOOKS:
+ getBooks().clear();
+ getBooks().addAll((Collection<? extends Book>)newValue);
+ return;
+ case EXTLibraryPackage.LIBRARY__BRANCHES:
+ getBranches().clear();
+ getBranches().addAll((Collection<? extends Library>)newValue);
+ return;
+ case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
+ setParentBranch((Library)newValue);
+ return;
+ case EXTLibraryPackage.LIBRARY__PEOPLE:
+ ((FeatureMap.Internal)getPeople()).set(newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.LIBRARY__ADDRESS:
+ setAddress(ADDRESS_EDEFAULT);
+ return;
+ case EXTLibraryPackage.LIBRARY__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case EXTLibraryPackage.LIBRARY__WRITERS:
+ getWriters().clear();
+ return;
+ case EXTLibraryPackage.LIBRARY__EMPLOYEES:
+ getEmployees().clear();
+ return;
+ case EXTLibraryPackage.LIBRARY__BORROWERS:
+ getBorrowers().clear();
+ return;
+ case EXTLibraryPackage.LIBRARY__STOCK:
+ getStock().clear();
+ return;
+ case EXTLibraryPackage.LIBRARY__BOOKS:
+ getBooks().clear();
+ return;
+ case EXTLibraryPackage.LIBRARY__BRANCHES:
+ getBranches().clear();
+ return;
+ case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
+ setParentBranch((Library)null);
+ return;
+ case EXTLibraryPackage.LIBRARY__PEOPLE:
+ getPeople().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.LIBRARY__ADDRESS:
+ return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
+ case EXTLibraryPackage.LIBRARY__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case EXTLibraryPackage.LIBRARY__WRITERS:
+ return !getWriters().isEmpty();
+ case EXTLibraryPackage.LIBRARY__EMPLOYEES:
+ return !getEmployees().isEmpty();
+ case EXTLibraryPackage.LIBRARY__BORROWERS:
+ return !getBorrowers().isEmpty();
+ case EXTLibraryPackage.LIBRARY__STOCK:
+ return stock != null && !stock.isEmpty();
+ case EXTLibraryPackage.LIBRARY__BOOKS:
+ return books != null && !books.isEmpty();
+ case EXTLibraryPackage.LIBRARY__BRANCHES:
+ return branches != null && !branches.isEmpty();
+ case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
+ return basicGetParentBranch() != null;
+ case EXTLibraryPackage.LIBRARY__PEOPLE:
+ return people != null && !people.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (address: "); //$NON-NLS-1$
+ result.append(address);
+ result.append(", name: "); //$NON-NLS-1$
+ result.append(name);
+ result.append(", people: "); //$NON-NLS-1$
+ result.append(people);
+ result.append(')');
+ return result.toString();
+ }
+
+} //LibraryImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/PeriodicalImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/PeriodicalImpl.java
new file mode 100644
index 000000000..4e030b4cd
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/PeriodicalImpl.java
@@ -0,0 +1,237 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Periodical;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Periodical</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.PeriodicalImpl#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.PeriodicalImpl#getIssuesPerYear <em>Issues Per Year</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class PeriodicalImpl extends ItemImpl implements Periodical
+{
+ /**
+ * The default value of the '{@link #getTitle() <em>Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTitle()
+ * @generated
+ * @ordered
+ */
+ protected static final String TITLE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTitle() <em>Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTitle()
+ * @generated
+ * @ordered
+ */
+ protected String title = TITLE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getIssuesPerYear() <em>Issues Per Year</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIssuesPerYear()
+ * @generated
+ * @ordered
+ */
+ protected static final int ISSUES_PER_YEAR_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getIssuesPerYear() <em>Issues Per Year</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIssuesPerYear()
+ * @generated
+ * @ordered
+ */
+ protected int issuesPerYear = ISSUES_PER_YEAR_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PeriodicalImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.PERIODICAL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTitle()
+ {
+ return title;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTitle(String newTitle)
+ {
+ String oldTitle = title;
+ title = newTitle;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.PERIODICAL__TITLE, oldTitle, title));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getIssuesPerYear()
+ {
+ return issuesPerYear;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIssuesPerYear(int newIssuesPerYear)
+ {
+ int oldIssuesPerYear = issuesPerYear;
+ issuesPerYear = newIssuesPerYear;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.PERIODICAL__ISSUES_PER_YEAR, oldIssuesPerYear, issuesPerYear));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.PERIODICAL__TITLE:
+ return getTitle();
+ case EXTLibraryPackage.PERIODICAL__ISSUES_PER_YEAR:
+ return getIssuesPerYear();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.PERIODICAL__TITLE:
+ setTitle((String)newValue);
+ return;
+ case EXTLibraryPackage.PERIODICAL__ISSUES_PER_YEAR:
+ setIssuesPerYear((Integer)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.PERIODICAL__TITLE:
+ setTitle(TITLE_EDEFAULT);
+ return;
+ case EXTLibraryPackage.PERIODICAL__ISSUES_PER_YEAR:
+ setIssuesPerYear(ISSUES_PER_YEAR_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.PERIODICAL__TITLE:
+ return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
+ case EXTLibraryPackage.PERIODICAL__ISSUES_PER_YEAR:
+ return issuesPerYear != ISSUES_PER_YEAR_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (title: "); //$NON-NLS-1$
+ result.append(title);
+ result.append(", issuesPerYear: "); //$NON-NLS-1$
+ result.append(issuesPerYear);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PeriodicalImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/PersonImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/PersonImpl.java
new file mode 100644
index 000000000..77c696944
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/PersonImpl.java
@@ -0,0 +1,295 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Person;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Person</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.PersonImpl#getAddress <em>Address</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.PersonImpl#getFirstName <em>First Name</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.PersonImpl#getLastName <em>Last Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PersonImpl extends MinimalEObjectImpl.Container implements Person
+{
+ /**
+ * The default value of the '{@link #getAddress() <em>Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAddress()
+ * @generated
+ * @ordered
+ */
+ protected static final String ADDRESS_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getAddress() <em>Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAddress()
+ * @generated
+ * @ordered
+ */
+ protected String address = ADDRESS_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getFirstName() <em>First Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFirstName()
+ * @generated
+ * @ordered
+ */
+ protected static final String FIRST_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getFirstName() <em>First Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFirstName()
+ * @generated
+ * @ordered
+ */
+ protected String firstName = FIRST_NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLastName() <em>Last Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLastName()
+ * @generated
+ * @ordered
+ */
+ protected static final String LAST_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLastName() <em>Last Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLastName()
+ * @generated
+ * @ordered
+ */
+ protected String lastName = LAST_NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PersonImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.PERSON;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getAddress()
+ {
+ return address;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAddress(String newAddress)
+ {
+ String oldAddress = address;
+ address = newAddress;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.PERSON__ADDRESS, oldAddress, address));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getFirstName()
+ {
+ return firstName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFirstName(String newFirstName)
+ {
+ String oldFirstName = firstName;
+ firstName = newFirstName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.PERSON__FIRST_NAME, oldFirstName, firstName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLastName()
+ {
+ return lastName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLastName(String newLastName)
+ {
+ String oldLastName = lastName;
+ lastName = newLastName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.PERSON__LAST_NAME, oldLastName, lastName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.PERSON__ADDRESS:
+ return getAddress();
+ case EXTLibraryPackage.PERSON__FIRST_NAME:
+ return getFirstName();
+ case EXTLibraryPackage.PERSON__LAST_NAME:
+ return getLastName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.PERSON__ADDRESS:
+ setAddress((String)newValue);
+ return;
+ case EXTLibraryPackage.PERSON__FIRST_NAME:
+ setFirstName((String)newValue);
+ return;
+ case EXTLibraryPackage.PERSON__LAST_NAME:
+ setLastName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.PERSON__ADDRESS:
+ setAddress(ADDRESS_EDEFAULT);
+ return;
+ case EXTLibraryPackage.PERSON__FIRST_NAME:
+ setFirstName(FIRST_NAME_EDEFAULT);
+ return;
+ case EXTLibraryPackage.PERSON__LAST_NAME:
+ setLastName(LAST_NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.PERSON__ADDRESS:
+ return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
+ case EXTLibraryPackage.PERSON__FIRST_NAME:
+ return FIRST_NAME_EDEFAULT == null ? firstName != null : !FIRST_NAME_EDEFAULT.equals(firstName);
+ case EXTLibraryPackage.PERSON__LAST_NAME:
+ return LAST_NAME_EDEFAULT == null ? lastName != null : !LAST_NAME_EDEFAULT.equals(lastName);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (address: "); //$NON-NLS-1$
+ result.append(address);
+ result.append(", firstName: "); //$NON-NLS-1$
+ result.append(firstName);
+ result.append(", lastName: "); //$NON-NLS-1$
+ result.append(lastName);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PersonImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/VideoCassetteImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/VideoCassetteImpl.java
new file mode 100644
index 000000000..2616ea655
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/VideoCassetteImpl.java
@@ -0,0 +1,148 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import java.util.Collection;
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Person;
+import org.eclipse.emf.examples.extlibrary.VideoCassette;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Video Cassette</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.VideoCassetteImpl#getCast <em>Cast</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class VideoCassetteImpl extends AudioVisualItemImpl implements VideoCassette
+{
+ /**
+ * The cached value of the '{@link #getCast() <em>Cast</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCast()
+ * @generated
+ * @ordered
+ */
+ protected EList<Person> cast;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VideoCassetteImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.VIDEO_CASSETTE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Person> getCast()
+ {
+ if (cast == null) {
+ cast = new EObjectResolvingEList<Person>(Person.class, this, EXTLibraryPackage.VIDEO_CASSETTE__CAST);
+ }
+ return cast;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.VIDEO_CASSETTE__CAST:
+ return getCast();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.VIDEO_CASSETTE__CAST:
+ getCast().clear();
+ getCast().addAll((Collection<? extends Person>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.VIDEO_CASSETTE__CAST:
+ getCast().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.VIDEO_CASSETTE__CAST:
+ return cast != null && !cast.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //VideoCassetteImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/WriterImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/WriterImpl.java
new file mode 100644
index 000000000..481a42c1a
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/WriterImpl.java
@@ -0,0 +1,271 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.emf.examples.extlibrary.Book;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Writer;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Writer</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.WriterImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.WriterImpl#getBooks <em>Books</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class WriterImpl extends PersonImpl implements Writer
+{
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getBooks() <em>Books</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBooks()
+ * @generated
+ * @ordered
+ */
+ protected EList<Book> books;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected WriterImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.WRITER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String getName()
+ {
+ if (getFirstName() == null)
+ {
+ if (getLastName() == null)
+ {
+ return ""; //$NON-NLS-1$
+ }
+ else
+ {
+ return getLastName();
+ }
+ }
+ else if (getLastName() == null)
+ {
+ return getFirstName();
+ }
+ else
+ {
+ StringBuffer result = new StringBuffer();
+
+ result.append(getFirstName()).append(' ').append(getLastName());
+
+ return result.toString();
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public void setName(String newName)
+ {
+ if (newName == null || newName.length() == 0)
+ {
+ setFirstName(null);
+ setLastName(null);
+ }
+ else
+ {
+ int comma = newName.indexOf(',');
+ if (comma < 0)
+ {
+ comma = newName.indexOf(' ');
+ }
+
+ if (comma >= 0)
+ {
+ setFirstName(newName.substring(0, comma).trim());
+ setLastName(newName.substring(comma + 1).trim());
+ }
+ else
+ {
+ setFirstName(newName);
+ setLastName(null);
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Book> getBooks()
+ {
+ if (books == null) {
+ books = new EObjectWithInverseResolvingEList<Book>(Book.class, this, EXTLibraryPackage.WRITER__BOOKS, EXTLibraryPackage.BOOK__AUTHOR);
+ }
+ return books;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.WRITER__BOOKS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getBooks()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.WRITER__BOOKS:
+ return ((InternalEList<?>)getBooks()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.WRITER__NAME:
+ return getName();
+ case EXTLibraryPackage.WRITER__BOOKS:
+ return getBooks();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.WRITER__NAME:
+ setName((String)newValue);
+ return;
+ case EXTLibraryPackage.WRITER__BOOKS:
+ getBooks().clear();
+ getBooks().addAll((Collection<? extends Book>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.WRITER__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case EXTLibraryPackage.WRITER__BOOKS:
+ getBooks().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.WRITER__NAME:
+ return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName());
+ case EXTLibraryPackage.WRITER__BOOKS:
+ return books != null && !books.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //WriterImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibraryAdapterFactory.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibraryAdapterFactory.java
new file mode 100644
index 000000000..36b064c18
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibraryAdapterFactory.java
@@ -0,0 +1,383 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.util;
+
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.examples.extlibrary.*;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage
+ * @generated
+ */
+public class EXTLibraryAdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static EXTLibraryPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibraryAdapterFactory()
+ {
+ if (modelPackage == null) {
+ modelPackage = EXTLibraryPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object)
+ {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EXTLibrarySwitch<Adapter> modelSwitch =
+ new EXTLibrarySwitch<Adapter>() {
+ @Override
+ public Adapter caseBook(Book object) {
+ return createBookAdapter();
+ }
+ @Override
+ public Adapter caseLibrary(Library object) {
+ return createLibraryAdapter();
+ }
+ @Override
+ public Adapter caseWriter(Writer object) {
+ return createWriterAdapter();
+ }
+ @Override
+ public Adapter caseItem(Item object) {
+ return createItemAdapter();
+ }
+ @Override
+ public Adapter caseLendable(Lendable object) {
+ return createLendableAdapter();
+ }
+ @Override
+ public Adapter caseCirculatingItem(CirculatingItem object) {
+ return createCirculatingItemAdapter();
+ }
+ @Override
+ public Adapter casePeriodical(Periodical object) {
+ return createPeriodicalAdapter();
+ }
+ @Override
+ public Adapter caseAudioVisualItem(AudioVisualItem object) {
+ return createAudioVisualItemAdapter();
+ }
+ @Override
+ public Adapter caseBookOnTape(BookOnTape object) {
+ return createBookOnTapeAdapter();
+ }
+ @Override
+ public Adapter caseVideoCassette(VideoCassette object) {
+ return createVideoCassetteAdapter();
+ }
+ @Override
+ public Adapter caseBorrower(Borrower object) {
+ return createBorrowerAdapter();
+ }
+ @Override
+ public Adapter casePerson(Person object) {
+ return createPersonAdapter();
+ }
+ @Override
+ public Adapter caseEmployee(Employee object) {
+ return createEmployeeAdapter();
+ }
+ @Override
+ public Adapter caseAddressable(Addressable object) {
+ return createAddressableAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target)
+ {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.Book <em>Book</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.Book
+ * @generated
+ */
+ public Adapter createBookAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.Library <em>Library</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.Library
+ * @generated
+ */
+ public Adapter createLibraryAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.Writer <em>Writer</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.Writer
+ * @generated
+ */
+ public Adapter createWriterAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.Item <em>Item</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.Item
+ * @generated
+ */
+ public Adapter createItemAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.Lendable <em>Lendable</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.Lendable
+ * @generated
+ */
+ public Adapter createLendableAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.CirculatingItem <em>Circulating Item</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.CirculatingItem
+ * @generated
+ */
+ public Adapter createCirculatingItemAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.Periodical <em>Periodical</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.Periodical
+ * @generated
+ */
+ public Adapter createPeriodicalAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.AudioVisualItem <em>Audio Visual Item</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.AudioVisualItem
+ * @generated
+ */
+ public Adapter createAudioVisualItemAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.BookOnTape <em>Book On Tape</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.BookOnTape
+ * @generated
+ */
+ public Adapter createBookOnTapeAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.VideoCassette <em>Video Cassette</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.VideoCassette
+ * @generated
+ */
+ public Adapter createVideoCassetteAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.Borrower <em>Borrower</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.Borrower
+ * @generated
+ */
+ public Adapter createBorrowerAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.Person <em>Person</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.Person
+ * @generated
+ */
+ public Adapter createPersonAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.Employee <em>Employee</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.Employee
+ * @generated
+ */
+ public Adapter createEmployeeAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.examples.extlibrary.Addressable <em>Addressable</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.examples.extlibrary.Addressable
+ * @generated
+ */
+ public Adapter createAddressableAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter()
+ {
+ return null;
+ }
+
+} //EXTLibraryAdapterFactory
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibraryResourceFactoryImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibraryResourceFactoryImpl.java
new file mode 100644
index 000000000..75d1aab59
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibraryResourceFactoryImpl.java
@@ -0,0 +1,41 @@
+/**
+ */
+package org.eclipse.emf.examples.extlibrary.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.util.EXTLibraryResourceImpl
+ * @generated
+ */
+public class EXTLibraryResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibraryResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new EXTLibraryResourceImpl(uri);
+ return result;
+ }
+
+} //EXTLibraryResourceFactoryImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibraryResourceImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibraryResourceImpl.java
new file mode 100644
index 000000000..60679391c
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibraryResourceImpl.java
@@ -0,0 +1,36 @@
+/**
+ */
+package org.eclipse.emf.examples.extlibrary.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.util.EXTLibraryResourceFactoryImpl
+ * @generated
+ */
+public class EXTLibraryResourceImpl extends XMIResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public EXTLibraryResourceImpl(URI uri) {
+ super(uri);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#useUUIDs()
+ * @generated NOT
+ */
+ @Override
+ protected boolean useUUIDs() {
+ return true;
+ }
+} // EXTLibraryResourceImpl
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibrarySwitch.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibrarySwitch.java
new file mode 100644
index 000000000..3378dd203
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/util/EXTLibrarySwitch.java
@@ -0,0 +1,437 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.util;
+
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.emf.examples.extlibrary.*;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.examples.extlibrary.EXTLibraryPackage
+ * @generated
+ */
+public class EXTLibrarySwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static EXTLibraryPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EXTLibrarySwitch()
+ {
+ if (modelPackage == null) {
+ modelPackage = EXTLibraryPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject)
+ {
+ switch (classifierID) {
+ case EXTLibraryPackage.BOOK: {
+ Book book = (Book)theEObject;
+ T result = caseBook(book);
+ if (result == null) result = caseCirculatingItem(book);
+ if (result == null) result = caseItem(book);
+ if (result == null) result = caseLendable(book);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.LIBRARY: {
+ Library library = (Library)theEObject;
+ T result = caseLibrary(library);
+ if (result == null) result = caseAddressable(library);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.WRITER: {
+ Writer writer = (Writer)theEObject;
+ T result = caseWriter(writer);
+ if (result == null) result = casePerson(writer);
+ if (result == null) result = caseAddressable(writer);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.ITEM: {
+ Item item = (Item)theEObject;
+ T result = caseItem(item);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.LENDABLE: {
+ Lendable lendable = (Lendable)theEObject;
+ T result = caseLendable(lendable);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.CIRCULATING_ITEM: {
+ CirculatingItem circulatingItem = (CirculatingItem)theEObject;
+ T result = caseCirculatingItem(circulatingItem);
+ if (result == null) result = caseItem(circulatingItem);
+ if (result == null) result = caseLendable(circulatingItem);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.PERIODICAL: {
+ Periodical periodical = (Periodical)theEObject;
+ T result = casePeriodical(periodical);
+ if (result == null) result = caseItem(periodical);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.AUDIO_VISUAL_ITEM: {
+ AudioVisualItem audioVisualItem = (AudioVisualItem)theEObject;
+ T result = caseAudioVisualItem(audioVisualItem);
+ if (result == null) result = caseCirculatingItem(audioVisualItem);
+ if (result == null) result = caseItem(audioVisualItem);
+ if (result == null) result = caseLendable(audioVisualItem);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.BOOK_ON_TAPE: {
+ BookOnTape bookOnTape = (BookOnTape)theEObject;
+ T result = caseBookOnTape(bookOnTape);
+ if (result == null) result = caseAudioVisualItem(bookOnTape);
+ if (result == null) result = caseCirculatingItem(bookOnTape);
+ if (result == null) result = caseItem(bookOnTape);
+ if (result == null) result = caseLendable(bookOnTape);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.VIDEO_CASSETTE: {
+ VideoCassette videoCassette = (VideoCassette)theEObject;
+ T result = caseVideoCassette(videoCassette);
+ if (result == null) result = caseAudioVisualItem(videoCassette);
+ if (result == null) result = caseCirculatingItem(videoCassette);
+ if (result == null) result = caseItem(videoCassette);
+ if (result == null) result = caseLendable(videoCassette);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.BORROWER: {
+ Borrower borrower = (Borrower)theEObject;
+ T result = caseBorrower(borrower);
+ if (result == null) result = casePerson(borrower);
+ if (result == null) result = caseAddressable(borrower);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.PERSON: {
+ Person person = (Person)theEObject;
+ T result = casePerson(person);
+ if (result == null) result = caseAddressable(person);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.EMPLOYEE: {
+ Employee employee = (Employee)theEObject;
+ T result = caseEmployee(employee);
+ if (result == null) result = casePerson(employee);
+ if (result == null) result = caseAddressable(employee);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case EXTLibraryPackage.ADDRESSABLE: {
+ Addressable addressable = (Addressable)theEObject;
+ T result = caseAddressable(addressable);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Book</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Book</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBook(Book object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Library</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Library</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLibrary(Library object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Writer</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Writer</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseWriter(Writer object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Item</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Item</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseItem(Item object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Lendable</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Lendable</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLendable(Lendable object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Circulating Item</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Circulating Item</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCirculatingItem(CirculatingItem object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Periodical</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Periodical</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePeriodical(Periodical object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Audio Visual Item</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Audio Visual Item</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAudioVisualItem(AudioVisualItem object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Book On Tape</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Book On Tape</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBookOnTape(BookOnTape object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Video Cassette</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Video Cassette</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseVideoCassette(VideoCassette object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Borrower</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Borrower</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBorrower(Borrower object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Person</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Person</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePerson(Person object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Employee</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Employee</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEmployee(Employee object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Addressable</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Addressable</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAddressable(Addressable object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object)
+ {
+ return null;
+ }
+
+} //EXTLibrarySwitch

Back to the top