Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2012-03-19 14:42:14 +0000
committercletavernie2012-03-19 14:42:14 +0000
commit812184f20eea0b3c24efdbeb1d0b1460cc51e33f (patch)
treeea0d81e2424021a7427e13cb80f4a64752977af2 /deprecated
parentb7eff26217222fa7a508d8294cf4787ef732f30d (diff)
downloadorg.eclipse.papyrus-812184f20eea0b3c24efdbeb1d0b1460cc51e33f.tar.gz
org.eclipse.papyrus-812184f20eea0b3c24efdbeb1d0b1460cc51e33f.tar.xz
org.eclipse.papyrus-812184f20eea0b3c24efdbeb1d0b1460cc51e33f.zip
359058: [Refactoring - Architecture] Identify the layers and sub-layers for the Papyrus architecture
https://bugs.eclipse.org/bugs/show_bug.cgi?id=359058
Diffstat (limited to 'deprecated')
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/.classpath7
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/.project28
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/.svnignore1
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/META-INF/MANIFEST.MF19
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/about.html28
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/build.properties8
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EAnnotation.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EAttribute.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EClass.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EDataType.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EEnum.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EEnumLiteral.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EFactory.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EGenericType.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EObject.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EOperation.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EPackage.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EParameter.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EReference.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_ETypeParameter.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_Resource.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_ResourceEObject.gifbin0 -> 223 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/obj16/Resource.gifbin0 -> 129 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/icons/full/obj16/ResourceEObject.gifbin0 -> 129 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/plugin.properties34
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/plugin.xml25
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEObjectItemProvider.java120
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEditPlugin.java95
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProvider.java168
-rw-r--r--deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProviderAdapterFactory.java235
30 files changed, 768 insertions, 0 deletions
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/.classpath b/deprecated/org.eclipse.papyrus.resource.edit/.classpath
new file mode 100644
index 00000000000..45f024e850e
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/.project b/deprecated/org.eclipse.papyrus.resource.edit/.project
new file mode 100644
index 00000000000..6d4ba7a134f
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.resource.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/org.eclipse.papyrus.resource.edit/.svnignore b/deprecated/org.eclipse.papyrus.resource.edit/.svnignore
new file mode 100644
index 00000000000..c5e82d74585
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/.svnignore
@@ -0,0 +1 @@
+bin \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.resource.edit/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..4eb8b244c4b
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.resource.provider
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.papyrus.resource;bundle-version="0.9.0";visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport
+Bundle-Vendor: %providerName
+Bundle-Version: 0.9.0.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.resource.provider.ResourceEditPl
+ ugin$Implementation
+Bundle-SymbolicName: org.eclipse.papyrus.resource.edit;singleton:=true
+
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/about.html b/deprecated/org.eclipse.papyrus.resource.edit/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/build.properties b/deprecated/org.eclipse.papyrus.resource.edit/build.properties
new file mode 100644
index 00000000000..57afb740378
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/build.properties
@@ -0,0 +1,8 @@
+#
+#Mon Sep 12 09:30:11 CEST 2011
+output..=bin/
+bin.includes=.,icons/,META-INF/,plugin.xml,plugin.properties,about.html
+jars.compile.order=.
+src.includes=.,icons/,META-INF/,plugin.xml,plugin.properties,about.html
+source..=src/
+bin..=bin/
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EAnnotation.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EAnnotation.gif
new file mode 100644
index 00000000000..68005ae0cc1
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EAnnotation.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EAttribute.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EAttribute.gif
new file mode 100644
index 00000000000..0cf27b2923f
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EAttribute.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EClass.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EClass.gif
new file mode 100644
index 00000000000..a3037614eef
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EClass.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EDataType.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EDataType.gif
new file mode 100644
index 00000000000..da5f95c1466
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EDataType.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EEnum.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EEnum.gif
new file mode 100644
index 00000000000..5ced28cb64f
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EEnum.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EEnumLiteral.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EEnumLiteral.gif
new file mode 100644
index 00000000000..e88df1ce2bd
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EEnumLiteral.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EFactory.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EFactory.gif
new file mode 100644
index 00000000000..ac071eed977
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EFactory.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EGenericType.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EGenericType.gif
new file mode 100644
index 00000000000..1e0e0f326f8
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EGenericType.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EObject.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EObject.gif
new file mode 100644
index 00000000000..88d8844103d
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EObject.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EOperation.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EOperation.gif
new file mode 100644
index 00000000000..464f0930743
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EOperation.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EPackage.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EPackage.gif
new file mode 100644
index 00000000000..5ced28cb64f
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EPackage.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EParameter.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EParameter.gif
new file mode 100644
index 00000000000..4f7ee52acff
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EParameter.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EReference.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EReference.gif
new file mode 100644
index 00000000000..6baa8a5a3b7
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_EReference.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_ETypeParameter.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_ETypeParameter.gif
new file mode 100644
index 00000000000..ac071eed977
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_ETypeParameter.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_Resource.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_Resource.gif
new file mode 100644
index 00000000000..0a9ad1c7ea8
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_Resource.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_ResourceEObject.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_ResourceEObject.gif
new file mode 100644
index 00000000000..9e35a4ed492
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/ctool16/CreateResource_eobjects_ResourceEObject.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/obj16/Resource.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/obj16/Resource.gif
new file mode 100644
index 00000000000..338fb8d9a72
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/obj16/Resource.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/icons/full/obj16/ResourceEObject.gif b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/obj16/ResourceEObject.gif
new file mode 100644
index 00000000000..904159880b3
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/icons/full/obj16/ResourceEObject.gif
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/plugin.properties b/deprecated/org.eclipse.papyrus.resource.edit/plugin.properties
new file mode 100644
index 00000000000..c96ce6877c3
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/plugin.properties
@@ -0,0 +1,34 @@
+####################################################################################
+# Copyright (c) 2008 Atos Origin.
+#
+#
+# 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:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+#
+##################################################################################
+pluginName = Papyrus Resource Edit Support (Incubation)
+providerName=Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_Resource_type = Resource
+_UI_ResourceEObject_type = EObject
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_Resource_eobjects_feature = Eobjects
+_UI_Unknown_feature = Unspecified
+
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/plugin.xml b/deprecated/org.eclipse.papyrus.resource.edit/plugin.xml
new file mode 100644
index 00000000000..e0e723a073b
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/plugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.eclipse.org/papyrus/resource/1.1"
+ class="org.eclipse.papyrus.resource.provider.ResourceItemProviderAdapterFactory"
+ 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/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEObjectItemProvider.java b/deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEObjectItemProvider.java
new file mode 100644
index 00000000000..817dca7e2de
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEObjectItemProvider.java
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * 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:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource.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.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.resource.ResourceEObject}
+ * object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ResourceEObjectItemProvider 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 ResourceEObjectItemProvider(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 ResourceEObject.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ResourceEObject"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_ResourceEObject_type");
+ }
+
+ /**
+ * 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 ResourceEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEditPlugin.java b/deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEditPlugin.java
new file mode 100644
index 00000000000..b4aa6cccaef
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEditPlugin.java
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * 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:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Resource edit plugin. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public final class ResourceEditPlugin extends EMFPlugin {
+
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final ResourceEditPlugin INSTANCE = new ResourceEditPlugin();
+
+ /**
+ * 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 ResourceEditPlugin() {
+ super(new ResourceLocator[] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+
+ /**
+ * Creates an instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProvider.java b/deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProvider.java
new file mode 100644
index 00000000000..2aa5ba09197
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProvider.java
@@ -0,0 +1,168 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * 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:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource.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.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.resource.Resource;
+import org.eclipse.papyrus.resource.ResourceFactory;
+import org.eclipse.papyrus.resource.ResourcePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.resource.Resource} object.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ResourceItemProvider 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 ResourceItemProvider(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 specifies how to implement {@link #getChildren} and is used to deduce an appropriate
+ * feature for an {@link org.eclipse.emf.edit.command.AddCommand},
+ * {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(ResourcePackage.Literals.RESOURCE__EOBJECTS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Resource.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Resource"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Resource_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}
+ * . <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Resource.class)) {
+ case ResourcePackage.RESOURCE__EOBJECTS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that
+ * can be created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(ResourcePackage.Literals.RESOURCE__EOBJECTS,
+ ResourceFactory.eINSTANCE.createResource()));
+
+ newChildDescriptors.add(createChildParameter(ResourcePackage.Literals.RESOURCE__EOBJECTS,
+ ResourceFactory.eINSTANCE.createResourceEObject()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ResourceEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProviderAdapterFactory.java b/deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProviderAdapterFactory.java
new file mode 100644
index 00000000000..6b27e36b9d7
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProviderAdapterFactory.java
@@ -0,0 +1,235 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * 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:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource.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.papyrus.resource.util.ResourceAdapterFactory;
+
+/**
+ * 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 ResourceItemProviderAdapterFactory extends ResourceAdapterFactory 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 ResourceItemProviderAdapterFactory() {
+ 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.papyrus.resource.Resource} instances. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected ResourceItemProvider resourceItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.resource.Resource}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createResourceAdapter() {
+ if (resourceItemProvider == null) {
+ resourceItemProvider = new ResourceItemProvider(this);
+ }
+
+ return resourceItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.papyrus.resource.ResourceEObject} instances. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected ResourceEObjectItemProvider resourceEObjectItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.resource.ResourceEObject}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createResourceEObjectAdapter() {
+ if (resourceEObjectItemProvider == null) {
+ resourceEObjectItemProvider = new ResourceEObjectItemProvider(this);
+ }
+
+ return resourceEObjectItemProvider;
+ }
+
+ /**
+ * 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 (resourceItemProvider != null)
+ resourceItemProvider.dispose();
+ if (resourceEObjectItemProvider != null)
+ resourceEObjectItemProvider.dispose();
+ }
+
+}

Back to the top