Merge "PapyrusTreeContentMergeViewer.updateContent should refresh"
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/facet/PapyrusFacetContentProviderWrapper.java b/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/facet/PapyrusFacetContentProviderWrapper.java
index ad00ab2..da4027e 100644
--- a/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/facet/PapyrusFacetContentProviderWrapper.java
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/facet/PapyrusFacetContentProviderWrapper.java
@@ -11,6 +11,9 @@
  *******************************************************************************/
 package org.eclipse.papyrus.compare.diagram.ide.ui.contentmergeviewer.facet;
 
+import static com.google.common.base.Predicates.instanceOf;
+import static com.google.common.base.Predicates.not;
+import static com.google.common.collect.Collections2.filter;
 import static org.eclipse.papyrus.compare.diagram.ide.ui.contentmergeviewer.facet.FacetUtil.UN_WRAP;
 
 import com.google.common.collect.ImmutableSet;
@@ -29,6 +32,7 @@
 import org.eclipse.emf.ecore.resource.ResourceSet;
 import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
 import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.gmf.runtime.notation.Diagram;
 import org.eclipse.papyrus.uml.tools.providers.SemanticUMLContentProvider;
 import org.eclipse.uml2.uml.Element;
 import org.eclipse.uml2.uml.Profile;
@@ -133,7 +137,9 @@
 	@Override
 	public Collection<?> getChildren(Object object) {
 		// we need to remove duplicates since the facet mechanism sometimes introduces them
-		return removeDuplicates(unwrapFacet(facetContentProvider.getChildren(object)));
+		// additionally we also need to remove diagram elements
+		return filter(removeDuplicates(unwrapFacet(facetContentProvider.getChildren(object))),
+				not(instanceOf(Diagram.class)));
 	}
 
 	@Override
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/facet/PapyrusFacetContentProviderWrapperAdapterFactory.java b/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/facet/PapyrusFacetContentProviderWrapperAdapterFactory.java
index a6df734..aa1e8c5 100644
--- a/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/facet/PapyrusFacetContentProviderWrapperAdapterFactory.java
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/facet/PapyrusFacetContentProviderWrapperAdapterFactory.java
@@ -8,6 +8,7 @@
  * Contributors:
  *     Stefan Dirix - initial API and implementation
  *     Martin Fleck - bug 518957
+ *     Philip Langer - Fix NPE
  *******************************************************************************/
 package org.eclipse.papyrus.compare.diagram.ide.ui.contentmergeviewer.facet;
 
@@ -17,6 +18,7 @@
 import org.eclipse.emf.common.notify.Adapter;
 import org.eclipse.emf.common.notify.Notifier;
 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.provider.Disposable;
 import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
