Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSergey Prigogin2016-07-19 18:46:22 -0400
committerSergey Prigogin2016-07-19 19:04:01 -0400
commitd1a02b5588da41cf909755d308bae2f640998ce3 (patch)
tree7d918953121d67a3a7186a4fdce2974419904f5b /tests
parent73fd0ef44b36fd04a8268b9600d4f21f91a43381 (diff)
downloadeclipse.platform.team-d1a02b5588da41cf909755d308bae2f640998ce3.tar.gz
eclipse.platform.team-d1a02b5588da41cf909755d308bae2f640998ce3.tar.xz
eclipse.platform.team-d1a02b5588da41cf909755d308bae2f640998ce3.zip
Revert "Bug 213780 - Compare With direction should be configurable"
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/ContentMergeViewerTest.java19
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/TextMergeViewerTest.java22
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/SaveableCompareEditorInputTest.java11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CompareEditorTests.java26
4 files changed, 13 insertions, 65 deletions
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/ContentMergeViewerTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/ContentMergeViewerTest.java
index 99e90de7a..c5cf39567 100644
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/ContentMergeViewerTest.java
+++ b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/ContentMergeViewerTest.java
@@ -10,19 +10,15 @@
*******************************************************************************/
package org.eclipse.compare.tests;
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.contentmergeviewer.ContentMergeViewer;
-import org.eclipse.compare.internal.ComparePreferencePage;
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.internal.ICompareUIConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.widgets.Composite;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
public class ContentMergeViewerTest extends TestCase {
private MyContentMergeViewer myContentMergeViewer;
@@ -91,9 +87,6 @@ public class ContentMergeViewerTest extends TestCase {
}
protected void setUp() throws Exception {
- super.setUp();
- IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore();
- store.setDefault(ComparePreferencePage.LAYOUT, ICompareUIConstants.PREF_VALUE_RIGHT_TO_LEFT);
result = new boolean[] { false, false };
myContentMergeViewer = new MyContentMergeViewer();
myContentMergeViewer.addPropertyChangeListener(new IPropertyChangeListener() {
@@ -104,12 +97,6 @@ public class ContentMergeViewerTest extends TestCase {
});
}
- protected void tearDown() throws Exception {
- IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore();
- store.setToDefault(ComparePreferencePage.LAYOUT);
- super.tearDown();
- }
-
// set left to true
public void testFFTX() {
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/TextMergeViewerTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/TextMergeViewerTest.java
index 98b125d58..f7c068f3a 100644
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/TextMergeViewerTest.java
+++ b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/TextMergeViewerTest.java
@@ -16,6 +16,8 @@ import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
+import junit.framework.TestCase;
+
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.ICompareFilter;
import org.eclipse.compare.IEditableContent;
@@ -23,9 +25,6 @@ import org.eclipse.compare.IStreamContentAccessor;
import org.eclipse.compare.ITypedElement;
import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
import org.eclipse.compare.internal.ChangeCompareFilterPropertyAction;
-import org.eclipse.compare.internal.ComparePreferencePage;
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.internal.ICompareUIConstants;
import org.eclipse.compare.internal.IMergeViewerTestAdapter;
import org.eclipse.compare.internal.MergeViewerContentProvider;
import org.eclipse.compare.internal.Utilities;
@@ -34,7 +33,6 @@ import org.eclipse.compare.structuremergeviewer.Differencer;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
@@ -48,8 +46,6 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
-import junit.framework.TestCase;
-
public class TextMergeViewerTest extends TestCase {
/**
@@ -254,19 +250,7 @@ public class TextMergeViewerTest extends TestCase {
}
return document;
}
-
- protected void setUp() throws Exception {
- super.setUp();
- IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore();
- store.setDefault(ComparePreferencePage.LAYOUT, ICompareUIConstants.PREF_VALUE_RIGHT_TO_LEFT);
- }
-
- protected void tearDown() throws Exception {
- IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore();
- store.setToDefault(ComparePreferencePage.LAYOUT);
- super.tearDown();
- }
-
+
public void testCopyRightToLeft() throws Exception {
DiffNode parentNode = new DiffNode(new ParentTestElement(), new ParentTestElement());
String copiedText = "hi there";
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/SaveableCompareEditorInputTest.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/SaveableCompareEditorInputTest.java
index 3daa4c94b..7591d873a 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/SaveableCompareEditorInputTest.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/SaveableCompareEditorInputTest.java
@@ -16,14 +16,14 @@ import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
+import junit.framework.Test;
+
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.CompareViewerSwitchingPane;
import org.eclipse.compare.ITypedElement;
import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
import org.eclipse.compare.internal.CompareEditor;
-import org.eclipse.compare.internal.ComparePreferencePage;
import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.internal.ICompareUIConstants;
import org.eclipse.compare.internal.MergeSourceViewer;
import org.eclipse.compare.structuremergeviewer.Differencer;
import org.eclipse.compare.structuremergeviewer.ICompareInput;
@@ -36,7 +36,6 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ILogListener;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Image;
@@ -49,8 +48,6 @@ import org.eclipse.team.tests.core.TeamTest;
import org.eclipse.team.ui.synchronize.SaveableCompareEditorInput;
import org.eclipse.ui.PlatformUI;
-import junit.framework.Test;
-
public class SaveableCompareEditorInputTest extends TeamTest {
public static Test suite() {
@@ -70,8 +67,6 @@ public class SaveableCompareEditorInputTest extends TeamTest {
protected void setUp() throws Exception {
super.setUp();
- IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore();
- store.setDefault(ComparePreferencePage.LAYOUT, ICompareUIConstants.PREF_VALUE_RIGHT_TO_LEFT);
project = createProject("Project_", new String[] {
"File1.txt", "File2.txt" });
@@ -89,8 +84,6 @@ public class SaveableCompareEditorInputTest extends TeamTest {
protected void tearDown() throws Exception {
// remove log listener
RuntimeLog.removeLogListener(logListener);
- IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore();
- store.setToDefault(ComparePreferencePage.LAYOUT);
super.tearDown();
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CompareEditorTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CompareEditorTests.java
index f8118bade..dd0c8b15e 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CompareEditorTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CompareEditorTests.java
@@ -12,25 +12,19 @@ package org.eclipse.team.tests.ccvs.core.subscriber;
import java.io.ByteArrayInputStream;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.ISharedDocumentAdapter;
-import org.eclipse.compare.SharedDocumentAdapter;
-import org.eclipse.compare.internal.ComparePreferencePage;
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.internal.ICompareUIConstants;
+import junit.framework.Test;
+
+import org.eclipse.compare.*;
import org.eclipse.compare.internal.Utilities;
import org.eclipse.compare.structuremergeviewer.ICompareInput;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.widgets.Display;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSSyncTreeSubscriber;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
+import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.internal.ui.history.FileRevisionTypedElement;
@@ -40,16 +34,10 @@ import org.eclipse.team.internal.ui.synchronize.EditableSharedDocumentAdapter;
import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
import org.eclipse.team.internal.ui.synchronize.actions.OpenInCompareAction;
import org.eclipse.team.tests.ccvs.ui.ModelParticipantSyncInfoSource;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.*;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider;
-import junit.framework.Test;
-
/**
* Test the behavior of compare editors opened on diffs.
*/
@@ -153,8 +141,6 @@ public class CompareEditorTests extends CVSSyncSubscriberTest {
protected void setUp() throws Exception {
super.setUp();
- IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore();
- store.setDefault(ComparePreferencePage.LAYOUT, ICompareUIConstants.PREF_VALUE_RIGHT_TO_LEFT);
// Need to set both the Compare and Team test flags to true
Utilities.RUNNING_TESTS = true;
Utils.RUNNING_TESTS = true;
@@ -168,8 +154,6 @@ public class CompareEditorTests extends CVSSyncSubscriberTest {
protected void tearDown() throws Exception {
closeAllEditors();
- IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore();
- store.setToDefault(ComparePreferencePage.LAYOUT);
super.tearDown();
}

Back to the top