Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 347557 | Differences between
and this patch

Collapse All | Expand All

(-)a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java (-4 / +4 lines)
Lines 248-257 public abstract class LocalResourceSaveableComparison extends SaveableComparison Link Here
248
	 */
248
	 */
249
	public String getName() {
249
	public String getName() {
250
		// Return the name of the file element as held in the compare input
250
		// Return the name of the file element as held in the compare input
251
		if (fileElement.equals(input.getLeft())) {
251
		if (input.getLeft().equals(fileElement)) {
252
			return input.getLeft().getName();
252
			return input.getLeft().getName();
253
		}
253
		}
254
		if (fileElement.equals(input.getRight())) {
254
		if (input.getRight().equals(fileElement)) {
255
			return input.getRight().getName();
255
			return input.getRight().getName();
256
		}
256
		}
257
		// Fallback call returning name of the main non-null element of the input
257
		// Fallback call returning name of the main non-null element of the input
Lines 289-302 public abstract class LocalResourceSaveableComparison extends SaveableComparison Link Here
289
289
290
			ContentMergeViewer cmv = (ContentMergeViewer) e.getSource();
290
			ContentMergeViewer cmv = (ContentMergeViewer) e.getSource();
291
291
292
			if (fileElement.equals(input.getLeft())) {
292
			if (input.getLeft().equals(fileElement)) {
293
				if (changed && cmv.internalIsLeftDirty())
293
				if (changed && cmv.internalIsLeftDirty())
294
					setDirty(changed);
294
					setDirty(changed);
295
				else if (!changed && !cmv.internalIsLeftDirty()) {
295
				else if (!changed && !cmv.internalIsLeftDirty()) {
296
					setDirty(changed);
296
					setDirty(changed);
297
				}
297
				}
298
			}
298
			}
299
			if (fileElement.equals(input.getRight())) {
299
			if (input.getRight().equals(fileElement)) {
300
				if (changed && cmv.internalIsRightDirty())
300
				if (changed && cmv.internalIsRightDirty())
301
					setDirty(changed);
301
					setDirty(changed);
302
				else if (!changed && !cmv.internalIsRightDirty()) {
302
				else if (!changed && !cmv.internalIsRightDirty()) {
(-)a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/ReflectionUtils.java (-1 / +24 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2009 IBM Corporation and others.
2
 * Copyright (c) 2009, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 53-56 public class ReflectionUtils { Link Here
53
		return ret;
53
		return ret;
54
	}
54
	}
55
55
56
	public static Object getField(Object object, String name, boolean deep)
57
			throws IllegalArgumentException, IllegalAccessException,
58
			SecurityException, NoSuchFieldException {
59
		Class clazz = object.getClass();
60
		NoSuchFieldException ex = null;
61
		while (clazz != null) {
62
			try {
63
				Field field = clazz.getDeclaredField(name);
64
				field.setAccessible(true);
65
				return field.get(object);
66
			} catch (NoSuchFieldException e) {
67
				if (ex == null) {
68
					ex = e;
69
				}
70
				if (!deep)
71
					break;
72
				clazz = clazz.getSuperclass();
73
74
			}
75
		}
76
		throw ex;
77
	}
78
56
}
79
}
(-)a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamUITests.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
2
 * Copyright (c) 2007, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 15-20 import junit.framework.TestSuite; Link Here
15
15
16
import org.eclipse.core.tests.resources.ResourceTest;
16
import org.eclipse.core.tests.resources.ResourceTest;
17
import org.eclipse.team.tests.core.mapping.ScopeTests;
17
import org.eclipse.team.tests.core.mapping.ScopeTests;
18
import org.eclipse.team.tests.ui.SaveableCompareEditorInputTest;
18
19
19
public class AllTeamUITests extends ResourceTest {
20
public class AllTeamUITests extends ResourceTest {
20
21
Lines 29-34 public class AllTeamUITests extends ResourceTest { Link Here
29
	public static Test suite() {
30
	public static Test suite() {
30
		TestSuite suite = new TestSuite();
31
		TestSuite suite = new TestSuite();
31
		suite.addTest(ScopeTests.suite());
32
		suite.addTest(ScopeTests.suite());
33
		suite.addTest(SaveableCompareEditorInputTest.suite());
32
		return suite;
34
		return suite;
33
	}
35
	}
34
}
36
}

Return to bug 347557