@@ -75,9 +77,12 @@
 	 * @return The {@link ResourceSet} for the given {@code target} if there is one, {@code null} otherwise.
 	 */
 	private ResourceSet getResourceSet(Notifier target) {
-		if (EObject.class.isInstance(target)) {
-			EObject object = EObject.class.cast(target);
-			return object.eResource().getResourceSet();
+		if (target instanceof EObject) {
+			EObject object = (EObject)target;
+			Resource resource = object.eResource();
+			if (resource != null) {
+				return resource.getResourceSet();
+			}
 		}
 		return null;
 	}
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/provider/PapyrusContextTester.java b/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/provider/PapyrusContextTester.java
index a10b688..4268fc2 100644
--- a/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/provider/PapyrusContextTester.java
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/provider/PapyrusContextTester.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2016 EclipseSource Muenchen GmbH and others.
+ * Copyright (c) 2016, 2017 EclipseSource Muenchen GmbH and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,11 +10,13 @@
  *******************************************************************************/
 package org.eclipse.papyrus.compare.diagram.ide.ui.contentmergeviewer.provider;
 
+import static org.eclipse.papyrus.compare.diagram.ide.ui.internal.context.PapyrusContextUtil.isPapyrusContext;
+
 import java.util.Map;
+import java.util.WeakHashMap;
 
 import org.eclipse.emf.compare.Comparison;
 import org.eclipse.emf.compare.adapterfactory.context.AbstractContextTester;
-import org.eclipse.papyrus.compare.diagram.ide.ui.internal.context.PapyrusContextUtil;
 
 /**
  * Indicates whether we are in a Papyrus context.
@@ -24,12 +26,22 @@
 public class PapyrusContextTester extends AbstractContextTester {
 
 	/**
+	 * A weak cache of comparisons that have been already been tested.
+	 */
+	private final Map<Comparison, Boolean> cache = new WeakHashMap<>();
+
+	/**
 	 * {@inheritDoc}
 	 */
 	public boolean apply(Map<Object, Object> context) {
 		Comparison comparison = getComparison(context);
-		if (context != null) {
-			return PapyrusContextUtil.isPapyrusContext(comparison);
+		if (comparison != null) {
+			Boolean result = cache.get(comparison);
+			if (result == null) {
+				result = Boolean.valueOf(isPapyrusContext(comparison));
+				cache.put(comparison, result);
+			}
+			return result.booleanValue();
 		}
 		return false;
 	}
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/provider/PapyrusMergeViewerItemContentProvider.java b/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/provider/PapyrusMergeViewerItemContentProvider.java
index 5259cfa..b9c6c01 100644
--- a/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/provider/PapyrusMergeViewerItemContentProvider.java
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/contentmergeviewer/provider/PapyrusMergeViewerItemContentProvider.java
@@ -82,9 +82,11 @@
 
 		// Try to get the parent but do not return a parent which could be filtered away
 		Object sideValue = getBestSideValue(mergeViewerItem, configuration.getSide());
-		Object parent = getUnfilteredParent(sideValue, configuration);
-		if (parent != null) {
-			return parent;
+		if (sideValue != null) {
+			Object parent = getUnfilteredParent(sideValue, configuration);
+			if (parent != null) {
+				return parent;
+			}
 		}
 
 		// fallback
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/internal/context/PapyrusContextUtil.java b/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/internal/context/PapyrusContextUtil.java
index ffee9ad..75ba760 100644
--- a/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/internal/context/PapyrusContextUtil.java
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram.ide.ui/src/org/eclipse/papyrus/compare/diagram/ide/ui/internal/context/PapyrusContextUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2016 EclipseSource Muenchen GmbH and others.
+ * Copyright (c) 2016, 2017 EclipseSource Muenchen GmbH and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,11 +36,14 @@
  */
 public final class PapyrusContextUtil {
 
+	/** The value ".di". */
+	private static final String DI_FILE_EXTENSION = "." + DiModel.DI_FILE_EXTENSION; //$NON-NLS-1$
+
 	/** Predicate specifying whether the given URI string ends with the Papyrus DI file extension. */
 	private static final Predicate<String> ENDS_WITH_PAPYRUS_EXTENSION = new Predicate<String>() {
 		public boolean apply(String input) {
 			if (input != null) {
-				return input.endsWith(DiModel.DI_FILE_EXTENSION);
+				return input.endsWith(DI_FILE_EXTENSION);
 			}
 			return false;
 		}
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram/src/org/eclipse/papyrus/compare/diagram/internal/PapyrusDiagramPostComparison.java b/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram/src/org/eclipse/papyrus/compare/diagram/internal/PapyrusDiagramPostComparison.java
index 0e92250..d54db11 100644
--- a/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram/src/org/eclipse/papyrus/compare/diagram/internal/PapyrusDiagramPostComparison.java
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.diagram/src/org/eclipse/papyrus/compare/diagram/internal/PapyrusDiagramPostComparison.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2015 Obeo.
+ * Copyright (c) 2015, 2017 Obeo and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,14 +7,19 @@
  * 
  * Contributors:
  *     Obeo - initial API and implementation
+ *     Philip Langer - performance improvements
  *******************************************************************************/
 package org.eclipse.papyrus.compare.diagram.internal;
 
+import com.google.common.collect.LinkedHashMultimap;
+
+import java.util.List;
 import java.util.Set;
 
 import org.eclipse.emf.common.notify.Adapter;
 import org.eclipse.emf.compare.Comparison;
 import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.DifferenceSource;
 import org.eclipse.emf.compare.merge.ResourceChangeAdapter;
 import org.eclipse.emf.compare.merge.ResourceChangeAdapter.IResourceChangeParticipant;
 import org.eclipse.emf.ecore.util.EcoreUtil;
@@ -90,12 +95,32 @@
 		for (Object key : indexer.getEquivalentDiffsKeySet()) {
 			Set<Diff> diffs = indexer.getEquivalentDiffs(key);
 			if (diffs.size() > 1) {
-				for (Diff diff : diffs) {
-					for (Diff other : diffs) {
-						if (other != diff && other.getSource() == diff.getSource()) {
-							diff.getRequires().add(other);
+				// Keep a map of equivalent diffs based on having the same source.
+				LinkedHashMultimap<DifferenceSource, Diff> sourceDiffs = LinkedHashMultimap.create();
+				try {
+					for (Diff diff : diffs) {
+						sourceDiffs.put(diff.getSource(), diff);
+						// Turn off notification delivery because we can end up populating very large
+						// relations; processing all those notifications is unnecessary at this point in time,
+						// because the reference involved is bi-directional, cross referencers don't need to
+						// monitor it.
+						diff.eSetDeliver(false);
+					}
+
+					for (DifferenceSource differenceSource : sourceDiffs.keySet()) {
+						Set<Diff> equivalentDiffs = sourceDiffs.get(differenceSource);
+						for (Diff diff : equivalentDiffs) {
+							List<Diff> requires = diff.getRequires();
+							requires.addAll(equivalentDiffs);
+							// Remove the circular requirement.
+							requires.remove(diff);
 						}
 					}
+				} finally {
+					for (Diff diff : diffs) {
+						// Turn notification delivery back on after updating the requires references.
+						diff.eSetDeliver(true);
+					}
 				}
 			}
 		}
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.classpath b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.classpath
new file mode 100644
index 0000000..098194c
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.classpath
@@ -0,0 +1,7 @@
+<?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/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.project b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.project
new file mode 100644
index 0000000..d587cd5
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.papyrus.compare.egit.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.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.core.resources.prefs b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.core.runtime.prefs b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..5a0ad22
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..79ea86f
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,389 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullisdefault=disabled
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeFieldsInNullAnalysis=disabled
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=disabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecInsufficientInfo=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=110
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=8
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=110
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..5766025
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,66 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_EMF Compare
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=fr;com;java;javax;org;
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=false
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_type_arguments=false
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.m2e.core.prefs b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.pde.api.tools.prefs b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..01461e0
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,97 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Warning
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Warning
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Warning
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Warning
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Warning
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Warning
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Warning
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Warning
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Warning
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Warning
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Warning
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Warning
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Warning
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Warning
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Warning
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Warning
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Warning
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Warning
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Warning
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Warning
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Warning
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Warning
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Warning
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Warning
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Warning
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Warning
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Warning
+malformed_since_tag=Warning
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/META-INF/MANIFEST.MF b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..4026373
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.compare.egit.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.emf.compare.egit,
+ org.eclipse.egit.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.compare,
+ org.eclipse.ui,
+ org.eclipse.core.resources,
+ org.eclipse.jgit,
+ org.eclipse.team.core,
+ org.eclipse.team.ui,
+ org.eclipse.egit.core,
+ org.eclipse.ui.ide,
+ org.eclipse.papyrus.infra.onefile,
+ org.eclipse.emf.compare.egit.ui
+Bundle-Vendor: %providerName
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/build.properties b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/build.properties
new file mode 100644
index 0000000..31e07d7
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/build.properties
@@ -0,0 +1,15 @@
+################################################################################
+# Copyright (c) 2017 Ericsson and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     Simon Delisle - initial API and implementation
+################################################################################
+source.. = src/
+bin.includes = META-INF/,\
+               .,\
+               plugin.properties,\
+               plugin.xml
\ No newline at end of file
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/icons/obj16/modelmergetool.png b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/icons/obj16/modelmergetool.png
new file mode 100644
index 0000000..f133667
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/icons/obj16/modelmergetool.png
Binary files differ
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/plugin.properties b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/plugin.properties
new file mode 100644
index 0000000..7985332
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/plugin.properties
@@ -0,0 +1,12 @@
+################################################################################
+# Copyright (c) 2017 Ericsson and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     Simon Delisle - initial API and implementation
+################################################################################
+pluginName = Papyrus Compare EGit UI
+providerName = Eclipse Modeling Project
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/plugin.xml b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/plugin.xml
new file mode 100644
index 0000000..ae7078f
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/plugin.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+
+<!--
+ Copyright (c) 2017 Ericsson and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+ 
+ Contributors:
+     Simon Delisle - initial API and implementation
+-->
+
+<plugin>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            defaultHandler="org.eclipse.emf.compare.egit.ui.internal.actions.ModelMergeToolActionHandler"
+            id="org.eclipse.papyrus.compare.egit.ui.internal.actions.ModelMergeTool"
+            name="Model Merge Tool (with EMFCompare)">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.commandImages">
+      <image
+            commandId="org.eclipse.papyrus.compare.egit.ui.internal.actions.ModelMergeTool"
+            icon="icons/obj16/modelmergetool.png">
+      </image>
+   </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            locationURI="popup:team.main?after=group4">
+            <command
+                  commandId="org.eclipse.papyrus.compare.egit.ui.internal.actions.ModelMergeTool"
+                  style="push">
+                  <visibleWhen
+	                  checkEnabled="false">
+	                  <and>
+			               <test
+			                     property="org.eclipse.egit.ui.resources.ResourceState.hasUnstagedChanges">
+			               </test>
+			               <iterate
+	                     		ifEmpty="false"
+	                    		operator="and">
+				               <instanceof
+		                            value="org.eclipse.papyrus.infra.onefile.model.IPapyrusFile">
+			                   </instanceof>
+		                   </iterate>
+		              </and>
+            	  </visibleWhen>
+            </command>
+      </menuContribution>
+   </extension>
+   <!--
+   Ensure that this plug-in is started so that the operation is available.
+   -->
+   <extension
+         point="org.eclipse.ui.startup">
+      <startup
+            class="org.eclipse.papyrus.compare.egit.ui.EgitPapyrusStartup">
+      </startup>
+   </extension>
+</plugin>
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/pom.xml b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/pom.xml
new file mode 100644
index 0000000..1865cdf
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<version>0.7.0-SNAPSHOT</version>
+		<groupId>org.eclipse.papyrus.compare</groupId>
+		<artifactId>org.eclipse.papyrus.compare.bundles.parent</artifactId>
+	</parent>
+	<groupId>org.eclipse.papyrus</groupId>
+	<artifactId>org.eclipse.papyrus.compare.egit.ui</artifactId>
+	<version>1.0.0-SNAPSHOT</version>
+	<packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/src/org/eclipse/papyrus/compare/egit/ui/EgitPapyrusStartup.java b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/src/org/eclipse/papyrus/compare/egit/ui/EgitPapyrusStartup.java
new file mode 100644
index 0000000..e8d05a0
--- /dev/null
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.egit.ui/src/org/eclipse/papyrus/compare/egit/ui/EgitPapyrusStartup.java
@@ -0,0 +1,26 @@
+/*
+ *  Copyright (c) 2017 Ericsson and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Simon Delisle - initial API and implementation
+ */
+package org.eclipse.papyrus.compare.egit.ui;
+
+import org.eclipse.ui.IStartup;
+
+/**
+ * This class is not supposed to actually do something other than starting this plug-in to ensure that the
+ * command org.eclipse.papyrus.compare.egit.ui.internal.actions.ModelMergeTool is available (see plugin.xml).
+ */
+public class EgitPapyrusStartup implements IStartup {
+
+	@Override
+	public void earlyStartup() {
+		// Nothing to do
+	}
+
+}
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.feature/feature.xml b/plugins/compare/bundles/org.eclipse.papyrus.compare.feature/feature.xml
index 4061609..303695d 100644
--- a/plugins/compare/bundles/org.eclipse.papyrus.compare.feature/feature.xml
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.feature/feature.xml
@@ -21,7 +21,7 @@
    <license url="%licenseURL">
       %license
    </license>
-   
+
    <includes
          id="org.eclipse.emf.compare"
          version="0.0.0"/>
@@ -74,4 +74,11 @@
          version="0.0.0"
          unpack="false"/>
 
+   <plugin
+         id="org.eclipse.papyrus.compare.egit.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
 </feature>
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.uml2/src/org/eclipse/papyrus/compare/uml2/internal/hook/migration/ModelSetWrapper.java b/plugins/compare/bundles/org.eclipse.papyrus.compare.uml2/src/org/eclipse/papyrus/compare/uml2/internal/hook/migration/ModelSetWrapper.java
index c225c72..aef732c 100644
--- a/plugins/compare/bundles/org.eclipse.papyrus.compare.uml2/src/org/eclipse/papyrus/compare/uml2/internal/hook/migration/ModelSetWrapper.java
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.uml2/src/org/eclipse/papyrus/compare/uml2/internal/hook/migration/ModelSetWrapper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * Copyright (c) 2016, 2017 EclipseSource Services GmbH and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,19 +7,33 @@
  * 
  * Contributors:
  *     Martin Fleck - initial API and implementation
+ *     Christian W. Damus - bug 526932
  *******************************************************************************/
 package org.eclipse.papyrus.compare.uml2.internal.hook.migration;
 
+import com.google.common.collect.Iterables;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.Collection;
 import java.util.HashMap;
+import java.util.LinkedHashSet;
 import java.util.Map;
 
+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.common.util.URI;
 import org.eclipse.emf.ecore.EPackage.Registry;
+import org.eclipse.emf.ecore.resource.ContentHandler;
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.emf.ecore.resource.ResourceSet;
 import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
 import org.eclipse.emf.transaction.TransactionalEditingDomain;
 import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
 import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
 
 /**
  * This class wraps a resource set into a ModelSet with minimal changes to be compliant to the expected
@@ -46,7 +60,32 @@
 	 *            resource set to be wrapped.
 	 */
 	public ModelSetWrapper(ResourceSet resourceSet) {
+		super();
+
 		this.resourceSet = resourceSet;
+
+		// We need to ensure that UML profiles are shared by myself and the
+		// resource set that I wrap, because a profile must be loaded exactly once
+		// to avoid confusing the identity of stereotypes. Otherwise, stereotype
+		// applications repaired in this model-set context would be deemed invalid
+		// in the wrapped resource-set context because there the UML API
+		// is seeing the wrong copy of the Stereotype as their definition
+		// cf. http://eclip.se/526932
+		this.resources = new ProxyingResourceList();
+	}
+
+	@Override
+	protected Resource demandCreateResource(URI uri) {
+		if (shouldProxy(uri)) {
+			// Create the real resource in the wrapped resource set and proxy it here
+			Resource delegate = resourceSet.createResource(uri, ContentHandler.UNSPECIFIED_CONTENT_TYPE);
+			if (delegate != null) {
+				// Get the proxy
+				return getResource(uri, false);
+			}
+		}
+
+		return super.demandCreateResource(uri);
 	}
 
 	/**
@@ -75,4 +114,327 @@
 		return resourceSet.getPackageRegistry(); // delegate to wrapped resourceSet
 	}
 
+	/**
+	 * Queries whether a code resource should be proxied in the model set. This is usually required for UML
+	 * library resources (profiles, metamodels, and such deployed in plug-ins) and not for other resources.
+	 * 
+	 * @param resourceURI
+	 *            a resource URI
+	 * @return whether it should be proxied
+	 */
+	protected boolean shouldProxy(URI resourceURI) {
+		return resourceSet.getURIConverter().normalize(resourceURI).isPlatformPlugin()
+				&& UmlModel.UML_FILE_EXTENSION.equals(resourceURI.fileExtension());
+	}
+
+	/**
+	 * Detaches me from the resource-set that I wrap.
+	 */
+	void detach() {
+		((ProxyingResourceList)resources).detach();
+	}
+
+	//
+	// Nested types
+	//
+
+	/**
+	 * A specialized resource list that shares the underlying resources (and hence their contents) of UML
+	 * Profiles with the wrapped resource, to ensure a single in-memory copy of each profile definition for
+	 * consistent identification of stereotype applications. Nonetheless, each resource set has to see these
+	 * shared resources as "owned by" it, so in the {@code ModelSetWrapper} context this is achieved by
+	 * dynamic proxies that pass through to the real resources for everything but the relationship to the
+	 * owning resource-set.
+	 *
+	 * @author Christian W. Damus
+	 */
+	protected class ProxyingResourceList extends ResourcesEList<Resource> implements Adapter {
+
+		private static final long serialVersionUID = 1L;
+
+		private final Map<Resource, Resource> proxies = new HashMap<>();
+
+		/**
+		 * Initializes me.
+		 */
+		protected ProxyingResourceList() {
+			super();
+
+			for (Resource next : resourceSet.getResources()) {
+				addProxy(next);
+			}
+
+			resourceSet.eAdapters().add(this);
+		}
+
+		/**
+		 * Detaches me from my delegate list, removes all of my proxy resources, and forgets all of my proxy
+		 * mappings.
+		 */
+		void detach() {
+			// Stop listening to my delegate for changes in its resources
+			resourceSet.eAdapters().remove(this);
+
+			// Remove all of my proxy resources that I don't own
+			removeAll(proxies.values());
+			proxies.clear();
+		}
+
+		//
+		// Proxy management
+		//
+
+		/**
+		 * Queries whether a {@code resource} should be proxied in the model set. This is usually required for
+		 * UML library resources (profiles, metamodels, and such deployed in plug-ins) and not for other
+		 * resources.
+		 * 
+		 * @param resource
+		 *            a resource
+		 * @return whether it should be proxied
+		 */
+		protected boolean shouldProxy(Resource resource) {
+			return ModelSetWrapper.this.shouldProxy(resource.getURI());
+		}
+
+		/**
+		 * Obtains the existing proxy, if any, that represents my share of a {@code resource}.
+		 * 
+		 * @param resource
+		 *            a resource
+		 * @return the existing proxy, or {@code null} if it has not been proxied
+		 */
+		Resource getProxy(Resource resource) {
+			return proxies.get(resource);
+		}
+
+		/**
+		 * Creates the canonical proxy wrapper for a {@code resource} that represents my share of it.
+		 * 
+		 * @param resource
+		 *            a resource to proxy
+		 * @return the proxied resource
+		 */
+		Resource createProxy(Resource resource) {
+			Collection<Class<?>> interfaces = getResourceInterfaces(resource.getClass());
+			Resource result = (Resource)Proxy.newProxyInstance(getClass().getClassLoader(),
+					Iterables.toArray(interfaces, Class.class), new ResourceProxy(resource));
+			proxies.put(resource, result);
+			return result;
+		}
+
+		/**
+		 * Computes the {@link Resource} interfaces that a proxy needs to implement to expose the full API of
+		 * an instance of the given resource implementation class.
+		 * 
+		 * @param resourceImpl
+		 *            the implementation class of a resource
+		 * @return its interfaces
+		 */
+		private Collection<Class<?>> getResourceInterfaces(Class<?> resourceImpl) {
+			Collection<Class<?>> result = new LinkedHashSet<>();
+
+			for (Class<?> class_ = resourceImpl; class_ != null; class_ = class_.getSuperclass()) {
+				interfaces: for (Class<?> next : class_.getInterfaces()) {
+					if (Resource.class.isAssignableFrom(next)) {
+						for (Class<?> found : result) {
+							if (next.isAssignableFrom(found)) {
+								// Don't bother if it's a redundant superinterface
+								continue interfaces;
+							}
+						}
+						result.add(next);
+					}
+				}
+			}
+
+			// Remove redundant superinterfaces
+
+			return result;
+		}
+
+		/**
+		 * Queries whether a {@code resource} is a proxy that represents my co-ownership of it.
+		 * 
+		 * @param resource
+		 *            a resource
+		 * @return whether it is a proxy of mine
+		 */
+		boolean isProxy(Resource resource) {
+			return resource != null && Proxy.isProxyClass(resource.getClass())
+					&& Proxy.getInvocationHandler(resource) instanceof ResourceProxy;
+		}
+
+		/**
+		 * Obtains a proxy for the given {@code resource}, creating that proxy if necessary, to represent my
+		 * share of it.
+		 * 
+		 * @param resource
+		 *            a resource
+		 * @return the {@code resource} itself if it already {@linkplain #isProxy(Resource) is a proxy} or a
+		 *         proxy wrapping it
+		 */
+		Resource proxy(Resource resource) {
+			if (isProxy(resource)) {
+				return resource;
+			}
+
+			Resource result = getProxy(resource);
+			if (result == null) {
+				result = createProxy(resource);
+			}
+			return result;
+		}
+
+		/**
+		 * Obtains the real resource represented by the given {@code resource}, in case it
+		 * {@linkplain #isProxy(Resource) is a proxy}.
+		 * 
+		 * @param resource
+		 *            a resource
+		 * @return the real resource if a proxy, otherwise just the {@code resource}, itself
+		 */
+		Resource unproxy(Resource resource) {
+			if (isProxy(resource)) {
+				return ((ResourceProxy)Proxy.getInvocationHandler(resource)).resource;
+			}
+			return resource;
+		}
+
+		/**
+		 * Adds a proxy for me to share ownership of the given {@code resource} if I
+		 * {@linkplain #shouldProxy(Resource) should have a proxy} for it.
+		 * 
+		 * @param resource
+		 *            a resource to conditionally add to me as a proxy
+		 */
+		void addProxy(Resource resource) {
+			if (shouldProxy(resource)) {
+				add(proxy(resource));
+			}
+		}
+
+		/**
+		 * Removes my proxy for the given {@code resource} if I have one
+		 * 
+		 * @param resource
+		 *            a resource that I must no longer share
+		 */
+		void removeProxy(Resource resource) {
+			// Don't implicitly create a proxy just to remove it
+			remove(getProxy(resource));
+		}
+
+		/**
+		 * Adds a proxy for me to share ownership of the given {@code newResource} in place of the old if I
+		 * {@linkplain #shouldProxy(Resource) should have a proxy} for it. Otherwise, just ensures that I do
+		 * not have a proxy for the {@code oldResource}.
+		 * 
+		 * @param oldResource
+		 *            a resource for which I should not have a proxy
+		 * @param newResource
+		 *            a resource to conditionally replace the old one with
+		 */
+		void replaceProxy(Resource oldResource, Resource newResource) {
+			// Don't implicitly create a proxy just to remove it
+			int index = indexOf(getProxy(oldResource));
+			if (index >= 0) {
+				if (shouldProxy(newResource)) {
+					set(index, proxy(newResource));
+				} else {
+					removeProxy(oldResource);
+				}
+			} else if (shouldProxy(newResource)) {
+				add(proxy(newResource));
+			}
+		}
+
+		//
+		// Adapter protocol to pick up changes in the delegate list
+		//
+
+		public void notifyChanged(Notification msg) {
+			if (msg.isTouch()) {
+				return;
+			}
+
+			if (msg.getNotifier() == resourceSet
+					&& msg.getFeatureID(ResourceSet.class) == RESOURCE_SET__RESOURCES) {
+				switch (msg.getEventType()) {
+					case Notification.ADD:
+						addProxy((Resource)msg.getNewValue());
+						break;
+					case Notification.ADD_MANY:
+						for (Object next : (Collection<?>)msg.getNewValue()) {
+							addProxy((Resource)next);
+						}
+						break;
+					case Notification.REMOVE:
+						removeProxy((Resource)msg.getOldValue());
+						break;
+					case Notification.REMOVE_MANY:
+						for (Object next : (Collection<?>)msg.getOldValue()) {
+							removeProxy((Resource)next);
+						}
+						break;
+					case Notification.SET:
+						replaceProxy((Resource)msg.getOldValue(), (Resource)msg.getNewValue());
+						break;
+					default:
+						// Pass. Not even move is interesting
+						break;
+				}
+			}
+		}
+
+		public Notifier getTarget() {
+			return null;
+		}
+
+		public void setTarget(Notifier newTarget) {
+			// Pass
+		}
+
+		public boolean isAdapterForType(Object type) {
+			return false;
+		}
+
+	}
+
+	/**
+	 * Invocation handler for my proxy resources. It passes through all API to the wrapped resource, properly
+	 * owned by my wrapped resource set, except for the API dealing with the relationship to the resource set,
+	 * which in that case is myself.
+	 *
+	 * @author Christian W. Damus
+	 */
+	private class ResourceProxy implements InvocationHandler {
+		private final Resource resource;
+
+		ResourceProxy(Resource resource) {
+			super();
+
+			this.resource = resource;
+		}
+
+		public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+			switch (method.getName()) {
+				case "getResourceSet": //$NON-NLS-1$
+					if (method.getDeclaringClass() == Resource.class) {
+						return ModelSetWrapper.this;
+					}
+					break;
+				case "basicSetResourceSet": //$NON-NLS-1$
+					if (method.getDeclaringClass() == Resource.Internal.class) {
+						// Don't try to tell the real resource that the wrapper
+						// model-set is its owner
+						return null;
+					}
+					break;
+			}
+
+			return method.invoke(resource, args);
+		}
+
+	}
 }
diff --git a/plugins/compare/bundles/org.eclipse.papyrus.compare.uml2/src/org/eclipse/papyrus/compare/uml2/internal/hook/migration/StereotypeApplicationRepair.java b/plugins/compare/bundles/org.eclipse.papyrus.compare.uml2/src/org/eclipse/papyrus/compare/uml2/internal/hook/migration/StereotypeApplicationRepair.java
index cc79f97..d92285f 100644
--- a/plugins/compare/bundles/org.eclipse.papyrus.compare.uml2/src/org/eclipse/papyrus/compare/uml2/internal/hook/migration/StereotypeApplicationRepair.java
+++ b/plugins/compare/bundles/org.eclipse.papyrus.compare.uml2/src/org/eclipse/papyrus/compare/uml2/internal/hook/migration/StereotypeApplicationRepair.java
@@ -11,6 +11,7 @@
  *     Laurent Delaigue - bug 498583
  *     Martin Fleck - bug 515041
  *     Philip Langer - bug 516484
+ *     Christian W. Damus - bug 526932
  *******************************************************************************/
 package org.eclipse.papyrus.compare.uml2.internal.hook.migration;
 
@@ -107,6 +108,9 @@
 	 * Disposed the instance.
 	 */
 	public void dispose() {
+		// Detach it from its wrapped resource set
+		fModelSet.detach();
+
 		dispose(this.fModelSet);
 	}
 
@@ -290,8 +294,7 @@
 		if (isFieldMissing()) {
 			// fail silently but log warning
 			UMLPapyrusComparePlugin.getDefault().getLog().log(new Status(IStatus.WARNING,
-					UMLPapyrusComparePlugin.PLUGIN_ID,
-					"Unable to analyze and repair resource " + fResource //$NON-NLS-1$
+					UMLPapyrusComparePlugin.PLUGIN_ID, "Unable to analyze and repair resource " + fResource //$NON-NLS-1$
 							+ " due to missing field: {resource=" + fResource + ", labelProviderService=" //$NON-NLS-1$ //$NON-NLS-2$
 							+ fLabelProviderService + ", profileSupplier=" + fProfileSupplier + "}")); //$NON-NLS-1$//$NON-NLS-2$
 			return null;
diff --git a/plugins/compare/bundles/pom.xml b/plugins/compare/bundles/pom.xml
index be757e8..76ff956 100644
--- a/plugins/compare/bundles/pom.xml
+++ b/plugins/compare/bundles/pom.xml
@@ -17,5 +17,6 @@
 		<module>org.eclipse.papyrus.compare.feature</module>
 		<module>org.eclipse.papyrus.compare.uml2</module>
 		<module>org.eclipse.papyrus.compare.uml2.edit</module>
+		<module>org.eclipse.papyrus.compare.egit.ui</module>
 	</modules>
 </project>
diff --git a/plugins/compare/tests/org.eclipse.papyrus.compare.diagram.tests.git/src/org/eclipse/papyrus/compare/diagram/tests/egit/StereotypeApplicationsInSubunitsTest.java b/plugins/compare/tests/org.eclipse.papyrus.compare.diagram.tests.git/src/org/eclipse/papyrus/compare/diagram/tests/egit/StereotypeApplicationsInSubunitsTest.java
new file mode 100644
index 0000000..9678294
--- /dev/null
+++ b/plugins/compare/tests/org.eclipse.papyrus.compare.diagram.tests.git/src/org/eclipse/papyrus/compare/diagram/tests/egit/StereotypeApplicationsInSubunitsTest.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (C) 2017 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Christian W. Damus - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.compare.diagram.tests.egit;
+
+import static org.hamcrest.CoreMatchers.everyItem;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.compare.ide.ui.tests.framework.ResolutionStrategyID;
+import org.eclipse.emf.compare.ide.ui.tests.framework.annotations.ResolutionStrategies;
+import org.eclipse.emf.compare.ide.ui.tests.git.framework.GitTestRunner;
+import org.eclipse.emf.compare.ide.ui.tests.git.framework.GitTestSupport;
+import org.eclipse.emf.compare.ide.ui.tests.git.framework.annotations.GitInput;
+import org.eclipse.emf.compare.ide.ui.tests.git.framework.annotations.GitMerge;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.uml2.common.util.UML2Util;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.hamcrest.CustomTypeSafeMatcher;
+import org.hamcrest.Matcher;
+import org.junit.runner.RunWith;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Test that a class refactored as a sub-unit does not lose its stereotype applications when merged into a
+ * branch that has the class integrated.
+ *
+ * @author Christian W. Damus
+ * @see <a href="http://eclip.se/526932">bug 526932</a>
+ */
+@SuppressWarnings({"nls", "boxing" })
+@RunWith(GitTestRunner.class)
+@ResolutionStrategies(ResolutionStrategyID.WORKSPACE)
+public class StereotypeApplicationsInSubunitsTest {
+
+	@GitMerge(local = "left", remote = "right-extract-submodel")
+	@GitInput("data/bug526932.zip")
+	public void stereotypeApplicationNotLost(GitTestSupport testSupport) throws Exception {
+		// Check that the merge completed
+
+		assertThat(testSupport.noConflict(), is(true));
+		assertThat(testSupport.getMergeResult().getMergeStatus().isSuccessful(), is(true));
+		assertThat(testSupport.getStatus().hasUncommittedChanges(), is(false));
+
+		// Check that all the files we expect are present
+
+		String pattern = "Plant/%s.%s";
+		List<String> extensions = Arrays.asList("di", "notation", "uml");
+		List<String> units = Arrays.asList("Plant", "Plant_Block");
+		List<String> expectedFiles = Lists.newArrayListWithCapacity(units.size() * extensions.size());
+		for (String unit : units) {
+			for (String ext : extensions) {
+				expectedFiles.add(String.format(pattern, unit, ext));
+			}
+		}
+
+		assertThat(expectedFiles, everyItem(fileExists(testSupport)));
+
+		// Check the stereotype applications
+
+		URI resourceURI = URI.createPlatformResourceURI("Plant/Plant_Block.uml", true);
+		ModelSet mset = new ModelSet();
+
+		try {
+			mset.loadModels(resourceURI);
+			org.eclipse.uml2.uml.Class class_ = UML2Util.load(mset, resourceURI, UMLPackage.Literals.CLASS);
+			assertThat(class_, isApplied("SysML::Blocks::Block"));
+		} finally {
+			mset.unload();
+		}
+	}
+
+	//
+	// Test framework
+	//
+
+	/**
+	 * Assertion that a file exists according to a Git test {@code support}.
+	 * 
+	 * @param support
+	 *            the Git test support
+	 * @return the file-exists assertion
+	 */
+	Matcher<String> fileExists(final GitTestSupport support) {
+		return new CustomTypeSafeMatcher<String>("exists") {
+
+			@Override
+			protected boolean matchesSafely(String item) {
+				return support.fileExists(item);
+			}
+		};
+	}
+
+	/**
+	 * Assertion that an UML element has a {@code stereotype} applied.
+	 * 
+	 * @param stereotype
+	 *            the stereotype that is expected to be applied
+	 * @return the is-applied assertion
+	 */
+	Matcher<Element> isApplied(final String stereotype) {
+		return new CustomTypeSafeMatcher<Element>("has " + stereotype + " applied") {
+
+			@Override
+			protected boolean matchesSafely(Element item) {
+				Stereotype applied = item.getAppliedStereotype(stereotype);
+				return applied != null;
+			}
+		};
+	}
+}
diff --git a/plugins/compare/tests/org.eclipse.papyrus.compare.diagram.tests.git/src/org/eclipse/papyrus/compare/diagram/tests/egit/data/bug526932.zip b/plugins/compare/tests/org.eclipse.papyrus.compare.diagram.tests.git/src/org/eclipse/papyrus/compare/diagram/tests/egit/data/bug526932.zip
new file mode 100644
index 0000000..6b158a6
--- /dev/null
+++ b/plugins/compare/tests/org.eclipse.papyrus.compare.diagram.tests.git/src/org/eclipse/papyrus/compare/diagram/tests/egit/data/bug526932.zip
Binary files differ
diff --git a/plugins/compare/tests/org.eclipse.papyrus.compare.diagram.tests.git/src/org/eclipse/papyrus/compare/diagram/tests/suite/PapyrusGitTests.java b/plugins/compare/tests/org.eclipse.papyrus.compare.diagram.tests.git/src/org/eclipse/papyrus/compare/diagram/tests/suite/PapyrusGitTests.java
index ac749ba..5f06496 100644
--- a/plugins/compare/tests/org.eclipse.papyrus.compare.diagram.tests.git/src/org/eclipse/papyrus/compare/diagram/tests/suite/PapyrusGitTests.java
+++ b/plugins/compare/tests/org.eclipse.papyrus.compare.diagram.tests.git/src/org/eclipse/papyrus/compare/diagram/tests/suite/PapyrusGitTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2016 Obeo and others.
+ * Copyright (c) 2016, 2017 Obeo and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     Obeo - initial API and implementation
  *     Philip Langer - added further tests
  *     Alexandra Buzila - additional tests
+ *     Christian W. Damus - bug 526932
  *******************************************************************************/
 package org.eclipse.papyrus.compare.diagram.tests.suite;
 
@@ -24,6 +25,7 @@
 import org.eclipse.papyrus.compare.diagram.tests.egit.ResourceAttachmentChangeAdd2GitMergeTest;
 import org.eclipse.papyrus.compare.diagram.tests.egit.ResourceAttachmentChangeDelete1GitMergeTest;
 import org.eclipse.papyrus.compare.diagram.tests.egit.ResourceAttachmentChangeDelete2GitMergeTest;
+import org.eclipse.papyrus.compare.diagram.tests.egit.StereotypeApplicationsInSubunitsTest;
 import org.eclipse.papyrus.compare.diagram.tests.egit.StereotypeConflictTest;
 import org.eclipse.papyrus.compare.diagram.tests.egit.mergeresolution.MergeResolutionManagerTest;
 import org.eclipse.papyrus.compare.diagram.tests.merge.AdditiveMergeDiagramTests;
@@ -48,7 +50,7 @@
 		ResourceAttachmentChangeMoveNoConflictTests.class, ResourceAttachmentChangeMoveOrderTests.class,
 		StereotypeConflictTest.class, IgnoreDiFileChangesInGitMergeTest.class,
 		MoveOfDiagramConflictDetectionTest.class, AdditiveMergeDiagramTests.class,
-		MergeResolutionManagerTest.class, })
+		MergeResolutionManagerTest.class, StereotypeApplicationsInSubunitsTest.class })
 public class PapyrusGitTests {
 
 	@BeforeClass