Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui')
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/.classpath7
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/.project34
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/META-INF/MANIFEST.MF25
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/build.properties6
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/icons/PapyrusLogo16x16.gifbin561 -> 0 bytes
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/icons/papyrus_compare_editor.gifbin956 -> 0 bytes
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/plugin.xml51
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/resources/emfcompare.uiCustom2
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/Activator.java110
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/PapyrusContentMergeViewerCreator.java22
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/UMLModelContentMergeDiffTab.java82
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/UMLModelContentMergeTabFolder.java234
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/UMLModelContentMergeViewer.java49
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/provider/PapyrusLabelProvider.java174
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/structure/viewer/UMLStructureMergeViewerCreator.java39
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalContentMergeViewerCreator.java22
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalModelContentMergeDiffTab.java82
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalModelContentMergeTabFolder.java234
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalModelContentMergeViewer.java169
-rw-r--r--sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/testSWT/MyViewer.java90
21 files changed, 0 insertions, 1440 deletions
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/.classpath b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/.classpath
deleted file mode 100644
index 2d1a4302f04..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <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="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/.project b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/.project
deleted file mode 100644
index 465c4541780..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.compare.ui</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>
- <buildCommand>
- <name>org.eclipse.emf.facet.common.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.emf.facet.common.ProjectNature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/.settings/org.eclipse.jdt.core.prefs b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0cc8f3fb6fc..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Wed Oct 12 17:16:52 CEST 2011
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/META-INF/MANIFEST.MF b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index e01ad53e420..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Papyrus UML Compare
-Bundle-SymbolicName: org.eclipse.papyrus.uml.compare.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.compare.ui.Activator
-Bundle-Vendor: Eclipse Modeling Project
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.compare,
- org.eclipse.emf.compare.ui,
- org.eclipse.emf.facet.infra.browser.custom,
- org.eclipse.emf.facet.infra.browser.custom.core,
- org.eclipse.emf.facet.infra.browser.uicore,
- org.eclipse.emf.compare.diff,
- org.eclipse.emf.edit.ui,
- org.eclipse.emf.compare,
- org.eclipse.emf.transaction,
- org.eclipse.emf.workspace;bundle-version="1.5.1"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.papyrus.uml.compare.ui,
- org.eclipse.papyrus.uml.compare.ui.merge.viewer,
- org.eclipse.papyrus.uml.compare.ui.provider,
- org.eclipse.papyrus.uml.compare.ui.structure.viewer
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/build.properties b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/build.properties
deleted file mode 100644
index 09eda12bd38..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- resources/emfcompare.uiCustom
-source.. = src/
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/icons/PapyrusLogo16x16.gif b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/icons/PapyrusLogo16x16.gif
deleted file mode 100644
index 8a31f458379..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/icons/PapyrusLogo16x16.gif
+++ /dev/null
Binary files differ
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/icons/papyrus_compare_editor.gif b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/icons/papyrus_compare_editor.gif
deleted file mode 100644
index e817df6ff0c..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/icons/papyrus_compare_editor.gif
+++ /dev/null
Binary files differ
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/plugin.xml b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/plugin.xml
deleted file mode 100644
index 8610ce8257c..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/plugin.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?eclipse version="3.4"?>
-
-<plugin>
- <extension point="org.eclipse.compare.structureMergeViewers">
- <viewer class="org.eclipse.papyrus.uml.compare.ui.structure.viewer.UMLStructureMergeViewerCreator" extensions="uml" id="org.eclipse.papyrus.uml.compare.ui.structureviewer" label="My Structure Merge Viewer">
- </viewer>
- <contentTypeBinding contentTypeId="org.eclipse.papyrus.uml.compare.papyrus" structureMergeViewerId="org.eclipse.papyrus.uml.compare.ui.structureviewer">
- </contentTypeBinding>
- </extension>
-
- <extension point="org.eclipse.emf.facet.infra.browser.custom.core.registration">
- <browserCustomization file="resources/emfcompare.uiCustom"/>
- </extension>
- <extension
- point="org.eclipse.core.contenttype.contentTypes">
- <content-type
- id="org.eclipse.papyrus.uml.compare.papyrus"
- name="Papyrus type"
- priority="normal">
- </content-type>
- </extension>
- <extension
- point="org.eclipse.compare.contentMergeViewers">
- <viewer
- class="org.eclipse.papyrus.uml.compare.ui.merge.viewer.PapyrusContentMergeViewerCreator"
- extensions="uml"
- id="org.eclipse.papyrus.uml.compare.ui.content.merge.viewer"
- label="My Papyrus Content Merge Viewer">
- </viewer>
- <contentTypeBinding
- contentMergeViewerId="org.eclipse.papyrus.uml.compare.ui.content.merge.viewer"
- contentTypeId="org.eclipse.papyrus.uml.compare.papyrus"
- structureMergeViewerId="org.eclipse.papyrus.uml.compare.ui.structureviewer">
- </contentTypeBinding>
- </extension>
- <extension
- point="org.eclipse.compare.contentMergeViewers">
- <viewer
- class="org.eclipse.papyrus.uml.compare.ui.transactional.merge.viewer.TransactionalContentMergeViewerCreator"
- extensions="uml"
- id="org.eclipse.papyrus.uml.compare.ui.content.transactional.merge.viewer"
- label="Transactional Papyrus Content Merge Viewer">
- </viewer>
- <contentTypeBinding
- contentMergeViewerId="org.eclipse.papyrus.uml.compare.ui.content.merge.viewer"
- contentTypeId="org.eclipse.papyrus.uml.compare.papyrus"
- structureMergeViewerId="org.eclipse.papyrus.uml.compare.ui.structureviewer">
- </contentTypeBinding>
- </extension>
-</plugin>
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/resources/emfcompare.uiCustom b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/resources/emfcompare.uiCustom
deleted file mode 100644
index ba6d75bfd7b..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/resources/emfcompare.uiCustom
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<uicustom:MetamodelView xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8" metamodelURI="http://www.eclipse.org/emf/compare/diff/1.1" allQuerySetsAvailable="false"/>
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/Activator.java b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/Activator.java
deleted file mode 100644
index 85069d90aa7..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/Activator.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.eclipse.papyrus.uml.compare.ui;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.facet.infra.browser.custom.MetamodelView;
-import org.eclipse.emf.facet.infra.browser.custom.core.CustomizationsCatalog;
-import org.eclipse.emf.facet.infra.browser.uicore.CustomizationManager;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.compare.ui"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /**
- * Returns the image from the given path.
- *
- * @param path the path the image to be displayed
- * @return the image found
- * FIXME
- */
- public static Image getImage(String path) {
- final ImageRegistry registry = getDefault().getImageRegistry();
- Image image = registry.get(path);
- if(image == null) {
- registry.put(path, Activator.imageDescriptorFromPlugin(PLUGIN_ID, path));
- image = registry.get(path);
- }
- return image;
-
- }
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- private CustomizationManager fCustomizationManager;
- /**
- * duplicate code from the ModelExplorer
- * @return the customization manager in charge to adapt element in modisco
- */
- public CustomizationManager getCustomizationManager() {
- if(this.fCustomizationManager == null) {
- this.fCustomizationManager = new CustomizationManager();
- init(this.fCustomizationManager);
- }
- return this.fCustomizationManager;
- }
-
- private void init(final CustomizationManager customizationManager) {
- // the appearance can be customized here:
-
- customizationManager.setShowDerivedLinks(true);
-
- try {
-
- // load customizations defined as default through the customization
- // extension
- List<MetamodelView> registryDefaultCustomizations = CustomizationsCatalog.getInstance().getRegistryDefaultCustomizations();
- for(MetamodelView metamodelView : registryDefaultCustomizations) {
- customizationManager.registerCustomization(metamodelView);
- }
- customizationManager.loadCustomizations();
- //TODO not useful for the moment
-// loadFacetsForCustomizations(registryDefaultCustomizations,customizationManager);
-
- } catch (Throwable e) {
- Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Error initializing customizations", e)); //$NON-NLS-1$
- }
- }
-}
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/PapyrusContentMergeViewerCreator.java b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/PapyrusContentMergeViewerCreator.java
deleted file mode 100644
index 226a4207d6e..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/PapyrusContentMergeViewerCreator.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.papyrus.uml.compare.ui.merge.viewer;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.IViewerCreator;
-import org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-
-
-public class PapyrusContentMergeViewerCreator implements IViewerCreator {
-
- public PapyrusContentMergeViewerCreator() {
- // TODO Auto-generated constructor stub
- }
-
- public Viewer createViewer(Composite parent, CompareConfiguration config) {
- //return new ModelContentMergeViewer(parent,config);
- return new UMLModelContentMergeViewer(parent, config);
- }
-
-
-}
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/UMLModelContentMergeDiffTab.java b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/UMLModelContentMergeDiffTab.java
deleted file mode 100644
index 0e86910da87..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/UMLModelContentMergeDiffTab.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.ui.merge.viewer;
-
-import org.eclipse.emf.compare.ui.viewer.content.part.ModelContentMergeTabFolder;
-import org.eclipse.emf.compare.ui.viewer.content.part.diff.ModelContentMergeDiffTab;
-import org.eclipse.swt.widgets.Composite;
-
-
-/**
- * The Structure Tab in the Merge Viewer.
- */
-//duplicate code from tatiana
-//TODO : verify the super class
-public class UMLModelContentMergeDiffTab extends ModelContentMergeDiffTab {
-
-
- /**
- * Instantiates a new uML model content merge diff tab.
- *
- * @param parentComposite
- * the parent composite
- * @param side
- * the side
- * @param parentFolder
- * the parent folder
- */
- public UMLModelContentMergeDiffTab(Composite parentComposite, int side, ModelContentMergeTabFolder parentFolder) {
- super(parentComposite, side, parentFolder);
- }
-
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.emf.compare.ui.viewer.content.part.diff.ModelContentMergeDiffTab#setSelectionToWidget(java.util.List, boolean)
-// */
-// @Override
-// protected void setSelectionToWidget(List l, boolean reveal) {
-// // tfesenko filter stereotype applications
-// List result = new ArrayList();
-// for(Object next : l) {
-// if(next instanceof EObject && UMLCompareUtils.isStereotypeApplication((EObject)next)) {
-// EObject stereotypeApplication = (EObject)next;
-// result.add(UMLUtil.getBaseElement(stereotypeApplication));
-// } else {
-// result.add(next);
-// }
-// }
-// super.setSelectionToWidget(result, reveal);
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.emf.compare.ui.viewer.content.part.diff.ModelContentMergeDiffTab#setReflectiveInput(java.lang.Object)
-// */
-// @Override
-// public void setReflectiveInput(Object object) {
-// // tfesenko 336361 - [UML Compare] Compare two elements: show right element as root
-// if(object instanceof EObject) {
-// clearCaches();
-// // tfesenko default implementation sets object.eResource here
-// setInput(object);
-// setupCaches();
-// needsRedraw = true;
-// }
-// super.setReflectiveInput(object);
-// }
-
-
-}
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/UMLModelContentMergeTabFolder.java b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/UMLModelContentMergeTabFolder.java
deleted file mode 100644
index 81248c673a5..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/UMLModelContentMergeTabFolder.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- * Vincent Lorenzo (CEA LIST) - 349650: [Papyrus Merge] IndexOfBoundException
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.ui.merge.viewer;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot;
-import org.eclipse.emf.compare.ui.TypedElementWrapper;
-import org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeViewer;
-import org.eclipse.emf.compare.ui.viewer.content.part.IModelContentMergeViewerTab;
-import org.eclipse.emf.compare.ui.viewer.content.part.ModelContentMergeTabFolder;
-import org.eclipse.emf.compare.util.AdapterUtils;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.papyrus.uml.compare.ui.provider.PapyrusLabelProvider;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * The Class UMLModelContentMergeTabFolder.
- */
-//duplicate code from tatiana
-//TODO verify the super class
-public class UMLModelContentMergeTabFolder extends ModelContentMergeTabFolder {
-
- /** The my uml viewer. */
- protected final UMLModelContentMergeViewer myUMLViewer;
-
- /**
- * Instantiates a new uML model content merge tab folder.
- *
- * @param viewer the viewer
- * @param composite the composite
- * @param side the side
- */
- public UMLModelContentMergeTabFolder(ModelContentMergeViewer viewer, Composite composite, int side) {
- super(viewer, composite, side);
- myUMLViewer = (UMLModelContentMergeViewer)viewer;
- }
-
-
- @Override
- protected IModelContentMergeViewerTab createModelContentMergeDiffTab(Composite parent) {
-// IModelContentMergeViewerTab tab = super.createModelContentMergeDiffTab(parent);
- UMLModelContentMergeDiffTab diffTab = new UMLModelContentMergeDiffTab(parent, partSide, this);
- diffTab.setContentProvider(createDiffTabContentProvider());
- diffTab.setLabelProvider(new PapyrusLabelProvider());
- return diffTab;
-
- }
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.emf.compare.ui.viewer.content.part.ModelContentMergeTabFolder#createModelContentMergeViewerTab(org.eclipse.swt.widgets.Composite)
-// */
-// @Override
-// protected IModelContentMergeViewerTab createModelContentMergeViewerTab(Composite parent) {
-// ModelContentMergePropertyTab propertyTab = new ModelContentMergePropertyTab(parent, partSide, this);
-// propertyTab.setContentProvider(new UMLPropertyContentProvider());
-// return propertyTab;
-// }
-//
-// /**
-// * Creates the diff tab content provider.
-// *
-// * @return the i content provider
-// */
-// protected IContentProvider createDiffTabContentProvider() {
-// ComposedAdapterFactory adapterFactory = new UMLAdapterFactory();
-// AdapterFactoryContentProvider result = new AdapterFactoryContentProvider(adapterFactory) {
-//
-// @Override
-// public Object[] getElements(Object object) {
-// if(object instanceof RootObject) {
-// return new Object[]{ ((RootObject)object).object };
-// }
-// return super.getElements(object);
-// }
-// };
-//
-// return result;
-// }
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.emf.compare.ui.viewer.content.part.ModelContentMergeTabFolder#findMatchFromElement(org.eclipse.emf.ecore.EObject)
-// */
-// protected EObject findMatchFromElement(EObject element) {
-// EObject matchElement = super.findMatchFromElement(element);
-// if(!myUMLViewer.isShowAllProperties() && matchElement instanceof Match2Elements) {
-// if(myUMLViewer.getCurrentSelection().size()!=0){//see bug 349650
-// return new Match2ElementsWithDiff((Match2Elements)matchElement, myUMLViewer.getCurrentSelection().get(0));
-// }
-// }
-// return matchElement;
-// }
-//
-// /**
-// * Gets the selected tab.
-// *
-// * @return the selected tab
-// */
-// public int getSelectedTab() {
-// return tabFolder.getSelectionIndex();
-// }
-//
-// /**
-// * Checks if is property tab.
-// *
-// * @param index the index
-// * @return true, if is property tab
-// */
-// public boolean isPropertyTab(int index) {
-// final IModelContentMergeViewerTab currentTab = tabs.get(index);
-// return (currentTab == getPropertyPart());
-// }
-
-//TODO : use the content provider from the new EMF-Compare
- protected IContentProvider createDiffTabContentProvider() {
-// private ModelContentMergeDiffTabContentProvider createContentProvider() {
-
- return new ModelContentMergeDiffTabContentProvider(AdapterUtils.getAdapterFactory());
-// }
-
- // ComposedAdapterFactory adapterFactory = new UMLAdapterFactory();
-// ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory();
-// AdapterFactoryContentProvider result = new AdapterFactoryContentProvider(adapterFactory) {
-//
-// @Override
-// public Object[] getElements(Object object) {
-//// if(object instanceof RootObject) {
-//// return new Object[]{ ((RootObject)object).object };
-//// }
-// return super.getElements(object);
-// }
-// }
-
-// return result;
- }
-
-
- /**
- * This implementation of an {@link AdapterFactoryContentProvider} will strip ComparisonSnapshots out of
- * the view.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
- //duplicate code from EMF-Compare :ModelContentMergeDiffTab.ModelContentMergeDiffTabContentProvider
- public class ModelContentMergeDiffTabContentProvider extends AdapterFactoryContentProvider {
- /**
- * Default constructor. Delegates to the super implementation.
- *
- * @param factory
- * Factory to get labels and icons from.
- */
- public ModelContentMergeDiffTabContentProvider(AdapterFactory factory) {
- super(factory);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider#getElements(java.lang.Object)
- */
- @SuppressWarnings("unchecked")
- @Override
- public Object[] getElements(Object object) {
- // overwritten to ensure contents of ResourceSets, List<Resource>, and Resource are correclty
- // returned.
- Object[] result = null;
- if (object instanceof ResourceSet) {
- final List<Resource> resources = ((ResourceSet)object).getResources();
- final List<Resource> elements = new ArrayList<Resource>(resources.size());
- for (final Resource resource : resources) {
- if (resource.getContents().isEmpty()
- || !(resource.getContents().get(0) instanceof ComparisonSnapshot)) {
- elements.add(resource);
- }
- }
- result = elements.toArray();
- } else if (object instanceof TypedElementWrapper) {
- result = new Object[] {((EObject)object).eResource(), };
- } else if (object instanceof List) {
- // we may also display a list of resources
- result = ((List)object).toArray();
- } else if (object instanceof Resource) {
- // return contents of resource
- result = ((Resource)object).getContents().toArray();
- } else {
- result = super.getElements(object);
- }
- return result;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Object[] getChildren(Object object) {
- if (object instanceof Resource) {
- return ((Resource)object).getContents().toArray();
- }
- return super.getChildren(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(Object object) {
- if (object instanceof Resource) {
- return ((Resource)object).getContents().size() > 0;
- }
- return super.hasChildren(object);
- }
- }
-}
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/UMLModelContentMergeViewer.java b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/UMLModelContentMergeViewer.java
deleted file mode 100644
index 3d60da9361c..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/merge/viewer/UMLModelContentMergeViewer.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.papyrus.uml.compare.ui.merge.viewer;
-
-import java.util.List;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeViewer;
-import org.eclipse.emf.compare.ui.viewer.content.part.ModelContentMergeTabFolder;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-//TODO set the correct super class
-//duplicate code from tatiana
-public class UMLModelContentMergeViewer extends ModelContentMergeViewer {
-
- //duplicate code from tatiana
- public UMLModelContentMergeViewer(Composite parent, CompareConfiguration config) {
- super(parent, config);
- }
-
- @Override
- protected ModelContentMergeTabFolder createModelContentMergeTabFolder(Composite composite, int side) {
- // TODO Auto-generated method stub
-// return super.createModelContentMergeTabFolder(composite, side);
- return new UMLModelContentMergeTabFolder(this, composite, side);
- }
-
- @Override
- protected void copy(List<DiffElement> diffs, boolean leftToRight) {
- DiffElement diff = diffs.get(0);
- if(diff instanceof ModelElementChangeLeftTarget){
- EObject element = ((ModelElementChangeLeftTarget)diff).getLeftElement();
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(element);
- int d=0;
- d++;
-
- }else if(diff instanceof UpdateReference){
- EObject element = ((UpdateReference)diff).getLeftElement();
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(element);
- int d=0;
- d++;
- }
- super.copy(diffs, leftToRight);
- }
-
-}
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/provider/PapyrusLabelProvider.java b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/provider/PapyrusLabelProvider.java
deleted file mode 100644
index 93c68776aad..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/provider/PapyrusLabelProvider.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.ui.provider;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.facet.infra.browser.custom.MetamodelView;
-import org.eclipse.emf.facet.infra.browser.custom.core.CustomizationsCatalog;
-import org.eclipse.emf.facet.infra.browser.uicore.CustomizableModelLabelProvider;
-import org.eclipse.emf.facet.infra.browser.uicore.CustomizationManager;
-import org.eclipse.emf.facet.infra.browser.uicore.internal.AppearanceConfiguration;
-import org.eclipse.emf.facet.infra.browser.uicore.internal.model.ITreeElement;
-import org.eclipse.emf.facet.infra.browser.uicore.internal.model.ModelElementItem;
-import org.eclipse.papyrus.uml.compare.ui.Activator;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Device;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-
-/**
- * PapyrusLabelProvider provides the same labels and icons as one can find in the Model Explorer.
- */
-// Not placed in the UI plugin because it is used in the subclasses of AbstractDiffExtension, in getText() method
-public class PapyrusLabelProvider extends CustomizableModelLabelProvider {
-
-
- /** The configuration. */
- private AppearanceConfiguration configuration;
-
- /**
- * Constructor.
- *
- * @param customizationManager the customization manager
- */
- public PapyrusLabelProvider(CustomizationManager customizationManager) {
- super(customizationManager);
- configuration = getAppearanceConfiguration(customizationManager);
- }
-
- /**
- * Instantiates a new papyrus label provider.
- */
- public PapyrusLabelProvider() {
- this(initCustomizationManager());
- }
-
- /**
- * Inits the customization manager.
- *
- * @return the customization manager
- */
- private static CustomizationManager initCustomizationManager() {
- CustomizationManager manager = new CustomizationManager();
- try {
- List<MetamodelView> registryDefaultCustomizations = CustomizationsCatalog.getInstance().getRegistryDefaultCustomizations();
- for(MetamodelView metamodelView : registryDefaultCustomizations) {
- manager.registerCustomization(metamodelView);
- }
- manager.loadCustomizations();
-
- } catch (Throwable e) {
- Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Error initializing customizations", e)); //$NON-NLS-1$
- }
- manager.setShowFullQualifiedNames(false);
- manager.setShowURI(true);
- manager.setShowDerivedLinks(false);
- return manager;
- }
-
- /**
- * Gets the appearance configuration.
- *
- * @param customizationManager2 the customization manager2
- * @return the appearance configuration
- */
- private AppearanceConfiguration getAppearanceConfiguration(CustomizationManager customizationManager2) {
- Method getApperanceConfigurationMethod;
- try {
- getApperanceConfigurationMethod = CustomizationManager.class.getDeclaredMethod("getAppearanceConfiguration"); //$NON-NLS-1$
- if(getApperanceConfigurationMethod != null) {
- getApperanceConfigurationMethod.setAccessible(true);
- return (AppearanceConfiguration)getApperanceConfigurationMethod.invoke(customizationManager2);
- }
- } catch (SecurityException e) {
- //TODO
-// Activator.logError(e);
- } catch (NoSuchMethodException e) {
-// Activator.logError(e);
- } catch (IllegalArgumentException e) {
-// Activator.logError(e);
- } catch (IllegalAccessException e) {
-// Activator.logError(e);
- } catch (InvocationTargetException e) {
-// Activator.logError(e);
- }
- return new AppearanceConfiguration(null); // default one.
- }
-
- /**
- * Gets the text.
- *
- * @param element the element
- * @return the text
- * {@inheritDoc}
- */
- @Override
- public String getText(Object element) {
- if(element == null) {
- return ""; //$NON-NLS-1$
- }
- if(element instanceof EObject) {
- ITreeElement treeElement = getTreeElement((EObject)element);
- return super.getText(treeElement);
- }
- return super.getText(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.facet.infra.browser.uicore.CustomizableModelLabelProvider#getImage(java.lang.Object)
- */
- @Override
- public Image getImage(Object element) {
- if(element == null) {
- return null;
- }
- if(element instanceof EObject) {
- ITreeElement treeElement = getTreeElement((EObject)element);
- return super.getImage(treeElement);
- }
- return super.getImage(element);
- }
-
-
- /**
- * Gets the tree element.
- *
- * @param eObject the e object
- * @return the tree element
- */
- private ITreeElement getTreeElement(EObject eObject) {
- if(eObject == null) {
- return null;
- }
- return new ModelElementItem(eObject, getTreeElement(eObject.eContainer()), configuration);
- }
-
- //TODO for test only!
- @Override
- public Color getBackground(Object element) {
- RGB rgb = new RGB(255, 0, 0);
- Device device = Display.getDefault();
- Color color = new Color(device , rgb);
- // TODO Auto-generated method stub
- return color;
- }
-}
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/structure/viewer/UMLStructureMergeViewerCreator.java b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/structure/viewer/UMLStructureMergeViewerCreator.java
deleted file mode 100644
index 5034a838024..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/structure/viewer/UMLStructureMergeViewerCreator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.eclipse.papyrus.uml.compare.ui.structure.viewer;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.IViewerCreator;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.content.IContentDescriber;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMergeViewer;
-import org.eclipse.emf.compare.ui.viewer.structure.ParameterizedStructureMergeViewer;
-import org.eclipse.emf.facet.infra.browser.uicore.CustomizableModelLabelProvider;
-import org.eclipse.emf.facet.infra.browser.uicore.CustomizationManager;
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Device;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-
-/**
- *
- * This class creates the Structure Merge Viewer for Papyrus
- *
- */
-public class UMLStructureMergeViewerCreator implements IViewerCreator{
-
- public UMLStructureMergeViewerCreator() {
- //nothing to do
- }
-
- public Viewer createViewer(Composite parent, CompareConfiguration config) {
- return new ParameterizedStructureMergeViewer(parent,config);
- }
-}
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalContentMergeViewerCreator.java b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalContentMergeViewerCreator.java
deleted file mode 100644
index c3254147292..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalContentMergeViewerCreator.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.papyrus.uml.compare.ui.transactional.merge.viewer;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.IViewerCreator;
-import org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-
-
-public class TransactionalContentMergeViewerCreator implements IViewerCreator {
-
- public TransactionalContentMergeViewerCreator() {
- // TODO Auto-generated constructor stub
- }
-
- public Viewer createViewer(Composite parent, CompareConfiguration config) {
- //return new ModelContentMergeViewer(parent,config);
- return new TransactionalModelContentMergeViewer(parent, config);
- }
-
-
-}
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalModelContentMergeDiffTab.java b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalModelContentMergeDiffTab.java
deleted file mode 100644
index 62a5aaa8e0e..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalModelContentMergeDiffTab.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.ui.transactional.merge.viewer;
-
-import org.eclipse.emf.compare.ui.viewer.content.part.ModelContentMergeTabFolder;
-import org.eclipse.emf.compare.ui.viewer.content.part.diff.ModelContentMergeDiffTab;
-import org.eclipse.swt.widgets.Composite;
-
-
-/**
- * The Structure Tab in the Merge Viewer.
- */
-//duplicate code from tatiana
-//TODO : verify the super class
-public class TransactionalModelContentMergeDiffTab extends ModelContentMergeDiffTab {
-
-
- /**
- * Instantiates a new uML model content merge diff tab.
- *
- * @param parentComposite
- * the parent composite
- * @param side
- * the side
- * @param parentFolder
- * the parent folder
- */
- public TransactionalModelContentMergeDiffTab(Composite parentComposite, int side, ModelContentMergeTabFolder parentFolder) {
- super(parentComposite, side, parentFolder);
- }
-
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.emf.compare.ui.viewer.content.part.diff.ModelContentMergeDiffTab#setSelectionToWidget(java.util.List, boolean)
-// */
-// @Override
-// protected void setSelectionToWidget(List l, boolean reveal) {
-// // tfesenko filter stereotype applications
-// List result = new ArrayList();
-// for(Object next : l) {
-// if(next instanceof EObject && UMLCompareUtils.isStereotypeApplication((EObject)next)) {
-// EObject stereotypeApplication = (EObject)next;
-// result.add(UMLUtil.getBaseElement(stereotypeApplication));
-// } else {
-// result.add(next);
-// }
-// }
-// super.setSelectionToWidget(result, reveal);
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.emf.compare.ui.viewer.content.part.diff.ModelContentMergeDiffTab#setReflectiveInput(java.lang.Object)
-// */
-// @Override
-// public void setReflectiveInput(Object object) {
-// // tfesenko 336361 - [UML Compare] Compare two elements: show right element as root
-// if(object instanceof EObject) {
-// clearCaches();
-// // tfesenko default implementation sets object.eResource here
-// setInput(object);
-// setupCaches();
-// needsRedraw = true;
-// }
-// super.setReflectiveInput(object);
-// }
-
-
-}
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalModelContentMergeTabFolder.java b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalModelContentMergeTabFolder.java
deleted file mode 100644
index e3bb0fc97e2..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalModelContentMergeTabFolder.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- * Vincent Lorenzo (CEA LIST) - 349650: [Papyrus Merge] IndexOfBoundException
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.ui.transactional.merge.viewer;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot;
-import org.eclipse.emf.compare.ui.TypedElementWrapper;
-import org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeViewer;
-import org.eclipse.emf.compare.ui.viewer.content.part.IModelContentMergeViewerTab;
-import org.eclipse.emf.compare.ui.viewer.content.part.ModelContentMergeTabFolder;
-import org.eclipse.emf.compare.util.AdapterUtils;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.papyrus.uml.compare.ui.provider.PapyrusLabelProvider;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * The Class UMLModelContentMergeTabFolder.
- */
-//duplicate code from tatiana
-//TODO verify the super class
-public class TransactionalModelContentMergeTabFolder extends ModelContentMergeTabFolder {
-
- /** The my uml viewer. */
- protected final TransactionalModelContentMergeViewer myUMLViewer;
-
- /**
- * Instantiates a new uML model content merge tab folder.
- *
- * @param viewer the viewer
- * @param composite the composite
- * @param side the side
- */
- public TransactionalModelContentMergeTabFolder(ModelContentMergeViewer viewer, Composite composite, int side) {
- super(viewer, composite, side);
- myUMLViewer = (TransactionalModelContentMergeViewer)viewer;
- }
-
-
- @Override
- protected IModelContentMergeViewerTab createModelContentMergeDiffTab(Composite parent) {
-// IModelContentMergeViewerTab tab = super.createModelContentMergeDiffTab(parent);
- TransactionalModelContentMergeDiffTab diffTab = new TransactionalModelContentMergeDiffTab(parent, partSide, this);
- diffTab.setContentProvider(createDiffTabContentProvider());
- diffTab.setLabelProvider(new PapyrusLabelProvider());
- return diffTab;
-
- }
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.emf.compare.ui.viewer.content.part.ModelContentMergeTabFolder#createModelContentMergeViewerTab(org.eclipse.swt.widgets.Composite)
-// */
-// @Override
-// protected IModelContentMergeViewerTab createModelContentMergeViewerTab(Composite parent) {
-// ModelContentMergePropertyTab propertyTab = new ModelContentMergePropertyTab(parent, partSide, this);
-// propertyTab.setContentProvider(new UMLPropertyContentProvider());
-// return propertyTab;
-// }
-//
-// /**
-// * Creates the diff tab content provider.
-// *
-// * @return the i content provider
-// */
-// protected IContentProvider createDiffTabContentProvider() {
-// ComposedAdapterFactory adapterFactory = new UMLAdapterFactory();
-// AdapterFactoryContentProvider result = new AdapterFactoryContentProvider(adapterFactory) {
-//
-// @Override
-// public Object[] getElements(Object object) {
-// if(object instanceof RootObject) {
-// return new Object[]{ ((RootObject)object).object };
-// }
-// return super.getElements(object);
-// }
-// };
-//
-// return result;
-// }
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.emf.compare.ui.viewer.content.part.ModelContentMergeTabFolder#findMatchFromElement(org.eclipse.emf.ecore.EObject)
-// */
-// protected EObject findMatchFromElement(EObject element) {
-// EObject matchElement = super.findMatchFromElement(element);
-// if(!myUMLViewer.isShowAllProperties() && matchElement instanceof Match2Elements) {
-// if(myUMLViewer.getCurrentSelection().size()!=0){//see bug 349650
-// return new Match2ElementsWithDiff((Match2Elements)matchElement, myUMLViewer.getCurrentSelection().get(0));
-// }
-// }
-// return matchElement;
-// }
-//
-// /**
-// * Gets the selected tab.
-// *
-// * @return the selected tab
-// */
-// public int getSelectedTab() {
-// return tabFolder.getSelectionIndex();
-// }
-//
-// /**
-// * Checks if is property tab.
-// *
-// * @param index the index
-// * @return true, if is property tab
-// */
-// public boolean isPropertyTab(int index) {
-// final IModelContentMergeViewerTab currentTab = tabs.get(index);
-// return (currentTab == getPropertyPart());
-// }
-
-//TODO : use the content provider from the new EMF-Compare
- protected IContentProvider createDiffTabContentProvider() {
-// private ModelContentMergeDiffTabContentProvider createContentProvider() {
-
- return new ModelContentMergeDiffTabContentProvider(AdapterUtils.getAdapterFactory());
-// }
-
- // ComposedAdapterFactory adapterFactory = new UMLAdapterFactory();
-// ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory();
-// AdapterFactoryContentProvider result = new AdapterFactoryContentProvider(adapterFactory) {
-//
-// @Override
-// public Object[] getElements(Object object) {
-//// if(object instanceof RootObject) {
-//// return new Object[]{ ((RootObject)object).object };
-//// }
-// return super.getElements(object);
-// }
-// }
-
-// return result;
- }
-
-
- /**
- * This implementation of an {@link AdapterFactoryContentProvider} will strip ComparisonSnapshots out of
- * the view.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
- //duplicate code from EMF-Compare :ModelContentMergeDiffTab.ModelContentMergeDiffTabContentProvider
- public class ModelContentMergeDiffTabContentProvider extends AdapterFactoryContentProvider {
- /**
- * Default constructor. Delegates to the super implementation.
- *
- * @param factory
- * Factory to get labels and icons from.
- */
- public ModelContentMergeDiffTabContentProvider(AdapterFactory factory) {
- super(factory);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider#getElements(java.lang.Object)
- */
- @SuppressWarnings("unchecked")
- @Override
- public Object[] getElements(Object object) {
- // overwritten to ensure contents of ResourceSets, List<Resource>, and Resource are correclty
- // returned.
- Object[] result = null;
- if (object instanceof ResourceSet) {
- final List<Resource> resources = ((ResourceSet)object).getResources();
- final List<Resource> elements = new ArrayList<Resource>(resources.size());
- for (final Resource resource : resources) {
- if (resource.getContents().isEmpty()
- || !(resource.getContents().get(0) instanceof ComparisonSnapshot)) {
- elements.add(resource);
- }
- }
- result = elements.toArray();
- } else if (object instanceof TypedElementWrapper) {
- result = new Object[] {((EObject)object).eResource(), };
- } else if (object instanceof List) {
- // we may also display a list of resources
- result = ((List)object).toArray();
- } else if (object instanceof Resource) {
- // return contents of resource
- result = ((Resource)object).getContents().toArray();
- } else {
- result = super.getElements(object);
- }
- return result;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Object[] getChildren(Object object) {
- if (object instanceof Resource) {
- return ((Resource)object).getContents().toArray();
- }
- return super.getChildren(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(Object object) {
- if (object instanceof Resource) {
- return ((Resource)object).getContents().size() > 0;
- }
- return super.hasChildren(object);
- }
- }
-}
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalModelContentMergeViewer.java b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalModelContentMergeViewer.java
deleted file mode 100644
index d67857f41cc..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/org/eclipse/papyrus/uml/compare/ui/transactional/merge/viewer/TransactionalModelContentMergeViewer.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package org.eclipse.papyrus.uml.compare.ui.transactional.merge.viewer;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeViewer;
-import org.eclipse.emf.compare.ui.viewer.content.part.ModelContentMergeTabFolder;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.AbstractEMFOperation;
-import org.eclipse.emf.workspace.EMFOperationCommand;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.papyrus.uml.compare.ui.Activator;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-
-public class TransactionalModelContentMergeViewer extends ModelContentMergeViewer {
-
- private TransactionalEditingDomain domain;
-
-
- private boolean isSynchronizedWithDiagram;
-
- //duplicate code from tatiana
- public TransactionalModelContentMergeViewer(Composite parent, CompareConfiguration config) {
- super(parent, config);
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if(editor instanceof IEditingDomainProvider) {
- domain = (TransactionalEditingDomain)((IEditingDomainProvider)editor).getEditingDomain();
- }
- }
-
- @Override
- protected ModelContentMergeTabFolder createModelContentMergeTabFolder(Composite composite, int side) {
- // TODO Auto-generated method stub
- // return super.createModelContentMergeTabFolder(composite, side);
- return new TransactionalModelContentMergeTabFolder(this, composite, side);
- }
-
- /**
- * Undoes the changes implied by the currently selected {@link DiffElement diff}.
- */
- protected void copyDiffLeftToRight() {
- if(currentSelection != null) {
- doCopy(currentSelection, true);
- }
- currentSelection.clear();
- switchCopyState(false);
- }
-
- /**
- * Applies the changes implied by the currently selected {@link DiffElement diff}.
- */
- protected void copyDiffRightToLeft() {
- if(currentSelection != null) {
- doCopy(currentSelection, false);
- }
- currentSelection.clear();
- switchCopyState(false);
- }
-
-
- protected void doCopy(final List<DiffElement> diffs, final boolean leftToRight) {
- Map<?, ?> transactionOptions = Collections.EMPTY_MAP;
- final Runnable runnable = new Runnable() {
-
- public void run() {
- // TODO Auto-generated method stub
- TransactionalModelContentMergeViewer.this.copy(diffs, leftToRight);
- }
- };
-
- // AbstractCommand cmd = new ChangeC(){
- //
- // public void execute() {
- // // TODO Auto-generated method stub
- //
- // }
- //
- // public void redo() {
- // // TODO Auto-generated method stub
- //
- // }
- //
- // }
- IUndoableOperation operation = new AbstractEMFOperation(domain, "copy action", transactionOptions) {
-
- @Override
- protected IStatus doExecute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // try {
- runnable.run();
- return Status.OK_STATUS;
- // } catch (RuntimeException ex) {
- // if (ex instanceof OperationCanceledException) {
- // throw (OperationCanceledException) ex;
- // } else {
- //// throw new ExecutionException(NLS.bind(Messages.problem_transactionFailed, operationLabel), ex);
- // }
- // }
- //
- }
-
- // @Override
- // public boolean canUndo() {
- //// return transactionOptions.get(Transaction.OPTION_NO_UNDO) != Boolean.TRUE;
- // }
-
-
- };
-
- Command command = new EMFOperationCommand(domain, operation);
- // domain.getCommandStack().
- domain.getCommandStack().execute(command);
-
- }
-
-
- @Override
- protected void createToolItems(ToolBarManager tbm) {
-
- final IAction diagramSynchronization = new Action("Diagram Synchronisation", IAction.AS_CHECK_BOX) {
-
- @Override
- public ImageDescriptor getImageDescriptor() {
- //TODO improve?
- return Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/PapyrusLogo16x16.gif");
- }
- };
-
-
- ActionContributionItem actionContributionItem = new ActionContributionItem(diagramSynchronization) {
- @Override
- public void fill(ToolBar parent, int index) {
- // TODO Auto-generated method stub
- super.fill(parent, index);
- }
- };
- //actionContributionItem.setMode(ActionContributionItem.MODE_FORCE_TEXT);
- diagramSynchronization.addPropertyChangeListener(new IPropertyChangeListener() {
-
- public void propertyChange(PropertyChangeEvent event) {
- //we are here each time the user click on the action!
- diagramSynchronization.setChecked(diagramSynchronization.isChecked());
- isSynchronizedWithDiagram = diagramSynchronization.isChecked();
- }
- });
- tbm.insert(0, actionContributionItem);
- super.createToolItems(tbm);
- }
-
-}
diff --git a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/testSWT/MyViewer.java b/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/testSWT/MyViewer.java
deleted file mode 100644
index 85aefa657a9..00000000000
--- a/sandbox/PapyrusEMFCompareV1/deprecated/org.eclipse.papyrus.uml.compare.ui/src/testSWT/MyViewer.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package testSWT;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.widgets.ToolItem;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.CoolBar;
-import org.eclipse.jface.layout.TableColumnLayout;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.CoolItem;
-import org.eclipse.swt.widgets.Text;
-
-
-public class MyViewer extends Composite {
- private Text text;
-
- /**
- * Create the composite.
- * @param parent
- * @param style
- */
- public MyViewer(Composite parent, int style) {
- super(parent, style);
- setLayout(new FormLayout());
-
- CoolBar coolBar = new CoolBar(this, SWT.FLAT);
- FormData fd_coolBar = new FormData();
- fd_coolBar.bottom = new FormAttachment(0, 173);
- fd_coolBar.right = new FormAttachment(0, 120);
- fd_coolBar.top = new FormAttachment(0, 143);
- fd_coolBar.left = new FormAttachment(0, 10);
- coolBar.setLayoutData(fd_coolBar);
-
- CoolItem coolItem = new CoolItem(coolBar, SWT.NONE);
-
- Button button = new Button(this, SWT.CHECK);
- FormData fd_button = new FormData();
- fd_button.top = new FormAttachment(0, 154);
- fd_button.left = new FormAttachment(0, 22);
- button.setLayoutData(fd_button);
- button.setText("Check Button");
-
- Button btnCheckButton_1 = new Button(this, SWT.CHECK);
- FormData fd_btnCheckButton_1 = new FormData();
- fd_btnCheckButton_1.top = new FormAttachment(0, 10);
- fd_btnCheckButton_1.left = new FormAttachment(button, 0, SWT.LEFT);
- btnCheckButton_1.setLayoutData(fd_btnCheckButton_1);
- btnCheckButton_1.setText("Check Button");
-
- Button btnNewButton = new Button(this, SWT.CHECK);
- FormData fd_btnNewButton = new FormData();
- fd_btnNewButton.top = new FormAttachment(btnCheckButton_1, 27);
- fd_btnNewButton.left = new FormAttachment(button, 0, SWT.LEFT);
- btnNewButton.setLayoutData(fd_btnNewButton);
- btnNewButton.setText("New Button");
-
- ToolBar toolBar = new ToolBar(this, SWT.FLAT | SWT.RIGHT);
- FormData fd_toolBar = new FormData();
- fd_toolBar.bottom = new FormAttachment(coolBar, -6);
- fd_toolBar.right = new FormAttachment(button, 0, SWT.RIGHT);
- toolBar.setLayoutData(fd_toolBar);
-
- ToolItem tltmNewItem = new ToolItem(toolBar, SWT.NONE);
- tltmNewItem.setText("New Item");
-
- Button btnNewButton_1 = new Button(this, SWT.NONE);
- btnNewButton_1.setLayoutData(new FormData());
- btnNewButton_1.setText("New Button");
-
- Button btnNewButton_2 = new Button(this, SWT.NONE);
- btnNewButton_2.setLayoutData(new FormData());
- btnNewButton_2.setText("New Button");
-
- text = new Text(this, SWT.BORDER);
- text.setLayoutData(new FormData());
-
- }
-
- @Override
- protected void checkSubclass() {
- // Disable the check that prevents subclassing of SWT components
- }
-}

Back to the top