From fd705994c0d0e713432543f237b1bc482dca914c Mon Sep 17 00:00:00 2001 From: Martin Fleck Date: Thu, 2 Jun 2016 20:11:18 +0200 Subject: [PATCH] [495334] [Testing Framework] Ancestor not loaded correctly Adapt TestSupport class to correctly query the given ancestor parameter. If no parameter is given, i.e., we have the empty String from the default parameter, then no ancestor is loaded. If the parameter is given, we attempt to load the given resource like we do for the left and right resource. Bug: 495334 Change-Id: I87bd4b4ac18cdfade9dd281d6a25284fa3d86911 Signed-off-by: Martin Fleck --- .../ide/ui/tests/framework/internal/CompareTestSupport.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareTestSupport.java b/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareTestSupport.java index 829d04c34..417937534 100644 --- a/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareTestSupport.java +++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareTestSupport.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Obeo. + * Copyright (c) 2016 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,6 +7,7 @@ * * Contributors: * Obeo - initial API and implementation + * Martin Fleck - bug 495334 *******************************************************************************/ package org.eclipse.emf.compare.ide.ui.tests.framework.internal; @@ -51,9 +52,9 @@ public class CompareTestSupport { loadFromClassLoader(clazz, right, rightRS); EcoreUtil.resolveAll(rightRS); - if ("".equals(ancestor)) { //$NON-NLS-1$ + if (!("".equals(ancestor))) { //$NON-NLS-1$ ancestorRS = new ResourceSetImpl(); - loadFromClassLoader(clazz, right, ancestorRS); + loadFromClassLoader(clazz, ancestor, ancestorRS); EcoreUtil.resolveAll(ancestorRS); } } -- 2.11.4.GIT