Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'deprecated/library (emf 2.3)')
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/.classpath7
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/.project28
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/META-INF/MANIFEST.MF14
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/build.properties14
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/icons/full/ctool16/CreateLibrary_books_Book.gifbin223 -> 0 bytes
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/icons/full/ctool16/CreateLibrary_writers_Writer.gifbin223 -> 0 bytes
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/icons/full/obj16/Book.gifbin129 -> 0 bytes
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/icons/full/obj16/Library.gifbin129 -> 0 bytes
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/icons/full/obj16/Writer.gifbin129 -> 0 bytes
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/plugin.properties51
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/plugin.xml25
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/BookItemProvider.java225
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/LibraryEditPlugin.java92
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/LibraryItemProvider.java200
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/LibraryItemProviderAdapterFactory.java245
-rw-r--r--deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/WriterItemProvider.java177
-rw-r--r--deprecated/library (emf 2.3)/Library.editor/.classpath7
-rw-r--r--deprecated/library (emf 2.3)/Library.editor/.project28
-rw-r--r--deprecated/library (emf 2.3)/Library.editor/META-INF/MANIFEST.MF17
-rw-r--r--deprecated/library (emf 2.3)/Library.editor/build.properties14
-rw-r--r--deprecated/library (emf 2.3)/Library.editor/icons/full/obj16/LibraryModelFile.gifbin346 -> 0 bytes
-rw-r--r--deprecated/library (emf 2.3)/Library.editor/icons/full/wizban/NewLibrary.gifbin2462 -> 0 bytes
-rw-r--r--deprecated/library (emf 2.3)/Library.editor/plugin.properties68
-rw-r--r--deprecated/library (emf 2.3)/Library.editor/plugin.xml41
-rw-r--r--deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryActionBarContributor.java420
-rw-r--r--deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryEditor.java1786
-rw-r--r--deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryEditorPlugin.java123
-rw-r--r--deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryModelWizard.java610
-rw-r--r--deprecated/library (emf 2.3)/Library.tests/.classpath7
-rw-r--r--deprecated/library (emf 2.3)/Library.tests/.project28
-rw-r--r--deprecated/library (emf 2.3)/Library.tests/META-INF/MANIFEST.MF14
-rw-r--r--deprecated/library (emf 2.3)/Library.tests/build.properties13
-rw-r--r--deprecated/library (emf 2.3)/Library.tests/plugin.properties20
-rw-r--r--deprecated/library (emf 2.3)/Library.tests/plugin.xml12
-rw-r--r--deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/BookTest.java91
-rw-r--r--deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryAllTests.java50
-rw-r--r--deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryExample.java128
-rw-r--r--deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryTest.java91
-rw-r--r--deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryTests.java50
-rw-r--r--deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/WriterTest.java91
-rw-r--r--deprecated/library (emf 2.3)/Library/.classpath7
-rw-r--r--deprecated/library (emf 2.3)/Library/.project28
-rw-r--r--deprecated/library (emf 2.3)/Library/META-INF/MANIFEST.MF17
-rw-r--r--deprecated/library (emf 2.3)/Library/build.properties14
-rw-r--r--deprecated/library (emf 2.3)/Library/model/library.ecore98
-rw-r--r--deprecated/library (emf 2.3)/Library/model/library.genmodel32
-rw-r--r--deprecated/library (emf 2.3)/Library/plugin.properties20
-rw-r--r--deprecated/library (emf 2.3)/Library/plugin.xml26
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/Book.java199
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/BookCategory.java178
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/Library.java93
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/LibraryFactory.java64
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/LibraryPackage.java520
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/Writer.java77
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/BookImpl.java451
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryFactoryImpl.java190
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryImpl.java255
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryPackageImpl.java484
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/WriterImpl.java231
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryAdapterFactory.java154
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryResourceFactoryImpl.java55
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryResourceImpl.java32
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibrarySwitch.java172
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryXMLProcessor.java51
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/validation/BookValidator.java25
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/validation/LibraryValidator.java23
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/validation/WriterValidator.java22
-rw-r--r--deprecated/library (emf 2.3)/Library/text/description.txt30
68 files changed, 0 insertions, 8335 deletions
diff --git a/deprecated/library (emf 2.3)/Library.edit/.classpath b/deprecated/library (emf 2.3)/Library.edit/.classpath
deleted file mode 100644
index 304e86186..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/deprecated/library (emf 2.3)/Library.edit/.project b/deprecated/library (emf 2.3)/Library.edit/.project
deleted file mode 100644
index bf6794b11..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>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/deprecated/library (emf 2.3)/Library.edit/META-INF/MANIFEST.MF b/deprecated/library (emf 2.3)/Library.edit/META-INF/MANIFEST.MF
deleted file mode 100644
index 8be67511c..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: Library.edit; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.example.library.provider.LibraryEditPlugin$Implementation
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.example.library.provider
-Require-Bundle: org.eclipse.core.runtime,
- Library;visibility:=reexport,
- org.eclipse.emf.edit;visibility:=reexport
-Eclipse-LazyStart: true
diff --git a/deprecated/library (emf 2.3)/Library.edit/build.properties b/deprecated/library (emf 2.3)/Library.edit/build.properties
deleted file mode 100644
index e727f8d8a..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: build.properties,v 1.1 2008/04/01 07:31:29 mtaal Exp $
-
-bin.includes = .,\
- icons/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-source.. = src/
-output.. = bin/
diff --git a/deprecated/library (emf 2.3)/Library.edit/icons/full/ctool16/CreateLibrary_books_Book.gif b/deprecated/library (emf 2.3)/Library.edit/icons/full/ctool16/CreateLibrary_books_Book.gif
deleted file mode 100644
index 9073955a8..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/icons/full/ctool16/CreateLibrary_books_Book.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/library (emf 2.3)/Library.edit/icons/full/ctool16/CreateLibrary_writers_Writer.gif b/deprecated/library (emf 2.3)/Library.edit/icons/full/ctool16/CreateLibrary_writers_Writer.gif
deleted file mode 100644
index 564bdbd77..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/icons/full/ctool16/CreateLibrary_writers_Writer.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/library (emf 2.3)/Library.edit/icons/full/obj16/Book.gif b/deprecated/library (emf 2.3)/Library.edit/icons/full/obj16/Book.gif
deleted file mode 100644
index c3370c7dd..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/icons/full/obj16/Book.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/library (emf 2.3)/Library.edit/icons/full/obj16/Library.gif b/deprecated/library (emf 2.3)/Library.edit/icons/full/obj16/Library.gif
deleted file mode 100644
index 739ebbfa6..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/icons/full/obj16/Library.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/library (emf 2.3)/Library.edit/icons/full/obj16/Writer.gif b/deprecated/library (emf 2.3)/Library.edit/icons/full/obj16/Writer.gif
deleted file mode 100644
index ef56c1408..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/icons/full/obj16/Writer.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/library (emf 2.3)/Library.edit/plugin.properties b/deprecated/library (emf 2.3)/Library.edit/plugin.properties
deleted file mode 100644
index bc5e0a229..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/plugin.properties
+++ /dev/null
@@ -1,51 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: plugin.properties,v 1.1 2008/04/01 07:31:29 mtaal Exp $
-
-# ====================================================================
-# To code developer:
-# Do NOT change the properties between this line and the
-# "%%% END OF TRANSLATED PROPERTIES %%%" line.
-# Make a new property name, append to the end of the file and change
-# the code to use the new property.
-# ====================================================================
-
-# ====================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# ====================================================================
-
-pluginName = Library Edit Support
-providerName = www.example.org
-
-_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_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_books_feature = Books
-_UI_Writer_name_feature = Name
-_UI_Writer_books_feature = Books
-_UI_Unknown_feature = Unspecified
-
-_UI_BookCategory_Mystery_literal = Mystery
-_UI_BookCategory_ScienceFiction_literal = ScienceFiction
-_UI_BookCategory_Biography_literal = Biography
diff --git a/deprecated/library (emf 2.3)/Library.edit/plugin.xml b/deprecated/library (emf 2.3)/Library.edit/plugin.xml
deleted file mode 100644
index adbbea3a2..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/plugin.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
- <copyright>
- </copyright>
-
- $Id: plugin.xml,v 1.1 2008/04/01 07:31:29 mtaal Exp $
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <factory
- uri = "http://www.example.eclipse.org/Library"
- class = "org.eclipse.example.library.provider.LibraryItemProviderAdapterFactory"
- 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/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/BookItemProvider.java b/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/BookItemProvider.java
deleted file mode 100644
index bbc846296..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/BookItemProvider.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: BookItemProvider.java,v 1.1 2008/04/01 07:31:29 mtaal Exp $
- */
-package org.eclipse.example.library.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.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.example.library.Book;
-import org.eclipse.example.library.LibraryPackage;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.example.library.Book} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class BookItemProvider
- 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 BookItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public List 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"),
- getString("_UI_PropertyDescriptor_description", "_UI_Book_title_feature", "_UI_Book_type"),
- LibraryPackage.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"),
- getString("_UI_PropertyDescriptor_description", "_UI_Book_pages_feature", "_UI_Book_type"),
- LibraryPackage.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"),
- getString("_UI_PropertyDescriptor_description", "_UI_Book_category_feature", "_UI_Book_type"),
- LibraryPackage.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"),
- getString("_UI_PropertyDescriptor_description", "_UI_Book_author_feature", "_UI_Book_type"),
- LibraryPackage.Literals.BOOK__AUTHOR,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This returns Book.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Book"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getText(Object object) {
- String label = ((Book)object).getTitle();
- return label == null || label.length() == 0 ?
- getString("_UI_Book_type") :
- getString("_UI_Book_type") + " " + label;
- }
-
- /**
- * 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
- */
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Book.class)) {
- case LibraryPackage.BOOK__TITLE:
- case LibraryPackage.BOOK__PAGES:
- case LibraryPackage.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
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return LibraryEditPlugin.INSTANCE;
- }
-
-}
diff --git a/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/LibraryEditPlugin.java b/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/LibraryEditPlugin.java
deleted file mode 100644
index c8bdee653..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/LibraryEditPlugin.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryEditPlugin.java,v 1.1 2008/04/01 07:31:29 mtaal Exp $
- */
-package org.eclipse.example.library.provider;
-
-import org.eclipse.emf.common.EMFPlugin;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-/**
- * This is the central singleton for the Library edit plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public final class LibraryEditPlugin extends EMFPlugin {
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final LibraryEditPlugin INSTANCE = new LibraryEditPlugin();
-
- /**
- * 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 LibraryEditPlugin() {
- super
- (new ResourceLocator [] {
- });
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
- 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/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/LibraryItemProvider.java b/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/LibraryItemProvider.java
deleted file mode 100644
index ef4c238fd..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/LibraryItemProvider.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryItemProvider.java,v 1.1 2008/04/01 07:31:29 mtaal Exp $
- */
-package org.eclipse.example.library.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.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.example.library.Library;
-import org.eclipse.example.library.LibraryFactory;
-import org.eclipse.example.library.LibraryPackage;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.example.library.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
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addNamePropertyDescriptor(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_Library_name_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Library_name_feature", "_UI_Library_type"),
- LibraryPackage.Literals.LIBRARY__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- 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
- */
- public Collection getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(LibraryPackage.Literals.LIBRARY__WRITERS);
- childrenFeatures.add(LibraryPackage.Literals.LIBRARY__BOOKS);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- 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
- */
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Library"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getText(Object object) {
- String label = ((Library)object).getName();
- return label == null || label.length() == 0 ?
- getString("_UI_Library_type") :
- getString("_UI_Library_type") + " " + label;
- }
-
- /**
- * 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
- */
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Library.class)) {
- case LibraryPackage.LIBRARY__NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case LibraryPackage.LIBRARY__WRITERS:
- case LibraryPackage.LIBRARY__BOOKS:
- 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
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (LibraryPackage.Literals.LIBRARY__WRITERS,
- LibraryFactory.eINSTANCE.createWriter()));
-
- newChildDescriptors.add
- (createChildParameter
- (LibraryPackage.Literals.LIBRARY__BOOKS,
- LibraryFactory.eINSTANCE.createBook()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return LibraryEditPlugin.INSTANCE;
- }
-
-}
diff --git a/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/LibraryItemProviderAdapterFactory.java b/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/LibraryItemProviderAdapterFactory.java
deleted file mode 100644
index a6cdfdbd3..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/LibraryItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryItemProviderAdapterFactory.java,v 1.1 2008/04/01 07:31:29 mtaal Exp $
- */
-package org.eclipse.example.library.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.example.library.util.LibraryAdapterFactory;
-
-/**
- * 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 LibraryItemProviderAdapterFactory extends LibraryAdapterFactory 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 supportedTypes = new ArrayList();
-
- /**
- * This constructs an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryItemProviderAdapterFactory() {
- 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.example.library.Book} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected BookItemProvider bookItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.example.library.Book}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- 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.example.library.Library} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibraryItemProvider libraryItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.example.library.Library}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- 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.example.library.Writer} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected WriterItemProvider writerItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.example.library.Writer}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Adapter createWriterAdapter() {
- if (writerItemProvider == null) {
- writerItemProvider = new WriterItemProvider(this);
- }
-
- return writerItemProvider;
- }
-
- /**
- * 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
- */
- 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
- */
- public Adapter adapt(Notifier notifier, Object type) {
- return super.adapt(notifier, this);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- 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();
- }
-
-}
diff --git a/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/WriterItemProvider.java b/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/WriterItemProvider.java
deleted file mode 100644
index 8595a5b6b..000000000
--- a/deprecated/library (emf 2.3)/Library.edit/src/org/eclipse/example/library/provider/WriterItemProvider.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: WriterItemProvider.java,v 1.1 2008/04/01 07:31:29 mtaal Exp $
- */
-package org.eclipse.example.library.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.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.example.library.LibraryPackage;
-import org.eclipse.example.library.Writer;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.example.library.Writer} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class WriterItemProvider
- 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 WriterItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public List 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"),
- getString("_UI_PropertyDescriptor_description", "_UI_Writer_name_feature", "_UI_Writer_type"),
- LibraryPackage.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"),
- getString("_UI_PropertyDescriptor_description", "_UI_Writer_books_feature", "_UI_Writer_type"),
- LibraryPackage.Literals.WRITER__BOOKS,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This returns Writer.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Writer"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getText(Object object) {
- String label = ((Writer)object).getName();
- return label == null || label.length() == 0 ?
- getString("_UI_Writer_type") :
- getString("_UI_Writer_type") + " " + label;
- }
-
- /**
- * 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
- */
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Writer.class)) {
- case LibraryPackage.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
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return LibraryEditPlugin.INSTANCE;
- }
-
-}
diff --git a/deprecated/library (emf 2.3)/Library.editor/.classpath b/deprecated/library (emf 2.3)/Library.editor/.classpath
deleted file mode 100644
index 304e86186..000000000
--- a/deprecated/library (emf 2.3)/Library.editor/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/deprecated/library (emf 2.3)/Library.editor/.project b/deprecated/library (emf 2.3)/Library.editor/.project
deleted file mode 100644
index c61967ab0..000000000
--- a/deprecated/library (emf 2.3)/Library.editor/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>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/deprecated/library (emf 2.3)/Library.editor/META-INF/MANIFEST.MF b/deprecated/library (emf 2.3)/Library.editor/META-INF/MANIFEST.MF
deleted file mode 100644
index a821f2e48..000000000
--- a/deprecated/library (emf 2.3)/Library.editor/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: Library.editor; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.example.library.presentation.LibraryEditorPlugin$Implementation
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.example.library.presentation
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources;visibility:=reexport,
- 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
diff --git a/deprecated/library (emf 2.3)/Library.editor/build.properties b/deprecated/library (emf 2.3)/Library.editor/build.properties
deleted file mode 100644
index 86d85440b..000000000
--- a/deprecated/library (emf 2.3)/Library.editor/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: build.properties,v 1.1 2008/04/01 07:32:09 mtaal Exp $
-
-bin.includes = .,\
- icons/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-source.. = src/
-output.. = bin/
diff --git a/deprecated/library (emf 2.3)/Library.editor/icons/full/obj16/LibraryModelFile.gif b/deprecated/library (emf 2.3)/Library.editor/icons/full/obj16/LibraryModelFile.gif
deleted file mode 100644
index 1ae5c0695..000000000
--- a/deprecated/library (emf 2.3)/Library.editor/icons/full/obj16/LibraryModelFile.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/library (emf 2.3)/Library.editor/icons/full/wizban/NewLibrary.gif b/deprecated/library (emf 2.3)/Library.editor/icons/full/wizban/NewLibrary.gif
deleted file mode 100644
index 36775a513..000000000
--- a/deprecated/library (emf 2.3)/Library.editor/icons/full/wizban/NewLibrary.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/library (emf 2.3)/Library.editor/plugin.properties b/deprecated/library (emf 2.3)/Library.editor/plugin.properties
deleted file mode 100644
index dfa70ba7a..000000000
--- a/deprecated/library (emf 2.3)/Library.editor/plugin.properties
+++ /dev/null
@@ -1,68 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: plugin.properties,v 1.1 2008/04/01 07:32:09 mtaal Exp $
-
-# ====================================================================
-# To code developer:
-# Do NOT change the properties between this line and the
-# "%%% END OF TRANSLATED PROPERTIES %%%" line.
-# Make a new property name, append to the end of the file and change
-# the code to use the new property.
-# ====================================================================
-
-# ====================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# ====================================================================
-
-pluginName = Library Editor
-providerName = www.example.org
-
-_UI_LibraryEditor_menu = &Library 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_CreateModelError_message = Problems encountered in file "{0}"
-
-_UI_LibraryModelWizard_label = Library Model
-_UI_LibraryModelWizard_description = Create a new Library model
-
-_UI_LibraryEditor_label = Library Model Editor
-
-_UI_LibraryEditorFilenameDefaultBase = My
-_UI_LibraryEditorFilenameExtension = library
-
-_UI_Wizard_label = New
-
-_WARN_FilenameExtension = The file name must end in ".{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?
-
diff --git a/deprecated/library (emf 2.3)/Library.editor/plugin.xml b/deprecated/library (emf 2.3)/Library.editor/plugin.xml
deleted file mode 100644
index 9e0d19b1d..000000000
--- a/deprecated/library (emf 2.3)/Library.editor/plugin.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
- <copyright>
- </copyright>
-
- $Id: plugin.xml,v 1.1 2008/04/01 07:32:09 mtaal Exp $
--->
-
-<plugin>
-
-
- <extension
- point = "org.eclipse.ui.newWizards">
- <category
- id = "org.eclipse.emf.ecore.Wizard.category.ID"
- name="%_UI_Wizard_category">
- </category>
- <wizard
- id = "org.eclipse.example.library.presentation.LibraryModelWizardID"
- name = "%_UI_LibraryModelWizard_label"
- class = "org.eclipse.example.library.presentation.LibraryModelWizard"
- category = "org.eclipse.emf.ecore.Wizard.category.ID"
- icon = "icons/full/obj16/LibraryModelFile.gif">
- <description>%_UI_LibraryModelWizard_description</description>
- <selection class = "org.eclipse.core.resources.IResource" />
- </wizard>
- </extension>
-
- <extension point = "org.eclipse.ui.editors">
- <editor
- id = "org.eclipse.example.library.presentation.LibraryEditorID"
- name = "%_UI_LibraryEditor_label"
- icon = "icons/full/obj16/LibraryModelFile.gif"
- extensions = "library"
- class = "org.eclipse.example.library.presentation.LibraryEditor"
- contributorClass="org.eclipse.example.library.presentation.LibraryActionBarContributor" >
- </editor>
- </extension>
-</plugin>
diff --git a/deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryActionBarContributor.java b/deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryActionBarContributor.java
deleted file mode 100644
index 4a77139e5..000000000
--- a/deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryActionBarContributor.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryActionBarContributor.java,v 1.1 2008/04/01 07:32:09 mtaal Exp $
- */
-package org.eclipse.example.library.presentation;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-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 Library model editor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryActionBarContributor
- 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(LibraryEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) {
- public void run() {
- try {
- getPage().showView("org.eclipse.ui.views.PropertySheet");
- }
- catch (PartInitException exception) {
- LibraryEditorPlugin.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(LibraryEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) {
- public boolean isEnabled() {
- return activeEditorPart instanceof IViewerProvider;
- }
-
- 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 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 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 LibraryActionBarContributor() {
- 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
- */
- public void contributeToToolBar(IToolBarManager toolBarManager) {
- toolBarManager.add(new Separator("library-settings"));
- toolBarManager.add(new Separator("library-additions"));
- }
-
- /**
- * 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
- */
- public void contributeToMenu(IMenuManager menuManager) {
- super.contributeToMenu(menuManager);
-
- IMenuManager submenuManager = new MenuManager(LibraryEditorPlugin.INSTANCE.getString("_UI_LibraryEditor_menu"), "org.eclipse.example.libraryMenuID");
- menuManager.insertAfter("additions", submenuManager);
- submenuManager.add(new Separator("settings"));
- submenuManager.add(new Separator("actions"));
- submenuManager.add(new Separator("additions"));
- submenuManager.add(new Separator("additions-end"));
-
- // Prepare for CreateChild item addition or removal.
- //
- createChildMenuManager = new MenuManager(LibraryEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
- submenuManager.insertBefore("additions", createChildMenuManager);
-
- // Prepare for CreateSibling item addition or removal.
- //
- createSiblingMenuManager = new MenuManager(LibraryEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
- submenuManager.insertBefore("additions", createSiblingMenuManager);
-
- // 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
- */
- 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 generateCreateChildActions(Collection descriptors, ISelection selection) {
- Collection actions = new ArrayList();
- if (descriptors != null) {
- for (Iterator i = descriptors.iterator(); i.hasNext(); ) {
- actions.add(new CreateChildAction(activeEditorPart, selection, i.next()));
- }
- }
- 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 generateCreateSiblingActions(Collection descriptors, ISelection selection) {
- Collection actions = new ArrayList();
- if (descriptors != null) {
- for (Iterator i = descriptors.iterator(); i.hasNext(); ) {
- actions.add(new CreateSiblingAction(activeEditorPart, selection, i.next()));
- }
- }
- 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 actions, String contributionID) {
- if (actions != null) {
- for (Iterator i = actions.iterator(); i.hasNext(); ) {
- IAction action = (IAction)i.next();
- 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 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
- */
- public void menuAboutToShow(IMenuManager menuManager) {
- super.menuAboutToShow(menuManager);
- MenuManager submenuManager = null;
-
- submenuManager = new MenuManager(LibraryEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
- populateManager(submenuManager, createChildActions, null);
- menuManager.insertBefore("edit", submenuManager);
-
- submenuManager = new MenuManager(LibraryEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
- populateManager(submenuManager, createSiblingActions, null);
- menuManager.insertBefore("edit", submenuManager);
- }
-
- /**
- * This inserts global actions before the "additions-end" separator.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addGlobalActions(IMenuManager menuManager) {
- menuManager.insertAfter("additions-end", new Separator("ui-actions"));
- menuManager.insertAfter("ui-actions", showPropertiesViewAction);
-
- refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
- menuManager.insertAfter("ui-actions", refreshViewerAction);
-
- super.addGlobalActions(menuManager);
- }
-
- /**
- * This ensures that a delete action will clean up all references to deleted objects.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected boolean removeAllReferencesOnDelete() {
- return true;
- }
-
-} \ No newline at end of file
diff --git a/deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryEditor.java b/deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryEditor.java
deleted file mode 100644
index 93db1fad3..000000000
--- a/deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryEditor.java
+++ /dev/null
@@ -1,1786 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryEditor.java,v 1.1 2008/04/01 07:32:09 mtaal Exp $
- */
-package org.eclipse.example.library.presentation;
-
-
-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.HashMap;
-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.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-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.core.runtime.NullProgressMonitor;
-
-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.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.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.IFileEditorInput;
-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.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.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 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.view.ExtendedPropertySheetPage;
-
-import org.eclipse.example.library.provider.LibraryItemProviderAdapterFactory;
-
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-
-/**
- * This is an example of a Library model editor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryEditor
- 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 PropertySheetPage 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 selectionChangedListeners = new ArrayList();
-
- /**
- * 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(LibraryEditor.this);
-
- setCurrentViewer(contentOutlineViewer);
- }
- }
- else if (p instanceof PropertySheet) {
- if (((PropertySheet)p).getCurrentPage() == propertySheetPage) {
- getActionBarContributor().setActiveEditor(LibraryEditor.this);
- handleActivate();
- }
- }
- else if (p == LibraryEditor.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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Collection removedResources = new ArrayList();
-
- /**
- * Resources that have been changed since last activation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Collection changedResources = new ArrayList();
-
- /**
- * Resources that have been saved.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Collection savedResources = new ArrayList();
-
- /**
- * Map to store the diagnostic associated with a resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Map resourceToDiagnosticMap = new LinkedHashMap();
-
- /**
- * 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() {
- 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);
- }
- }
-
- protected void setTarget(Resource target) {
- basicSetTarget(target);
- }
-
- protected void unsetTarget(Resource target) {
- basicUnsetTarget(target);
- }
- };
-
- /**
- * This listens for workspace changes.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IResourceChangeListener resourceChangeListener =
- new IResourceChangeListener() {
- public void resourceChanged(IResourceChangeEvent event) {
- // Only listening to these.
- // if (event.getType() == IResourceDelta.POST_CHANGE)
- {
- IResourceDelta delta = event.getDelta();
- try {
- class ResourceDeltaVisitor implements IResourceDeltaVisitor {
- protected ResourceSet resourceSet = editingDomain.getResourceSet();
- protected Collection changedResources = new ArrayList();
- protected Collection removedResources = new ArrayList();
-
- public boolean visit(IResourceDelta delta) {
- if (delta.getFlags() != IResourceDelta.MARKERS &&
- delta.getResource().getType() == IResource.FILE) {
- if ((delta.getKind() & (IResourceDelta.CHANGED | IResourceDelta.REMOVED)) != 0) {
- Resource resource = resourceSet.getResource(URI.createURI(delta.getFullPath().toString()), false);
- if (resource != null) {
- if ((delta.getKind() & IResourceDelta.REMOVED) != 0) {
- removedResources.add(resource);
- }
- else if (!savedResources.remove(resource)) {
- changedResources.add(resource);
- }
- }
- }
- }
-
- return true;
- }
-
- public Collection getChangedResources() {
- return changedResources;
- }
-
- public Collection getRemovedResources() {
- return removedResources;
- }
- }
-
- ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
- delta.accept(visitor);
-
- if (!visitor.getRemovedResources().isEmpty()) {
- removedResources.addAll(visitor.getRemovedResources());
- if (!isDirty()) {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable() {
- public void run() {
- getSite().getPage().closeEditor(LibraryEditor.this, false);
- LibraryEditor.this.dispose();
- }
- });
- }
- }
-
- if (!visitor.getChangedResources().isEmpty()) {
- changedResources.addAll(visitor.getChangedResources());
- if (getSite().getPage().getActiveEditor() == LibraryEditor.this) {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable() {
- public void run() {
- handleActivate();
- }
- });
- }
- }
- }
- catch (CoreException exception) {
- LibraryEditorPlugin.INSTANCE.log(exception);
- }
- }
- }
- };
-
- /**
- * Handles activation of the editor or it's associated views.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @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(LibraryEditor.this, false);
- LibraryEditor.this.dispose();
- }
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void handleChangedResources() {
- if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
- editingDomain.getCommandStack().flush();
-
- updateProblemIndication = false;
- for (Iterator i = changedResources.iterator(); i.hasNext(); ) {
- Resource resource = (Resource)i.next();
- if (resource.isLoaded()) {
- resource.unload();
- try {
- resource.load(Collections.EMPTY_MAP);
- }
- catch (IOException exception) {
- if (!resourceToDiagnosticMap.containsKey(resource)) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
- }
- }
- }
- }
- 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,
- "Library.editor",
- 0,
- null,
- new Object [] { editingDomain.getResourceSet() });
- for (Iterator i = resourceToDiagnosticMap.values().iterator(); i.hasNext(); ) {
- Diagnostic childDiagnostic = (Diagnostic)i.next();
- 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) {
- LibraryEditorPlugin.INSTANCE.log(exception);
- }
- }
-
- if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
- markerHelper.deleteMarkers(editingDomain.getResourceSet());
- if (diagnostic.getSeverity() != Diagnostic.OK) {
- try {
- markerHelper.createMarkers(diagnostic);
- }
- catch (CoreException exception) {
- LibraryEditorPlugin.INSTANCE.log(exception);
- }
- }
- }
- }
- }
-
- /**
- * Shows a dialog that asks if conflicting changes should be discarded.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected boolean handleDirtyConflict() {
- return
- MessageDialog.openQuestion
- (getSite().getShell(),
- getString("_UI_FileConflict_label"),
- getString("_WARN_FileConflict"));
- }
-
- /**
- * This creates a model editor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryEditor() {
- 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 LibraryItemProviderAdapterFactory());
- 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());
- }
- if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) {
- propertySheetPage.refresh();
- }
- }
- });
- }
- });
-
- // Create the editing domain with a special command stack.
- //
- editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap());
- }
-
- /**
- * This is here for the listener to be able to call it.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- 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()) {
- // I don't know if this should be run this deferred
- // because we might have to give the editor a chance to process the viewer update events
- // and hence to update the views first.
- //
- //
- 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);
- }
- }
- };
- runnable.run();
- }
- }
-
- /**
- * 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
- */
- 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
- */
- 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
- */
- public boolean hasChildren(Object object) {
- Object parent = super.getParent(object);
- return parent != null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- 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");
- contextMenu.add(new Separator("additions"));
- 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() };
- 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() {
- // Assumes that the input is a file object.
- //
- IFileEditorInput modelFile = (IFileEditorInput)getEditorInput();
- URI resourceURI = URI.createPlatformResourceURI(modelFile.getFile().getFullPath().toString(), true);
- 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,
- "Library.editor",
- 0,
- getString("_UI_CreateModelError_message", resource.getURI()),
- new Object [] { exception == null ? (Object)resource : exception });
- basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
- return basicDiagnostic;
- }
- else if (exception != null) {
- return
- new BasicDiagnostic
- (Diagnostic.ERROR,
- "Library.editor",
- 0,
- getString("_UI_CreateModelError_message", resource.getURI()),
- 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
- */
- 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() &&
- !((Resource)getEditingDomain().getResourceSet().getResources().get(0)).getContents().isEmpty()) {
- // Create a page for the selection tree view.
- //
- {
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), LibraryEditor.this) {
- public Viewer createViewer(Composite composite) {
- Tree tree = new Tree(composite, SWT.MULTI);
- TreeViewer newTreeViewer = new TreeViewer(tree);
- return newTreeViewer;
- }
- 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"));
- }
-
- // Create a page for the parent tree view.
- //
- {
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), LibraryEditor.this) {
- public Viewer createViewer(Composite composite) {
- Tree tree = new Tree(composite, SWT.MULTI);
- TreeViewer newTreeViewer = new TreeViewer(tree);
- return newTreeViewer;
- }
- 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"));
- }
-
- // This is the page for the list viewer
- //
- {
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), LibraryEditor.this) {
- public Viewer createViewer(Composite composite) {
- return new ListViewer(composite);
- }
- 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"));
- }
-
- // This is the page for the tree viewer
- //
- {
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), LibraryEditor.this) {
- public Viewer createViewer(Composite composite) {
- return new TreeViewer(composite);
- }
- 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"));
- }
-
- // This is the page for the table viewer.
- //
- {
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), LibraryEditor.this) {
- public Viewer createViewer(Composite composite) {
- return new TableViewer(composite);
- }
- 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"));
- objectColumn.setResizable(true);
-
- TableColumn selfColumn = new TableColumn(table, SWT.NONE);
- layout.addColumnData(new ColumnWeightData(2, 100, true));
- selfColumn.setText(getString("_UI_SelfColumn_label"));
- selfColumn.setResizable(true);
-
- tableViewer.setColumnProperties(new String [] {"a", "b"});
- tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
-
- createContextMenuFor(tableViewer);
- int pageIndex = addPage(viewerPane.getControl());
- setPageText(pageIndex, getString("_UI_TablePage_label"));
- }
-
- // This is the page for the table tree viewer.
- //
- {
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), LibraryEditor.this) {
- public Viewer createViewer(Composite composite) {
- return new TreeViewer(composite);
- }
- 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"));
- objectColumn.setResizable(true);
- objectColumn.setWidth(250);
-
- TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);
- selfColumn.setText(getString("_UI_SelfColumn_label"));
- selfColumn.setResizable(true);
- selfColumn.setWidth(200);
-
- treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"});
- treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
-
- createContextMenuFor(treeViewerWithColumns);
- int pageIndex = addPage(viewerPane.getControl());
- setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label"));
- }
-
- 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;
- 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, "");
- 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"));
- 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
- */
- 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
- */
- 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 {
- 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);
- }
- }
-
- public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
- super.makeContributions(menuManager, toolBarManager, statusLineManager);
- contentOutlineStatusLineManager = statusLineManager;
- }
-
- 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() {
- if (propertySheetPage == null) {
- propertySheetPage =
- new ExtendedPropertySheetPage(editingDomain) {
- public void setSelectionToViewer(List selection) {
- LibraryEditor.this.setSelectionToViewer(selection);
- LibraryEditor.this.setFocus();
- }
-
- public void setActionBars(IActionBars actionBars) {
- super.setActionBars(actionBars);
- getActionBarContributor().shareGlobalActions(this, actionBars);
- }
- };
- propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
- }
-
- 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 selectionList = new ArrayList();
- 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
- */
- 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
- */
- public void doSave(IProgressMonitor progressMonitor) {
- // Save only resources that have actually changed.
- //
- final Map saveOptions = new HashMap();
- saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
-
- // 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.
- //
- public void execute(IProgressMonitor monitor) {
- // Save the resources to the file system.
- //
- boolean first = true;
- for (Iterator i = editingDomain.getResourceSet().getResources().iterator(); i.hasNext(); ) {
- Resource resource = (Resource)i.next();
- if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
- try {
- savedResources.add(resource);
- resource.save(saveOptions);
- }
- 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.
- //
- LibraryEditorPlugin.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
- */
- public boolean isSaveAsAllowed() {
- return true;
- }
-
- /**
- * This also changes the editor's input.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- 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) {
- ((Resource)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) {
- try {
- if (marker.getType().equals(EValidator.MARKER)) {
- String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);
- if (uriAttribute != null) {
- URI uri = URI.createURI(uriAttribute);
- EObject eObject = editingDomain.getResourceSet().getEObject(uri, true);
- if (eObject != null) {
- setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject)));
- }
- }
- }
- }
- catch (CoreException exception) {
- LibraryEditorPlugin.INSTANCE.log(exception);
- }
- }
-
- /**
- * This is called during startup.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- 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
- */
- 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 (Iterator listeners = selectionChangedListeners.iterator(); listeners.hasNext(); ) {
- ISelectionChangedListener listener = (ISelectionChangedListener)listeners.next();
- 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"));
- break;
- }
- case 1: {
- String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
- statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text));
- break;
- }
- default: {
- statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size())));
- break;
- }
- }
- }
- else {
- statusLineManager.setMessage("");
- }
- }
- }
-
- /**
- * 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 LibraryEditorPlugin.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 LibraryEditorPlugin.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
- */
- public void dispose() {
- updateProblemIndication = false;
-
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
-
- getSite().getPage().removePartListener(partListener);
-
- adapterFactory.dispose();
-
- if (getActionBarContributor().getActiveEditor() == this) {
- getActionBarContributor().setActiveEditor(null);
- }
-
- if (propertySheetPage != null) {
- 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/deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryEditorPlugin.java b/deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryEditorPlugin.java
deleted file mode 100644
index baf45e266..000000000
--- a/deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryEditorPlugin.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryEditorPlugin.java,v 1.1 2008/04/01 07:32:09 mtaal Exp $
- */
-package org.eclipse.example.library.presentation;
-
-import java.util.Properties;
-
-import org.eclipse.emf.common.EMFPlugin;
-import org.eclipse.emf.common.ui.EclipseUIPlugin;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.teneo.hibernate.HbDataStore;
-import org.eclipse.emf.teneo.hibernate.HbHelper;
-import org.eclipse.example.library.LibraryPackage;
-import org.hibernate.cfg.Environment;
-import org.osgi.framework.BundleContext;
-
-/**
- * This is the central singleton for the Library editor plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public final class LibraryEditorPlugin extends EMFPlugin {
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final LibraryEditorPlugin INSTANCE = new LibraryEditorPlugin();
-
- /**
- * 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 LibraryEditorPlugin() {
- super
- (new ResourceLocator [] {
- });
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
- 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;
- }
-
- // teneo.start
- public void start(BundleContext context) throws Exception
- {
- org.eclipse.osgi.framework.debug.Debug.DEBUG_GENERAL = true;
-
- // Set the database information, Environment is org.hibernate.cfg.Environment
- final Properties props = new Properties();
- props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
- props.setProperty(Environment.USER, "root");
- props.setProperty(Environment.URL, "jdbc:mysql://127.0.0.1:3306/lib");
- props.setProperty(Environment.PASS, "root");
- props.setProperty(Environment.DIALECT, org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
-
- // Initialize create the HbDataStore
- HbDataStore hbds = HbHelper.INSTANCE.createRegisterDataStore("library");
- hbds.setEPackages(new EPackage[]{LibraryPackage.eINSTANCE});
- hbds.setProperties(props);
- hbds.initialize();
-
- super.start(context);
- }
- // teneo.end
- }
-
-}
diff --git a/deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryModelWizard.java b/deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryModelWizard.java
deleted file mode 100644
index f092284f6..000000000
--- a/deprecated/library (emf 2.3)/Library.editor/src/org/eclipse/example/library/presentation/LibraryModelWizard.java
+++ /dev/null
@@ -1,610 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryModelWizard.java,v 1.1 2008/04/01 07:32:09 mtaal Exp $
- */
-package org.eclipse.example.library.presentation;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.StringTokenizer;
-
-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.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
-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.xmi.XMLResource;
-import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
-import org.eclipse.example.library.Book;
-import org.eclipse.example.library.Library;
-import org.eclipse.example.library.LibraryFactory;
-import org.eclipse.example.library.LibraryPackage;
-import org.eclipse.example.library.Writer;
-import org.eclipse.example.library.provider.LibraryEditPlugin;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-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.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.part.ISetSelectionTarget;
-
-
-/**
- * This is a simple wizard for creating a new model file.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryModelWizard extends Wizard implements INewWizard {
- /**
- * This caches an instance of the model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibraryPackage libraryPackage = LibraryPackage.eINSTANCE;
-
- /**
- * This caches an instance of the model factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibraryFactory libraryFactory = libraryPackage.getLibraryFactory();
-
- /**
- * This is the file creation page.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibraryModelWizardNewFileCreationPage newFileCreationPage;
-
- /**
- * This is the initial object creation page.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibraryModelWizardInitialObjectCreationPage 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 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(LibraryEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
- setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(LibraryEditorPlugin.INSTANCE.getImage("full/wizban/NewLibrary")));
- }
-
- /**
- * Returns the names of the types that can be created as the root object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Collection getInitialObjectNames() {
- if (initialObjectNames == null) {
- initialObjectNames = new ArrayList();
- for (Iterator classifiers = libraryPackage.getEClassifiers().iterator(); classifiers.hasNext(); ) {
- EClassifier eClassifier = (EClassifier)classifiers.next();
- if (eClassifier instanceof EClass) {
- EClass eClass = (EClass)eClassifier;
- if (!eClass.isAbstract()) {
- initialObjectNames.add(eClass.getName());
- }
- }
- }
- Collections.sort(initialObjectNames, java.text.Collator.getInstance());
- }
- return initialObjectNames;
- }
-
- /**
- * Create a new model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EObject createInitialModel() {
- EClass eClass = (EClass)libraryPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
- EObject rootObject = libraryFactory.create(eClass);
- return rootObject;
- }
-
- /**
- * Do the work after everything is specified.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean performFinish() {
- try {
- // Remember the file.
- //
- final IFile modelFile = getModelFile();
-
- // Do the work within an operation.
- //
- WorkspaceModifyOperation operation =
- new WorkspaceModifyOperation() {
- 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);
-
- // Add the initial model object to the contents.
- //
- EObject rootObject = createInitialModel();
- if (rootObject != null) {
- resource.getContents().add(rootObject);
- }
-
- //teneo.start
- if (rootObject instanceof Library)
- {
- ((Library)rootObject).setName("My Library");
- }
- else if (rootObject instanceof Book)
- {
- ((Book)rootObject).setTitle("My Title");
- }
- else if (rootObject instanceof Writer)
- {
- ((Writer)rootObject).setName("My Name");
- }
- //teneo.end
-
-
- // Save the contents of the resource to the file system.
- //
- Map options = new HashMap();
- options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
- resource.save(options);
- }
- catch (Exception exception) {
- LibraryEditorPlugin.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(), LibraryEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage());
- return false;
- }
-
- return true;
- }
- catch (Exception exception) {
- LibraryEditorPlugin.INSTANCE.log(exception);
- return false;
- }
- }
-
- /**
- * This is the one page of the wizard.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public class LibraryModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
- /**
- * Pass in the selection.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryModelWizardNewFileCreationPage(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
- */
- protected boolean validatePage() {
- if (super.validatePage()) {
- // Make sure the file ends in ".library".
- //
- String requiredExt = LibraryEditorPlugin.INSTANCE.getString("_UI_LibraryEditorFilenameExtension");
- String enteredExt = new Path(getFileName()).getFileExtension();
- if (enteredExt == null || !enteredExt.equals(requiredExt)) {
- setErrorMessage(LibraryEditorPlugin.INSTANCE.getString("_WARN_FilenameExtension", new Object [] { requiredExt }));
- return false;
- }
- else {
- return true;
- }
- }
- else {
- 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 LibraryModelWizardInitialObjectCreationPage extends WizardPage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Combo initialObjectField;
-
- /**
- * @generated
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- */
- protected List encodings;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Combo encodingField;
-
- /**
- * Pass in the selection.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryModelWizardInitialObjectCreationPage(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(LibraryEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
-
- 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 (Iterator i = getInitialObjectNames().iterator(); i.hasNext(); ) {
- initialObjectField.add(getLabel((String)i.next()));
- }
-
- if (initialObjectField.getItemCount() == 1) {
- initialObjectField.select(0);
- }
- initialObjectField.addModifyListener(validator);
-
- Label encodingLabel = new Label(composite, SWT.LEFT);
- {
- encodingLabel.setText(LibraryEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
-
- 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 (Iterator i = getEncodings().iterator(); i.hasNext(); ) {
- encodingField.add((String)i.next());
- }
-
- 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
- */
- 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 (Iterator i = getInitialObjectNames().iterator(); i.hasNext(); ) {
- String name = (String)i.next();
- 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 LibraryEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
- }
- catch(MissingResourceException mre) {
- LibraryEditorPlugin.INSTANCE.log(mre);
- }
- return typeName;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Collection getEncodings() {
- if (encodings == null) {
- encodings = new ArrayList();
- for (StringTokenizer stringTokenizer = new StringTokenizer(LibraryEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) {
- encodings.add(stringTokenizer.nextToken());
- }
- }
- return encodings;
- }
- }
-
- /**
- * The framework calls this to create the contents of the wizard.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void addPages() {
- // Create a page, set the title, and the initial model file name.
- //
- newFileCreationPage = new LibraryModelWizardNewFileCreationPage("Whatever", selection);
- newFileCreationPage.setTitle(LibraryEditorPlugin.INSTANCE.getString("_UI_LibraryModelWizard_label"));
- newFileCreationPage.setDescription(LibraryEditorPlugin.INSTANCE.getString("_UI_LibraryModelWizard_description"));
- newFileCreationPage.setFileName(LibraryEditorPlugin.INSTANCE.getString("_UI_LibraryEditorFilenameDefaultBase") + "." + LibraryEditorPlugin.INSTANCE.getString("_UI_LibraryEditorFilenameExtension"));
- 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 = LibraryEditorPlugin.INSTANCE.getString("_UI_LibraryEditorFilenameDefaultBase");
- String defaultModelFilenameExtension = LibraryEditorPlugin.INSTANCE.getString("_UI_LibraryEditorFilenameExtension");
- String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;
- for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) {
- modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;
- }
- newFileCreationPage.setFileName(modelFilename);
- }
- }
- }
- initialObjectCreationPage = new LibraryModelWizardInitialObjectCreationPage("Whatever2");
- initialObjectCreationPage.setTitle(LibraryEditorPlugin.INSTANCE.getString("_UI_LibraryModelWizard_label"));
- initialObjectCreationPage.setDescription(LibraryEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description"));
- addPage(initialObjectCreationPage);
- }
-
- /**
- * Get the file from the page.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IFile getModelFile() {
- return newFileCreationPage.getModelFile();
- }
-
-}
diff --git a/deprecated/library (emf 2.3)/Library.tests/.classpath b/deprecated/library (emf 2.3)/Library.tests/.classpath
deleted file mode 100644
index 304e86186..000000000
--- a/deprecated/library (emf 2.3)/Library.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/deprecated/library (emf 2.3)/Library.tests/.project b/deprecated/library (emf 2.3)/Library.tests/.project
deleted file mode 100644
index 20239f61c..000000000
--- a/deprecated/library (emf 2.3)/Library.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>Library.tests</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/deprecated/library (emf 2.3)/Library.tests/META-INF/MANIFEST.MF b/deprecated/library (emf 2.3)/Library.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index d690f8eb2..000000000
--- a/deprecated/library (emf 2.3)/Library.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: Library.tests; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.example.library.tests
-Require-Bundle: org.eclipse.core.runtime,
- Library;visibility:=reexport,
- org.eclipse.emf.ecore.xmi;visibility:=reexport,
- org.junit;visibility:=reexport
-Eclipse-LazyStart: true
diff --git a/deprecated/library (emf 2.3)/Library.tests/build.properties b/deprecated/library (emf 2.3)/Library.tests/build.properties
deleted file mode 100644
index e8f7a0db4..000000000
--- a/deprecated/library (emf 2.3)/Library.tests/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: build.properties,v 1.1 2008/04/01 07:32:44 mtaal Exp $
-
-bin.includes = .,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-source.. = src/
-output.. = bin/
diff --git a/deprecated/library (emf 2.3)/Library.tests/plugin.properties b/deprecated/library (emf 2.3)/Library.tests/plugin.properties
deleted file mode 100644
index b984a7b51..000000000
--- a/deprecated/library (emf 2.3)/Library.tests/plugin.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: plugin.properties,v 1.1 2008/04/01 07:32:44 mtaal Exp $
-
-# ====================================================================
-# To code developer:
-# Do NOT change the properties between this line and the
-# "%%% END OF TRANSLATED PROPERTIES %%%" line.
-# Make a new property name, append to the end of the file and change
-# the code to use the new property.
-# ====================================================================
-
-# ====================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# ====================================================================
-
-pluginName = Library Tests
-providerName = www.example.org
diff --git a/deprecated/library (emf 2.3)/Library.tests/plugin.xml b/deprecated/library (emf 2.3)/Library.tests/plugin.xml
deleted file mode 100644
index efc8a8594..000000000
--- a/deprecated/library (emf 2.3)/Library.tests/plugin.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
- <copyright>
- </copyright>
-
- $Id: plugin.xml,v 1.1 2008/04/01 07:32:44 mtaal Exp $
--->
-
-<plugin>
-</plugin>
diff --git a/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/BookTest.java b/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/BookTest.java
deleted file mode 100644
index 6fcff09c2..000000000
--- a/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/BookTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: BookTest.java,v 1.1 2008/04/01 07:32:44 mtaal Exp $
- */
-package org.eclipse.example.library.tests;
-
-import junit.framework.TestCase;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.example.library.Book;
-import org.eclipse.example.library.LibraryFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Book</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class BookTest extends TestCase {
-
- /**
- * The fixture for this Book test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Book fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(BookTest.class);
- }
-
- /**
- * Constructs a new Book test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BookTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Book test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void setFixture(Book fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Book test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private Book getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- protected void setUp() throws Exception {
- setFixture(LibraryFactory.eINSTANCE.createBook());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //BookTest
diff --git a/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryAllTests.java b/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryAllTests.java
deleted file mode 100644
index 5d3407872..000000000
--- a/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryAllTests.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryAllTests.java,v 1.1 2008/04/01 07:32:44 mtaal Exp $
- */
-package org.eclipse.example.library.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import junit.textui.TestRunner;
-
-/**
- * <!-- begin-user-doc -->
- * A test suite for the '<em><b>Library</b></em>' model.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryAllTests extends TestSuite {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(suite());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static Test suite() {
- TestSuite suite = new LibraryAllTests("Library Tests");
- return suite;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryAllTests(String name) {
- super(name);
- }
-
-} //LibraryAllTests
diff --git a/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryExample.java b/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryExample.java
deleted file mode 100644
index dd5018947..000000000
--- a/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryExample.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryExample.java,v 1.1 2008/04/01 07:32:44 mtaal Exp $
- */
-package org.eclipse.example.library.tests;
-
-import java.io.File;
-import java.io.IOException;
-
-import java.util.Iterator;
-
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.EObject;
-
-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.util.Diagnostician;
-
-import org.eclipse.example.library.Book;
-import org.eclipse.example.library.LibraryFactory;
-import org.eclipse.example.library.LibraryPackage;
-
-import org.eclipse.example.library.util.LibraryResourceFactoryImpl;
-
-/**
- * <!-- begin-user-doc -->
- * A sample utility for the '<em><b>library</b></em>' package.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryExample {
- /**
- * <!-- begin-user-doc -->
- * Load all the argument file paths or URIs as instances of the model.
- * <!-- end-user-doc -->
- * @param args the file paths or URIs.
- * @generated
- */
- public static void main(String[] args) {
- // Create a resource set to hold the resources.
- //
- ResourceSet resourceSet = new ResourceSetImpl();
-
- // Register the appropriate resource factory to handle all file extensions.
- //
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
- (Resource.Factory.Registry.DEFAULT_EXTENSION,
- new LibraryResourceFactoryImpl());
-
- // Register the package to ensure it is available during loading.
- //
- resourceSet.getPackageRegistry().put
- (LibraryPackage.eNS_URI,
- LibraryPackage.eINSTANCE);
-
- // If there are no arguments, emit an appropriate usage message.
- //
- if (args.length == 0) {
- System.out.println("Enter a list of file paths or URIs that have content like this:");
- try {
- Resource resource = resourceSet.createResource(URI.createURI("http:///My.library"));
- Book root = LibraryFactory.eINSTANCE.createBook();
- resource.getContents().add(root);
- resource.save(System.out, null);
- }
- catch (IOException exception) {
- exception.printStackTrace();
- }
- }
- else {
- // Iterate over all the arguments.
- //
- for (int i = 0; i < args.length; ++i) {
- // Construct the URI for the instance file.
- // The argument is treated as a file path only if it denotes an existing file.
- // Otherwise, it's directly treated as a URL.
- //
- File file = new File(args[i]);
- URI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()): URI.createURI(args[0]);
-
- try {
- // Demand load resource for this file.
- //
- Resource resource = resourceSet.getResource(uri, true);
- System.out.println("Loaded " + uri);
-
- // Validate the contents of the loaded resource.
- //
- for (Iterator j = resource.getContents().iterator(); j.hasNext(); ) {
- EObject eObject = (EObject)j.next();
- Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject);
- if (diagnostic.getSeverity() != Diagnostic.OK) {
- printDiagnostic(diagnostic, "");
- }
- }
- }
- catch (RuntimeException exception) {
- System.out.println("Problem loading " + uri);
- exception.printStackTrace();
- }
- }
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * Prints diagnostics with indentation.
- * <!-- end-user-doc -->
- * @param diagnostic the diagnostic to print.
- * @param indent the indentation for printing.
- * @generated
- */
- protected static void printDiagnostic(Diagnostic diagnostic, String indent) {
- System.out.print(indent);
- System.out.println(diagnostic.getMessage());
- for (Iterator i = diagnostic.getChildren().iterator(); i.hasNext(); ) {
- printDiagnostic((Diagnostic)i.next(), indent + " ");
- }
- }
-
-} //LibraryExample
diff --git a/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryTest.java b/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryTest.java
deleted file mode 100644
index 252f58c5a..000000000
--- a/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryTest.java,v 1.1 2008/04/01 07:32:44 mtaal Exp $
- */
-package org.eclipse.example.library.tests;
-
-import junit.framework.TestCase;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.example.library.Library;
-import org.eclipse.example.library.LibraryFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Library</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryTest extends TestCase {
-
- /**
- * The fixture for this Library test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Library fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(LibraryTest.class);
- }
-
- /**
- * Constructs a new Library test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Library test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void setFixture(Library fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Library test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private Library getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- protected void setUp() throws Exception {
- setFixture(LibraryFactory.eINSTANCE.createLibrary());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //LibraryTest
diff --git a/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryTests.java b/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryTests.java
deleted file mode 100644
index 713c835e5..000000000
--- a/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/LibraryTests.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryTests.java,v 1.1 2008/04/01 07:32:44 mtaal Exp $
- */
-package org.eclipse.example.library.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import junit.textui.TestRunner;
-
-/**
- * <!-- begin-user-doc -->
- * A test suite for the '<em><b>library</b></em>' package.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryTests extends TestSuite {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(suite());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static Test suite() {
- TestSuite suite = new LibraryTests("library Tests");
- return suite;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryTests(String name) {
- super(name);
- }
-
-} //LibraryTests
diff --git a/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/WriterTest.java b/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/WriterTest.java
deleted file mode 100644
index 3c7186bd6..000000000
--- a/deprecated/library (emf 2.3)/Library.tests/src/org/eclipse/example/library/tests/WriterTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: WriterTest.java,v 1.1 2008/04/01 07:32:44 mtaal Exp $
- */
-package org.eclipse.example.library.tests;
-
-import junit.framework.TestCase;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.example.library.LibraryFactory;
-import org.eclipse.example.library.Writer;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Writer</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class WriterTest extends TestCase {
-
- /**
- * The fixture for this Writer test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Writer fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(WriterTest.class);
- }
-
- /**
- * Constructs a new Writer test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public WriterTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Writer test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void setFixture(Writer fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Writer test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private Writer getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- protected void setUp() throws Exception {
- setFixture(LibraryFactory.eINSTANCE.createWriter());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //WriterTest
diff --git a/deprecated/library (emf 2.3)/Library/.classpath b/deprecated/library (emf 2.3)/Library/.classpath
deleted file mode 100644
index 751c8f2e5..000000000
--- a/deprecated/library (emf 2.3)/Library/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/deprecated/library (emf 2.3)/Library/.project b/deprecated/library (emf 2.3)/Library/.project
deleted file mode 100644
index 69b59d68f..000000000
--- a/deprecated/library (emf 2.3)/Library/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>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/deprecated/library (emf 2.3)/Library/META-INF/MANIFEST.MF b/deprecated/library (emf 2.3)/Library/META-INF/MANIFEST.MF
deleted file mode 100644
index edd8d3093..000000000
--- a/deprecated/library (emf 2.3)/Library/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: Library; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.example.library,
- org.eclipse.example.library.impl,
- org.eclipse.example.library.util
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.emf.ecore.xmi;visibility:=reexport,
- Hibernate_Libraries;visibility:=reexport,
- org.eclipse.emf.teneo.hibernate;visibility:=reexport
-Eclipse-LazyStart: true
diff --git a/deprecated/library (emf 2.3)/Library/build.properties b/deprecated/library (emf 2.3)/Library/build.properties
deleted file mode 100644
index 33ea67757..000000000
--- a/deprecated/library (emf 2.3)/Library/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: build.properties,v 1.1 2008/04/01 07:29:07 mtaal Exp $
-
-bin.includes = .,\
- model/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-source.. = src/
-output.. = bin/
diff --git a/deprecated/library (emf 2.3)/Library/model/library.ecore b/deprecated/library (emf 2.3)/Library/model/library.ecore
deleted file mode 100644
index 30673c8c6..000000000
--- a/deprecated/library (emf 2.3)/Library/model/library.ecore
+++ /dev/null
@@ -1,98 +0,0 @@
-<?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="library"
- nsURI="http://www.example.eclipse.org/Library" nsPrefix="library">
- <eClassifiers xsi:type="ecore:EClass" name="Book">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Book"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="title"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="pages" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Int"
- unsettable="true">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="pages"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="category" lowerBound="1"
- eType="#//BookCategory" defaultValueLiteral="Mystery" unsettable="true">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="category"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="author" lowerBound="1"
- eType="#//Writer" eOpposite="#//Writer/books">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="author"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EEnum" name="BookCategory">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="BookCategory"/>
- </eAnnotations>
- <eLiterals name="Mystery"/>
- <eLiterals name="ScienceFiction" value="1"/>
- <eLiterals name="Biography" value="2"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EDataType" name="BookCategoryObject" instanceClassName="org.eclipse.emf.common.util.Enumerator">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="BookCategory:Object"/>
- <details key="baseType" value="BookCategory"/>
- </eAnnotations>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Library">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Library"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="name"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="writers" upperBound="-1"
- eType="#//Writer" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="writers"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
- eType="#//Book" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="books"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Writer">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Writer"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="name"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
- eType="#//Book" eOpposite="#//Book/author">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="books"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/deprecated/library (emf 2.3)/Library/model/library.genmodel b/deprecated/library (emf 2.3)/Library/model/library.genmodel
deleted file mode 100644
index 8599e7ee1..000000000
--- a/deprecated/library (emf 2.3)/Library/model/library.genmodel
+++ /dev/null
@@ -1,32 +0,0 @@
-<?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="/Library/src"
- modelPluginID="Library" modelName="Library" importerID="org.eclipse.xsd.ecore.importer"
- copyrightFields="false">
- <foreignModel>file:/home/mtaal/mytmp/library.xsd</foreignModel>
- <genPackages prefix="Library" basePackage="org.eclipse.example" resource="XML" disposableProviderFactory="true"
- ecorePackage="library.ecore#/">
- <genEnums typeSafeEnumCompatible="false" ecoreEnum="library.ecore#//BookCategory">
- <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/Mystery"/>
- <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/ScienceFiction"/>
- <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/Biography"/>
- </genEnums>
- <genDataTypes ecoreDataType="library.ecore#//BookCategoryObject"/>
- <genClasses ecoreClass="library.ecore#//Book">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/title"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/pages"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/category"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference library.ecore#//Book/author"/>
- </genClasses>
- <genClasses ecoreClass="library.ecore#//Library">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Library/name"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Library/writers"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Library/books"/>
- </genClasses>
- <genClasses ecoreClass="library.ecore#//Writer">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Writer/name"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference library.ecore#//Writer/books"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
diff --git a/deprecated/library (emf 2.3)/Library/plugin.properties b/deprecated/library (emf 2.3)/Library/plugin.properties
deleted file mode 100644
index 8c2c606b8..000000000
--- a/deprecated/library (emf 2.3)/Library/plugin.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: plugin.properties,v 1.1 2008/04/01 07:29:07 mtaal Exp $
-
-# ====================================================================
-# To code developer:
-# Do NOT change the properties between this line and the
-# "%%% END OF TRANSLATED PROPERTIES %%%" line.
-# Make a new property name, append to the end of the file and change
-# the code to use the new property.
-# ====================================================================
-
-# ====================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# ====================================================================
-
-pluginName = Library Model
-providerName = www.example.org
diff --git a/deprecated/library (emf 2.3)/Library/plugin.xml b/deprecated/library (emf 2.3)/Library/plugin.xml
deleted file mode 100644
index cc575a73e..000000000
--- a/deprecated/library (emf 2.3)/Library/plugin.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
- <copyright>
- </copyright>
-
- $Id: plugin.xml,v 1.1 2008/04/01 07:29:07 mtaal Exp $
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.example.eclipse.org/Library"
- class = "org.eclipse.example.library.LibraryPackage"
- genModel = "model/library.genmodel" />
- </extension>
-<!-- teneo.start -->
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <parser
- type="library"
- class="org.eclipse.emf.teneo.hibernate.resource.HibernateResourceFactory" />
- </extension>
-<!-- teneo.end -->
-</plugin>
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/Book.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/Book.java
deleted file mode 100644
index 71a7f9310..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/Book.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: Book.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- 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.example.library.Book#getTitle <em>Title</em>}</li>
- * <li>{@link org.eclipse.example.library.Book#getPages <em>Pages</em>}</li>
- * <li>{@link org.eclipse.example.library.Book#getCategory <em>Category</em>}</li>
- * <li>{@link org.eclipse.example.library.Book#getAuthor <em>Author</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.example.library.LibraryPackage#getBook()
- * @model extendedMetaData="name='Book' kind='elementOnly'"
- * @generated
- */
-public interface Book extends EObject {
- /**
- * Returns the value of the '<em><b>Title</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Title</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Title</em>' attribute.
- * @see #setTitle(String)
- * @see org.eclipse.example.library.LibraryPackage#getBook_Title()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * extendedMetaData="kind='element' name='title'"
- * @generated
- */
- String getTitle();
-
- /**
- * Sets the value of the '{@link org.eclipse.example.library.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.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pages</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pages</em>' attribute.
- * @see #isSetPages()
- * @see #unsetPages()
- * @see #setPages(int)
- * @see org.eclipse.example.library.LibraryPackage#getBook_Pages()
- * @model unsettable="true" dataType="org.eclipse.emf.ecore.xml.type.Int" required="true"
- * extendedMetaData="kind='element' name='pages'"
- * @generated
- */
- int getPages();
-
- /**
- * Sets the value of the '{@link org.eclipse.example.library.Book#getPages <em>Pages</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pages</em>' attribute.
- * @see #isSetPages()
- * @see #unsetPages()
- * @see #getPages()
- * @generated
- */
- void setPages(int value);
-
- /**
- * Unsets the value of the '{@link org.eclipse.example.library.Book#getPages <em>Pages</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetPages()
- * @see #getPages()
- * @see #setPages(int)
- * @generated
- */
- void unsetPages();
-
- /**
- * Returns whether the value of the '{@link org.eclipse.example.library.Book#getPages <em>Pages</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Pages</em>' attribute is set.
- * @see #unsetPages()
- * @see #getPages()
- * @see #setPages(int)
- * @generated
- */
- boolean isSetPages();
-
- /**
- * Returns the value of the '<em><b>Category</b></em>' attribute.
- * The default value is <code>"Mystery"</code>.
- * The literals are from the enumeration {@link org.eclipse.example.library.BookCategory}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Category</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Category</em>' attribute.
- * @see org.eclipse.example.library.BookCategory
- * @see #isSetCategory()
- * @see #unsetCategory()
- * @see #setCategory(BookCategory)
- * @see org.eclipse.example.library.LibraryPackage#getBook_Category()
- * @model default="Mystery" unsettable="true" required="true"
- * extendedMetaData="kind='element' name='category'"
- * @generated
- */
- BookCategory getCategory();
-
- /**
- * Sets the value of the '{@link org.eclipse.example.library.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.example.library.BookCategory
- * @see #isSetCategory()
- * @see #unsetCategory()
- * @see #getCategory()
- * @generated
- */
- void setCategory(BookCategory value);
-
- /**
- * Unsets the value of the '{@link org.eclipse.example.library.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.example.library.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.example.library.Writer#getBooks <em>Books</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Author</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Author</em>' reference.
- * @see #setAuthor(Writer)
- * @see org.eclipse.example.library.LibraryPackage#getBook_Author()
- * @see org.eclipse.example.library.Writer#getBooks
- * @model opposite="books" required="true"
- * extendedMetaData="kind='element' name='author'"
- * @generated
- */
- Writer getAuthor();
-
- /**
- * Sets the value of the '{@link org.eclipse.example.library.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/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/BookCategory.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/BookCategory.java
deleted file mode 100644
index c0755bea1..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/BookCategory.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: BookCategory.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.util.AbstractEnumerator;
-
-/**
- * <!-- 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.example.library.LibraryPackage#getBookCategory()
- * @model extendedMetaData="name='BookCategory'"
- * @generated
- */
-public final class BookCategory extends AbstractEnumerator {
- /**
- * The '<em><b>Mystery</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Mystery</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- 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 -->
- * <p>
- * If the meaning of '<em><b>Science Fiction</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- 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 -->
- * <p>
- * If the meaning of '<em><b>Biography</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #BIOGRAPHY_LITERAL
- * @model name="Biography"
- * @generated
- * @ordered
- */
- public static final int BIOGRAPHY = 2;
-
- /**
- * The '<em><b>Mystery</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #MYSTERY
- * @generated
- * @ordered
- */
- public static final BookCategory MYSTERY_LITERAL = new BookCategory(MYSTERY, "Mystery", "Mystery");
-
- /**
- * The '<em><b>Science Fiction</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #SCIENCE_FICTION
- * @generated
- * @ordered
- */
- public static final BookCategory SCIENCE_FICTION_LITERAL = new BookCategory(SCIENCE_FICTION, "ScienceFiction", "ScienceFiction");
-
- /**
- * The '<em><b>Biography</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #BIOGRAPHY
- * @generated
- * @ordered
- */
- public static final BookCategory BIOGRAPHY_LITERAL = new BookCategory(BIOGRAPHY, "Biography", "Biography");
-
- /**
- * 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 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;
- }
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private BookCategory(int value, String name, String literal) {
- super(value, name, literal);
- }
-
-} //BookCategory
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/Library.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/Library.java
deleted file mode 100644
index b3f2655f1..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/Library.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: Library.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- 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.example.library.Library#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.example.library.Library#getWriters <em>Writers</em>}</li>
- * <li>{@link org.eclipse.example.library.Library#getBooks <em>Books</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.example.library.LibraryPackage#getLibrary()
- * @model extendedMetaData="name='Library' kind='elementOnly'"
- * @generated
- */
-public interface Library extends EObject {
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.example.library.LibraryPackage#getLibrary_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * extendedMetaData="kind='element' name='name'"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.example.library.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.example.library.Writer}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Writers</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Writers</em>' containment reference list.
- * @see org.eclipse.example.library.LibraryPackage#getLibrary_Writers()
- * @model type="org.eclipse.example.library.Writer" containment="true"
- * extendedMetaData="kind='element' name='writers'"
- * @generated
- */
- EList getWriters();
-
- /**
- * Returns the value of the '<em><b>Books</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.example.library.Book}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Books</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Books</em>' containment reference list.
- * @see org.eclipse.example.library.LibraryPackage#getLibrary_Books()
- * @model type="org.eclipse.example.library.Book" containment="true"
- * extendedMetaData="kind='element' name='books'"
- * @generated
- */
- EList getBooks();
-
-} // Library
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/LibraryFactory.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/LibraryFactory.java
deleted file mode 100644
index b0dbe84f0..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/LibraryFactory.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryFactory.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library;
-
-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.example.library.LibraryPackage
- * @generated
- */
-public interface LibraryFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- LibraryFactory eINSTANCE = org.eclipse.example.library.impl.LibraryFactoryImpl.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 the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- LibraryPackage getLibraryPackage();
-
-} //LibraryFactory
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/LibraryPackage.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/LibraryPackage.java
deleted file mode 100644
index dd7c543a1..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/LibraryPackage.java
+++ /dev/null
@@ -1,520 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryPackage.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-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.example.library.LibraryFactory
- * @model kind="package"
- * @generated
- */
-public interface LibraryPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "library";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.example.eclipse.org/Library";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "library";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- LibraryPackage eINSTANCE = org.eclipse.example.library.impl.LibraryPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.example.library.impl.BookImpl <em>Book</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.example.library.impl.BookImpl
- * @see org.eclipse.example.library.impl.LibraryPackageImpl#getBook()
- * @generated
- */
- int BOOK = 0;
-
- /**
- * The feature id for the '<em><b>Title</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__TITLE = 0;
-
- /**
- * The feature id for the '<em><b>Pages</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__PAGES = 1;
-
- /**
- * The feature id for the '<em><b>Category</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__CATEGORY = 2;
-
- /**
- * The feature id for the '<em><b>Author</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__AUTHOR = 3;
-
- /**
- * The number of structural features of the '<em>Book</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK_FEATURE_COUNT = 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.example.library.impl.LibraryImpl <em>Library</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.example.library.impl.LibraryImpl
- * @see org.eclipse.example.library.impl.LibraryPackageImpl#getLibrary()
- * @generated
- */
- int LIBRARY = 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__NAME = 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 = 1;
-
- /**
- * The feature id for the '<em><b>Books</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__BOOKS = 2;
-
- /**
- * The number of structural features of the '<em>Library</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY_FEATURE_COUNT = 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.example.library.impl.WriterImpl <em>Writer</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.example.library.impl.WriterImpl
- * @see org.eclipse.example.library.impl.LibraryPackageImpl#getWriter()
- * @generated
- */
- int WRITER = 2;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER__NAME = 0;
-
- /**
- * The feature id for the '<em><b>Books</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER__BOOKS = 1;
-
- /**
- * The number of structural features of the '<em>Writer</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.example.library.BookCategory <em>Book Category</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.example.library.BookCategory
- * @see org.eclipse.example.library.impl.LibraryPackageImpl#getBookCategory()
- * @generated
- */
- int BOOK_CATEGORY = 3;
-
- /**
- * The meta object id for the '<em>Book Category Object</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.example.library.BookCategory
- * @see org.eclipse.example.library.impl.LibraryPackageImpl#getBookCategoryObject()
- * @generated
- */
- int BOOK_CATEGORY_OBJECT = 4;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.example.library.Book <em>Book</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Book</em>'.
- * @see org.eclipse.example.library.Book
- * @generated
- */
- EClass getBook();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.example.library.Book#getTitle <em>Title</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Title</em>'.
- * @see org.eclipse.example.library.Book#getTitle()
- * @see #getBook()
- * @generated
- */
- EAttribute getBook_Title();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.example.library.Book#getPages <em>Pages</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Pages</em>'.
- * @see org.eclipse.example.library.Book#getPages()
- * @see #getBook()
- * @generated
- */
- EAttribute getBook_Pages();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.example.library.Book#getCategory <em>Category</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Category</em>'.
- * @see org.eclipse.example.library.Book#getCategory()
- * @see #getBook()
- * @generated
- */
- EAttribute getBook_Category();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.example.library.Book#getAuthor <em>Author</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Author</em>'.
- * @see org.eclipse.example.library.Book#getAuthor()
- * @see #getBook()
- * @generated
- */
- EReference getBook_Author();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.example.library.Library <em>Library</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Library</em>'.
- * @see org.eclipse.example.library.Library
- * @generated
- */
- EClass getLibrary();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.example.library.Library#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.example.library.Library#getName()
- * @see #getLibrary()
- * @generated
- */
- EAttribute getLibrary_Name();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.example.library.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.example.library.Library#getWriters()
- * @see #getLibrary()
- * @generated
- */
- EReference getLibrary_Writers();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.example.library.Library#getBooks <em>Books</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Books</em>'.
- * @see org.eclipse.example.library.Library#getBooks()
- * @see #getLibrary()
- * @generated
- */
- EReference getLibrary_Books();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.example.library.Writer <em>Writer</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Writer</em>'.
- * @see org.eclipse.example.library.Writer
- * @generated
- */
- EClass getWriter();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.example.library.Writer#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.example.library.Writer#getName()
- * @see #getWriter()
- * @generated
- */
- EAttribute getWriter_Name();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.example.library.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.example.library.Writer#getBooks()
- * @see #getWriter()
- * @generated
- */
- EReference getWriter_Books();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.example.library.BookCategory <em>Book Category</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Book Category</em>'.
- * @see org.eclipse.example.library.BookCategory
- * @generated
- */
- EEnum getBookCategory();
-
- /**
- * Returns the meta object for data type '{@link org.eclipse.example.library.BookCategory <em>Book Category Object</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for data type '<em>Book Category Object</em>'.
- * @see org.eclipse.example.library.BookCategory
- * @model instanceClass="org.eclipse.example.library.BookCategory"
- * extendedMetaData="name='BookCategory:Object' baseType='BookCategory'"
- * @generated
- */
- EDataType getBookCategoryObject();
-
- /**
- * 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
- */
- LibraryFactory getLibraryFactory();
-
- /**
- * <!-- 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.example.library.impl.BookImpl <em>Book</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.example.library.impl.BookImpl
- * @see org.eclipse.example.library.impl.LibraryPackageImpl#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.example.library.impl.LibraryImpl <em>Library</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.example.library.impl.LibraryImpl
- * @see org.eclipse.example.library.impl.LibraryPackageImpl#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>Books</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference LIBRARY__BOOKS = eINSTANCE.getLibrary_Books();
-
- /**
- * The meta object literal for the '{@link org.eclipse.example.library.impl.WriterImpl <em>Writer</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.example.library.impl.WriterImpl
- * @see org.eclipse.example.library.impl.LibraryPackageImpl#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.example.library.BookCategory <em>Book Category</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.example.library.BookCategory
- * @see org.eclipse.example.library.impl.LibraryPackageImpl#getBookCategory()
- * @generated
- */
- EEnum BOOK_CATEGORY = eINSTANCE.getBookCategory();
-
- /**
- * The meta object literal for the '<em>Book Category Object</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.example.library.BookCategory
- * @see org.eclipse.example.library.impl.LibraryPackageImpl#getBookCategoryObject()
- * @generated
- */
- EDataType BOOK_CATEGORY_OBJECT = eINSTANCE.getBookCategoryObject();
-
- }
-
-} //LibraryPackage
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/Writer.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/Writer.java
deleted file mode 100644
index 13ab15c56..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/Writer.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: Writer.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- 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.example.library.Writer#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.example.library.Writer#getBooks <em>Books</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.example.library.LibraryPackage#getWriter()
- * @model extendedMetaData="name='Writer' kind='elementOnly'"
- * @generated
- */
-public interface Writer extends EObject {
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.example.library.LibraryPackage#getWriter_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * extendedMetaData="kind='element' name='name'"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.example.library.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.example.library.Book}.
- * It is bidirectional and its opposite is '{@link org.eclipse.example.library.Book#getAuthor <em>Author</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Books</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Books</em>' reference list.
- * @see org.eclipse.example.library.LibraryPackage#getWriter_Books()
- * @see org.eclipse.example.library.Book#getAuthor
- * @model type="org.eclipse.example.library.Book" opposite="author"
- * extendedMetaData="kind='element' name='books'"
- * @generated
- */
- EList getBooks();
-
-} // Writer
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/BookImpl.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/BookImpl.java
deleted file mode 100644
index 3f57223b4..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/BookImpl.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: BookImpl.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.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.ecore.impl.EObjectImpl;
-
-import org.eclipse.example.library.Book;
-import org.eclipse.example.library.BookCategory;
-import org.eclipse.example.library.LibraryPackage;
-import org.eclipse.example.library.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.example.library.impl.BookImpl#getTitle <em>Title</em>}</li>
- * <li>{@link org.eclipse.example.library.impl.BookImpl#getPages <em>Pages</em>}</li>
- * <li>{@link org.eclipse.example.library.impl.BookImpl#getCategory <em>Category</em>}</li>
- * <li>{@link org.eclipse.example.library.impl.BookImpl#getAuthor <em>Author</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class BookImpl extends EObjectImpl 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 = 0;
-
- /**
- * 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;
-
- /**
- * This is true if the Pages attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean pagesESet;
-
- /**
- * 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
- */
- protected EClass eStaticClass() {
- return LibraryPackage.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, LibraryPackage.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;
- boolean oldPagesESet = pagesESet;
- pagesESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__PAGES, oldPages, pages, !oldPagesESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetPages() {
- int oldPages = pages;
- boolean oldPagesESet = pagesESet;
- pages = PAGES_EDEFAULT;
- pagesESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, LibraryPackage.BOOK__PAGES, oldPages, PAGES_EDEFAULT, oldPagesESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetPages() {
- return pagesESet;
- }
-
- /**
- * <!-- 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, LibraryPackage.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, LibraryPackage.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, LibraryPackage.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, LibraryPackage.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, LibraryPackage.WRITER__BOOKS, Writer.class, msgs);
- if (newAuthor != null)
- msgs = ((InternalEObject)newAuthor).eInverseAdd(this, LibraryPackage.WRITER__BOOKS, Writer.class, msgs);
- msgs = basicSetAuthor(newAuthor, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__AUTHOR, newAuthor, newAuthor));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.BOOK__AUTHOR:
- if (author != null)
- msgs = ((InternalEObject)author).eInverseRemove(this, LibraryPackage.WRITER__BOOKS, Writer.class, msgs);
- return basicSetAuthor((Writer)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.BOOK__AUTHOR:
- return basicSetAuthor(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- return getTitle();
- case LibraryPackage.BOOK__PAGES:
- return new Integer(getPages());
- case LibraryPackage.BOOK__CATEGORY:
- return getCategory();
- case LibraryPackage.BOOK__AUTHOR:
- if (resolve) return getAuthor();
- return basicGetAuthor();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- setTitle((String)newValue);
- return;
- case LibraryPackage.BOOK__PAGES:
- setPages(((Integer)newValue).intValue());
- return;
- case LibraryPackage.BOOK__CATEGORY:
- setCategory((BookCategory)newValue);
- return;
- case LibraryPackage.BOOK__AUTHOR:
- setAuthor((Writer)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- setTitle(TITLE_EDEFAULT);
- return;
- case LibraryPackage.BOOK__PAGES:
- unsetPages();
- return;
- case LibraryPackage.BOOK__CATEGORY:
- unsetCategory();
- return;
- case LibraryPackage.BOOK__AUTHOR:
- setAuthor((Writer)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
- case LibraryPackage.BOOK__PAGES:
- return isSetPages();
- case LibraryPackage.BOOK__CATEGORY:
- return isSetCategory();
- case LibraryPackage.BOOK__AUTHOR:
- return author != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (title: ");
- result.append(title);
- result.append(", pages: ");
- if (pagesESet) result.append(pages); else result.append("<unset>");
- result.append(", category: ");
- if (categoryESet) result.append(category); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-} //BookImpl
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryFactoryImpl.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryFactoryImpl.java
deleted file mode 100644
index ff9a0bfaa..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryFactoryImpl.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryFactoryImpl.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.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.example.library.*;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryFactoryImpl extends EFactoryImpl implements LibraryFactory {
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static LibraryFactory init() {
- try {
- LibraryFactory theLibraryFactory = (LibraryFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.example.eclipse.org/Library");
- if (theLibraryFactory != null) {
- return theLibraryFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new LibraryFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case LibraryPackage.BOOK: return createBook();
- case LibraryPackage.LIBRARY: return createLibrary();
- case LibraryPackage.WRITER: return createWriter();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object createFromString(EDataType eDataType, String initialValue) {
- switch (eDataType.getClassifierID()) {
- case LibraryPackage.BOOK_CATEGORY:
- return createBookCategoryFromString(eDataType, initialValue);
- case LibraryPackage.BOOK_CATEGORY_OBJECT:
- return createBookCategoryObjectFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertToString(EDataType eDataType, Object instanceValue) {
- switch (eDataType.getClassifierID()) {
- case LibraryPackage.BOOK_CATEGORY:
- return convertBookCategoryToString(eDataType, instanceValue);
- case LibraryPackage.BOOK_CATEGORY_OBJECT:
- return convertBookCategoryObjectToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- 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 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() + "'");
- 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 BookCategory createBookCategoryObjectFromString(EDataType eDataType, String initialValue) {
- return createBookCategoryFromString(LibraryPackage.Literals.BOOK_CATEGORY, initialValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertBookCategoryObjectToString(EDataType eDataType, Object instanceValue) {
- return convertBookCategoryToString(LibraryPackage.Literals.BOOK_CATEGORY, instanceValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryPackage getLibraryPackage() {
- return (LibraryPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- public static LibraryPackage getPackage() {
- return LibraryPackage.eINSTANCE;
- }
-
-} //LibraryFactoryImpl
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryImpl.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryImpl.java
deleted file mode 100644
index a3d785fc9..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryImpl.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryImpl.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.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.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.example.library.Book;
-import org.eclipse.example.library.Library;
-import org.eclipse.example.library.LibraryPackage;
-import org.eclipse.example.library.Writer;
-
-/**
- * <!-- 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.example.library.impl.LibraryImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.example.library.impl.LibraryImpl#getWriters <em>Writers</em>}</li>
- * <li>{@link org.eclipse.example.library.impl.LibraryImpl#getBooks <em>Books</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class LibraryImpl extends EObjectImpl implements Library {
- /**
- * 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 #getWriters() <em>Writers</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getWriters()
- * @generated
- * @ordered
- */
- protected EList writers;
-
- /**
- * The cached value of the '{@link #getBooks() <em>Books</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getBooks()
- * @generated
- * @ordered
- */
- protected EList books;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibraryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return LibraryPackage.Literals.LIBRARY;
- }
-
- /**
- * <!-- 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, LibraryPackage.LIBRARY__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getWriters() {
- if (writers == null) {
- writers = new EObjectContainmentEList(Writer.class, this, LibraryPackage.LIBRARY__WRITERS);
- }
- return writers;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getBooks() {
- if (books == null) {
- books = new EObjectContainmentEList(Book.class, this, LibraryPackage.LIBRARY__BOOKS);
- }
- return books;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__WRITERS:
- return ((InternalEList)getWriters()).basicRemove(otherEnd, msgs);
- case LibraryPackage.LIBRARY__BOOKS:
- return ((InternalEList)getBooks()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__NAME:
- return getName();
- case LibraryPackage.LIBRARY__WRITERS:
- return getWriters();
- case LibraryPackage.LIBRARY__BOOKS:
- return getBooks();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__NAME:
- setName((String)newValue);
- return;
- case LibraryPackage.LIBRARY__WRITERS:
- getWriters().clear();
- getWriters().addAll((Collection)newValue);
- return;
- case LibraryPackage.LIBRARY__BOOKS:
- getBooks().clear();
- getBooks().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__NAME:
- setName(NAME_EDEFAULT);
- return;
- case LibraryPackage.LIBRARY__WRITERS:
- getWriters().clear();
- return;
- case LibraryPackage.LIBRARY__BOOKS:
- getBooks().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case LibraryPackage.LIBRARY__WRITERS:
- return writers != null && !writers.isEmpty();
- case LibraryPackage.LIBRARY__BOOKS:
- return books != null && !books.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-} //LibraryImpl
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryPackageImpl.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryPackageImpl.java
deleted file mode 100644
index c27fcd0e1..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryPackageImpl.java
+++ /dev/null
@@ -1,484 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryPackageImpl.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-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.ecore.xml.type.XMLTypePackage;
-
-import org.eclipse.example.library.Book;
-import org.eclipse.example.library.BookCategory;
-import org.eclipse.example.library.Library;
-import org.eclipse.example.library.LibraryFactory;
-import org.eclipse.example.library.LibraryPackage;
-import org.eclipse.example.library.Writer;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
- /**
- * <!-- 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 EEnum bookCategoryEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EDataType bookCategoryObjectEDataType = 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.example.library.LibraryPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private LibraryPackageImpl() {
- super(eNS_URI, LibraryFactory.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. Simple
- * dependencies are satisfied by calling this method on all
- * dependent packages before doing anything else. This method drives
- * initialization for interdependent packages directly, in parallel
- * with this package, itself.
- * <p>Of this package and its interdependencies, all packages which
- * have not yet been registered by their URI values are first created
- * and registered. The packages are then initialized in two steps:
- * meta-model objects for all of the packages are created before any
- * are initialized, since one package's meta-model objects may refer to
- * those of another.
- * <p>Invocation of this method will not affect any packages that have
- * already been initialized.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static LibraryPackage init() {
- if (isInited) return (LibraryPackage)EPackage.Registry.INSTANCE.getEPackage(LibraryPackage.eNS_URI);
-
- // Obtain or create and register package
- LibraryPackageImpl theLibraryPackage = (LibraryPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof LibraryPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new LibraryPackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- XMLTypePackage.eINSTANCE.eClass();
-
- // Create package meta-data objects
- theLibraryPackage.createPackageContents();
-
- // Initialize created meta-data
- theLibraryPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theLibraryPackage.freeze();
-
- return theLibraryPackage;
- }
-
- /**
- * <!-- 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_Books() {
- return (EReference)libraryEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- 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 EEnum getBookCategory() {
- return bookCategoryEEnum;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EDataType getBookCategoryObject() {
- return bookCategoryObjectEDataType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryFactory getLibraryFactory() {
- return (LibraryFactory)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__BOOKS);
-
- writerEClass = createEClass(WRITER);
- createEAttribute(writerEClass, WRITER__NAME);
- createEReference(writerEClass, WRITER__BOOKS);
-
- // Create enums
- bookCategoryEEnum = createEEnum(BOOK_CATEGORY);
-
- // Create data types
- bookCategoryObjectEDataType = createEDataType(BOOK_CATEGORY_OBJECT);
- }
-
- /**
- * <!-- 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);
-
- // Obtain other dependent packages
- XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
-
- // Add supertypes to classes
-
- // Initialize classes and features; add operations and parameters
- initEClass(bookEClass, Book.class, "Book", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getBook_Title(), theXMLTypePackage.getString(), "title", null, 1, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getBook_Pages(), theXMLTypePackage.getInt(), "pages", null, 1, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getBook_Category(), this.getBookCategory(), "category", "Mystery", 1, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- 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);
-
- initEClass(libraryEClass, Library.class, "Library", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getLibrary_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- 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);
- 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);
-
- initEClass(writerEClass, Writer.class, "Writer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getWriter_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- 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);
-
- // Initialize enums and add enum literals
- initEEnum(bookCategoryEEnum, BookCategory.class, "BookCategory");
- addEEnumLiteral(bookCategoryEEnum, BookCategory.MYSTERY_LITERAL);
- addEEnumLiteral(bookCategoryEEnum, BookCategory.SCIENCE_FICTION_LITERAL);
- addEEnumLiteral(bookCategoryEEnum, BookCategory.BIOGRAPHY_LITERAL);
-
- // Initialize data types
- initEDataType(bookCategoryObjectEDataType, BookCategory.class, "BookCategoryObject", IS_SERIALIZABLE, IS_GENERATED_INSTANCE_CLASS);
-
- // 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";
- addAnnotation
- (bookEClass,
- source,
- new String[] {
- "name", "Book",
- "kind", "elementOnly"
- });
- addAnnotation
- (getBook_Title(),
- source,
- new String[] {
- "kind", "element",
- "name", "title"
- });
- addAnnotation
- (getBook_Pages(),
- source,
- new String[] {
- "kind", "element",
- "name", "pages"
- });
- addAnnotation
- (getBook_Category(),
- source,
- new String[] {
- "kind", "element",
- "name", "category"
- });
- addAnnotation
- (getBook_Author(),
- source,
- new String[] {
- "kind", "element",
- "name", "author"
- });
- addAnnotation
- (bookCategoryEEnum,
- source,
- new String[] {
- "name", "BookCategory"
- });
- addAnnotation
- (bookCategoryObjectEDataType,
- source,
- new String[] {
- "name", "BookCategory:Object",
- "baseType", "BookCategory"
- });
- addAnnotation
- (libraryEClass,
- source,
- new String[] {
- "name", "Library",
- "kind", "elementOnly"
- });
- addAnnotation
- (getLibrary_Name(),
- source,
- new String[] {
- "kind", "element",
- "name", "name"
- });
- addAnnotation
- (getLibrary_Writers(),
- source,
- new String[] {
- "kind", "element",
- "name", "writers"
- });
- addAnnotation
- (getLibrary_Books(),
- source,
- new String[] {
- "kind", "element",
- "name", "books"
- });
- addAnnotation
- (writerEClass,
- source,
- new String[] {
- "name", "Writer",
- "kind", "elementOnly"
- });
- addAnnotation
- (getWriter_Name(),
- source,
- new String[] {
- "kind", "element",
- "name", "name"
- });
- addAnnotation
- (getWriter_Books(),
- source,
- new String[] {
- "kind", "element",
- "name", "books"
- });
- }
-
-} //LibraryPackageImpl
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/WriterImpl.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/WriterImpl.java
deleted file mode 100644
index 341bd5980..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/WriterImpl.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: WriterImpl.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.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.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.example.library.Book;
-import org.eclipse.example.library.LibraryPackage;
-import org.eclipse.example.library.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.example.library.impl.WriterImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.example.library.impl.WriterImpl#getBooks <em>Books</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class WriterImpl extends EObjectImpl 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 #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 #getBooks() <em>Books</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getBooks()
- * @generated
- * @ordered
- */
- protected EList books;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected WriterImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return LibraryPackage.Literals.WRITER;
- }
-
- /**
- * <!-- 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, LibraryPackage.WRITER__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getBooks() {
- if (books == null) {
- books = new EObjectWithInverseResolvingEList(Book.class, this, LibraryPackage.WRITER__BOOKS, LibraryPackage.BOOK__AUTHOR);
- }
- return books;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- return ((InternalEList)getBooks()).basicAdd(otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- return ((InternalEList)getBooks()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case LibraryPackage.WRITER__NAME:
- return getName();
- case LibraryPackage.WRITER__BOOKS:
- return getBooks();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case LibraryPackage.WRITER__NAME:
- setName((String)newValue);
- return;
- case LibraryPackage.WRITER__BOOKS:
- getBooks().clear();
- getBooks().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case LibraryPackage.WRITER__NAME:
- setName(NAME_EDEFAULT);
- return;
- case LibraryPackage.WRITER__BOOKS:
- getBooks().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case LibraryPackage.WRITER__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case LibraryPackage.WRITER__BOOKS:
- return books != null && !books.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-} //WriterImpl
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryAdapterFactory.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryAdapterFactory.java
deleted file mode 100644
index 558eb3d00..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryAdapterFactory.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryAdapterFactory.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.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.example.library.*;
-
-/**
- * <!-- 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.example.library.LibraryPackage
- * @generated
- */
-public class LibraryAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static LibraryPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = LibraryPackage.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
- */
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch the delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibrarySwitch modelSwitch =
- new LibrarySwitch() {
- public Object caseBook(Book object) {
- return createBookAdapter();
- }
- public Object caseLibrary(Library object) {
- return createLibraryAdapter();
- }
- public Object caseWriter(Writer object) {
- return createWriterAdapter();
- }
- public Object 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
- */
- public Adapter createAdapter(Notifier target) {
- return (Adapter)modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.example.library.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.example.library.Book
- * @generated
- */
- public Adapter createBookAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.example.library.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.example.library.Library
- * @generated
- */
- public Adapter createLibraryAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.example.library.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.example.library.Writer
- * @generated
- */
- public Adapter createWriterAdapter() {
- 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;
- }
-
-} //LibraryAdapterFactory
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryResourceFactoryImpl.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryResourceFactoryImpl.java
deleted file mode 100644
index 48c073dfa..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryResourceFactoryImpl.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryResourceFactoryImpl.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
-
-import org.eclipse.emf.ecore.xmi.XMLResource;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource Factory</b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.eclipse.example.library.util.LibraryResourceImpl
- * @generated
- */
-public class LibraryResourceFactoryImpl extends ResourceFactoryImpl {
- /**
- * Creates an instance of the resource factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryResourceFactoryImpl() {
- super();
- }
-
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Resource createResource(URI uri) {
- XMLResource result = new LibraryResourceImpl(uri);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
- result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
-
- result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
- return result;
- }
-
-} //LibraryResourceFactoryImpl
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryResourceImpl.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryResourceImpl.java
deleted file mode 100644
index 99c504edd..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryResourceImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryResourceImpl.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource </b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.eclipse.example.library.util.LibraryResourceFactoryImpl
- * @generated
- */
-public class LibraryResourceImpl extends XMLResourceImpl {
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param uri the URI of the new resource.
- * @generated
- */
- public LibraryResourceImpl(URI uri) {
- super(uri);
- }
-
-} //LibraryResourceImpl
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibrarySwitch.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibrarySwitch.java
deleted file mode 100644
index 4319647c1..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibrarySwitch.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibrarySwitch.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.util;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.example.library.*;
-
-/**
- * <!-- 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.example.library.LibraryPackage
- * @generated
- */
-public class LibrarySwitch {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static LibraryPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibrarySwitch() {
- if (modelPackage == null) {
- modelPackage = LibraryPackage.eINSTANCE;
- }
- }
-
- /**
- * 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
- */
- public Object doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * 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
- */
- protected Object doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- List eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch((EClass)eSuperTypes.get(0), theEObject);
- }
- }
-
- /**
- * 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
- */
- protected Object doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case LibraryPackage.BOOK: {
- Book book = (Book)theEObject;
- Object result = caseBook(book);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case LibraryPackage.LIBRARY: {
- Library library = (Library)theEObject;
- Object result = caseLibrary(library);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case LibraryPackage.WRITER: {
- Writer writer = (Writer)theEObject;
- Object result = caseWriter(writer);
- 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 Object 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 Object 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 Object caseWriter(Writer 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
- */
- public Object defaultCase(EObject object) {
- return null;
- }
-
-} //LibrarySwitch
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryXMLProcessor.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryXMLProcessor.java
deleted file mode 100644
index ed9d74110..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/util/LibraryXMLProcessor.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryXMLProcessor.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.util;
-
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
-
-import org.eclipse.example.library.LibraryPackage;
-
-/**
- * This class contains helper methods to serialize and deserialize XML documents
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryXMLProcessor extends XMLProcessor {
-
- /**
- * Public constructor to instantiate the helper.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryXMLProcessor() {
- super((EPackage.Registry.INSTANCE));
- LibraryPackage.eINSTANCE.eClass();
- }
-
- /**
- * Register for "*" and "xml" file extensions the LibraryResourceFactoryImpl factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Map getRegistrations() {
- if (registrations == null) {
- super.getRegistrations();
- registrations.put(XML_EXTENSION, new LibraryResourceFactoryImpl());
- registrations.put(STAR_EXTENSION, new LibraryResourceFactoryImpl());
- }
- return registrations;
- }
-
-} //LibraryXMLProcessor
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/validation/BookValidator.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/validation/BookValidator.java
deleted file mode 100644
index be1be3f11..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/validation/BookValidator.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: BookValidator.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.validation;
-
-import org.eclipse.example.library.BookCategory;
-import org.eclipse.example.library.Writer;
-
-/**
- * A sample validator interface for {@link org.eclipse.example.library.Book}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface BookValidator {
- boolean validate();
-
- boolean validateTitle(String value);
- boolean validatePages(int value);
- boolean validateCategory(BookCategory value);
- boolean validateAuthor(Writer value);
-}
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/validation/LibraryValidator.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/validation/LibraryValidator.java
deleted file mode 100644
index 6b035212d..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/validation/LibraryValidator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryValidator.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.validation;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * A sample validator interface for {@link org.eclipse.example.library.Library}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface LibraryValidator {
- boolean validate();
-
- boolean validateName(String value);
- boolean validateWriters(EList value);
- boolean validateBooks(EList value);
-}
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/validation/WriterValidator.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/validation/WriterValidator.java
deleted file mode 100644
index 6b853686b..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/validation/WriterValidator.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: WriterValidator.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.validation;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * A sample validator interface for {@link org.eclipse.example.library.Writer}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface WriterValidator {
- boolean validate();
-
- boolean validateName(String value);
- boolean validateBooks(EList value);
-}
diff --git a/deprecated/library (emf 2.3)/Library/text/description.txt b/deprecated/library (emf 2.3)/Library/text/description.txt
deleted file mode 100644
index cdbf7a306..000000000
--- a/deprecated/library (emf 2.3)/Library/text/description.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-Model Library
-
-This model description is not a real EMF artifact. It was generated by the
-org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's
-code generator can be extended.
-This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
-
-Package library <http://www.example.eclipse.org/Library>
-
- Class Book
- Attribute title : String<<1..1>>
- Attribute pages : Int<<1..1>>
- Attribute category : BookCategory<<1..1>>
- Reference author : Writer<<1..1>>
-
- Class Library
- Attribute name : String<<1..1>>
- Reference writers : Writer<<0..*>>
- Reference books : Book<<0..*>>
-
- Class Writer
- Attribute name : String<<1..1>>
- Reference books : Book<<0..*>>
-
- Enum BookCategory
- Literal Mystery = 0
- Literal ScienceFiction = 1
- Literal Biography = 2
-
- DataType BookCategoryObject <org.eclipse.emf.common.util.Enumerator>

Back to the top