Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/.classpath7
-rw-r--r--extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/.project28
-rw-r--r--extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/META-INF/MANIFEST.MF21
-rw-r--r--extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/build.properties10
-rw-r--r--extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/icons/full/obj16/PapyrusDiff.gifbin0 -> 129 bytes
-rw-r--r--extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/icons/full/obj16/PapyrusGeneralizationChange.gifbin0 -> 129 bytes
-rw-r--r--extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/plugin.properties24
-rw-r--r--extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/plugin.xml22
-rw-r--r--extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/ExtensionsItemProviderAdapterFactory.java210
-rw-r--r--extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/PapyrusCompareEditPlugin.java108
-rw-r--r--extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/PapyrusDiffItemProvider.java124
-rw-r--r--extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/PapyrusGeneralizationChangeItemProvider.java170
12 files changed, 724 insertions, 0 deletions
diff --git a/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/.classpath b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/.classpath
new file mode 100644
index 00000000000..3d1f8e3a126
--- /dev/null
+++ b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/.project b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/.project
new file mode 100644
index 00000000000..92d4d64acdf
--- /dev/null
+++ b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.compare.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/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/META-INF/MANIFEST.MF b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..7b8b24da3cf
--- /dev/null
+++ b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.compare.edit;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: extensions.provider.PapyrusCompareEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Export-Package: extensions.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.papyrus.compare;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.compare;visibility:=reexport,
+ org.eclipse.emf.compare.edit;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.emf.compare.diagram;visibility:=reexport,
+ org.eclipse.emf.compare.diagram.edit;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/build.properties b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/build.properties
new file mode 100644
index 00000000000..061672eb20e
--- /dev/null
+++ b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/build.properties
@@ -0,0 +1,10 @@
+#
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/icons/full/obj16/PapyrusDiff.gif b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/icons/full/obj16/PapyrusDiff.gif
new file mode 100644
index 00000000000..e4b530eca17
--- /dev/null
+++ b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/icons/full/obj16/PapyrusDiff.gif
Binary files differ
diff --git a/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/icons/full/obj16/PapyrusGeneralizationChange.gif b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/icons/full/obj16/PapyrusGeneralizationChange.gif
new file mode 100644
index 00000000000..134551bff7e
--- /dev/null
+++ b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/icons/full/obj16/PapyrusGeneralizationChange.gif
Binary files differ
diff --git a/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/plugin.properties b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/plugin.properties
new file mode 100644
index 00000000000..fcbe9c4f7dd
--- /dev/null
+++ b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/plugin.properties
@@ -0,0 +1,24 @@
+#
+
+pluginName = PapyrusCompare 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_PapyrusDiff_type = Papyrus Diff
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_Unknown_feature = Unspecified
+
+_UI_PapyrusGeneralizationChange_type = Papyrus Generalization Change
+_UI_PapyrusGeneralizationChange_generalizationChange_feature = Generalization Change
+_UI_PapyrusGeneralizationChange_inheritedFeatureNodeChange_feature = Inherited Feature Node Change
diff --git a/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/plugin.xml b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/plugin.xml
new file mode 100644
index 00000000000..08e3f8f1751
--- /dev/null
+++ b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/plugin.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <!-- @generated papyrusCompare -->
+ <factory
+ uri="http://www.eclipse.org/emf/compare/papyrus"
+ class="extensions.provider.ExtensionsItemProviderAdapterFactory"
+ 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/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/ExtensionsItemProviderAdapterFactory.java b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/ExtensionsItemProviderAdapterFactory.java
new file mode 100644
index 00000000000..ea191c2b847
--- /dev/null
+++ b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/ExtensionsItemProviderAdapterFactory.java
@@ -0,0 +1,210 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package extensions.provider;
+
+import extensions.util.ExtensionsAdapterFactory;
+
+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;
+
+/**
+ * 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 ExtensionsItemProviderAdapterFactory extends ExtensionsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExtensionsItemProviderAdapterFactory() {
+ 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 extensions.PapyrusGeneralizationChange} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusGeneralizationChangeItemProvider papyrusGeneralizationChangeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link extensions.PapyrusGeneralizationChange}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPapyrusGeneralizationChangeAdapter() {
+ if (papyrusGeneralizationChangeItemProvider == null) {
+ papyrusGeneralizationChangeItemProvider = new PapyrusGeneralizationChangeItemProvider(this);
+ }
+
+ return papyrusGeneralizationChangeItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (papyrusGeneralizationChangeItemProvider != null) papyrusGeneralizationChangeItemProvider.dispose();
+ }
+
+}
diff --git a/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/PapyrusCompareEditPlugin.java b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/PapyrusCompareEditPlugin.java
new file mode 100644
index 00000000000..aa83b26d647
--- /dev/null
+++ b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/PapyrusCompareEditPlugin.java
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package extensions.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.compare.diagram.internal.extensions.provider.ExtensionsEditPlugin;
+import org.eclipse.emf.compare.provider.EMFCompareEditPlugin;
+
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+/**
+ * This is the central singleton for the PapyrusCompare edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class PapyrusCompareEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final PapyrusCompareEditPlugin INSTANCE = new PapyrusCompareEditPlugin();
+
+ /**
+ * 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 PapyrusCompareEditPlugin() {
+ super
+ (new ResourceLocator [] {
+ EMFCompareEditPlugin.INSTANCE,
+ EcoreEditPlugin.INSTANCE,
+ ExtensionsEditPlugin.INSTANCE,
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/PapyrusDiffItemProvider.java b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/PapyrusDiffItemProvider.java
new file mode 100644
index 00000000000..2f985aed09d
--- /dev/null
+++ b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/PapyrusDiffItemProvider.java
@@ -0,0 +1,124 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package extensions.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.compare.DifferenceKind;
+import org.eclipse.emf.compare.provider.DiffItemProvider;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import extensions.PapyrusDiff;
+
+/**
+ * This is the item provider adapter for a {@link extensions.PapyrusDiff} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrusDiffItemProvider
+ extends DiffItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusDiffItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ DifferenceKind labelValue = ((PapyrusDiff)object).getKind();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ?
+ getString("_UI_PapyrusDiff_type") :
+ getString("_UI_PapyrusDiff_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
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return PapyrusCompareEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/PapyrusGeneralizationChangeItemProvider.java b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/PapyrusGeneralizationChangeItemProvider.java
new file mode 100644
index 00000000000..b38202bbef5
--- /dev/null
+++ b/extraplugins/uml/compare2/org.eclipse.papyrus.compare.edit/src/extensions/provider/PapyrusGeneralizationChangeItemProvider.java
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package extensions.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.compare.DifferenceKind;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import extensions.ExtensionsPackage;
+import extensions.PapyrusGeneralizationChange;
+
+/**
+ * This is the item provider adapter for a {@link extensions.PapyrusGeneralizationChange} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrusGeneralizationChangeItemProvider
+ extends PapyrusDiffItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusGeneralizationChangeItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addGeneralizationChangePropertyDescriptor(object);
+ addInheritedFeatureNodeChangePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Generalization Change feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addGeneralizationChangePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusGeneralizationChange_generalizationChange_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusGeneralizationChange_generalizationChange_feature", "_UI_PapyrusGeneralizationChange_type"),
+ ExtensionsPackage.Literals.PAPYRUS_GENERALIZATION_CHANGE__GENERALIZATION_CHANGE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Inherited Feature Node Change feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addInheritedFeatureNodeChangePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusGeneralizationChange_inheritedFeatureNodeChange_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusGeneralizationChange_inheritedFeatureNodeChange_feature", "_UI_PapyrusGeneralizationChange_type"),
+ ExtensionsPackage.Literals.PAPYRUS_GENERALIZATION_CHANGE__INHERITED_FEATURE_NODE_CHANGE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns PapyrusGeneralizationChange.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PapyrusGeneralizationChange"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ DifferenceKind labelValue = ((PapyrusGeneralizationChange)object).getKind();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ?
+ getString("_UI_PapyrusGeneralizationChange_type") :
+ getString("_UI_PapyrusGeneralizationChange_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
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}

Back to the top