Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2016-10-29 05:53:42 -0400
committerAndrey Loskutov2016-11-04 16:18:34 -0400
commitf60954ba88fb4b106af2fd6056f69c93a54110b6 (patch)
tree166163a7bf4d0b9f39d27daecb8a0badb1820344 /tests/org.eclipse.team.tests.core
parenta114e221df58ed0106dc903ce3ff1aeb28da617f (diff)
downloadeclipse.platform.team-f60954ba88fb4b106af2fd6056f69c93a54110b6.tar.gz
eclipse.platform.team-f60954ba88fb4b106af2fd6056f69c93a54110b6.tar.xz
eclipse.platform.team-f60954ba88fb4b106af2fd6056f69c93a54110b6.zip
Bug 506732 - cleanup trailing spaces in test plugins
Change-Id: I55e43b2389d1a9baffdfecea701b37105e4548ae Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'tests/org.eclipse.team.tests.core')
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java12
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java6
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java2
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java84
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderWithLinking.java10
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StorageMergerTests.java8
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java2
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TestStorageMerger.java2
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeBuildingTests.java26
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTestSubscriber.java2
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTests.java10
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/Bug_217673.java2
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/DoNotRemoveTest.java2
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/PessimisticRepositoryProvider.java12
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/SaveableCompareEditorInputTest.java4
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java24
16 files changed, 104 insertions, 104 deletions
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java
index eefcb1cb1..52e235699 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java
@@ -16,12 +16,12 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.team.core.RepositoryProvider;
public class RepositoryProviderBic extends RepositoryProvider {
-
+
final public static String NATURE_ID = "org.eclipse.team.tests.core.bic-provider";
-
+
private IMoveDeleteHook mdh;
private IFileModificationValidator mv;
-
+
/*
* @see RepositoryProvider#configureProject()
*/
@@ -39,7 +39,7 @@ public class RepositoryProviderBic extends RepositoryProvider {
*/
public void deconfigure() throws CoreException {
}
-
+
/*
* @see RepositoryProvider#getFileModificationValidator()
*/
@@ -53,11 +53,11 @@ public class RepositoryProviderBic extends RepositoryProvider {
public IMoveDeleteHook getMoveDeleteHook() {
return mdh;
}
-
+
public void setModificationValidator(IFileModificationValidator mv) {
this.mv = mv;
}
-
+
public void setMoveDeleteHook(IMoveDeleteHook mdh) {
this.mdh = mdh;
}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java
index 768d63c6d..342908a10 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java
@@ -16,7 +16,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.team.core.RepositoryProvider;
public class RepositoryProviderNaish extends RepositoryProvider {
-
+
final public static String NATURE_ID = "org.eclipse.team.tests.core.naish-provider";
private IMoveDeleteHook mdh;
private IFileModificationValidator mv;
@@ -37,11 +37,11 @@ public class RepositoryProviderNaish extends RepositoryProvider {
*/
public void deconfigure() throws CoreException {
}
-
+
public void setModificationValidator(IFileModificationValidator mv) {
this.mv = mv;
}
-
+
public void setMoveDeleteHook(IMoveDeleteHook mdh) {
this.mdh = mdh;
}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java
index 19ff71428..1e5860da7 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java
@@ -14,7 +14,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.team.core.RepositoryProvider;
public class RepositoryProviderOtherSport extends RepositoryProvider {
-
+
final public static String NATURE_ID = "org.eclipse.team.tests.core.other";
/*
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java
index da06920b2..9d0491ac7 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java
@@ -44,28 +44,28 @@ public class RepositoryProviderTests extends TeamTest {
public RepositoryProviderTests() {
super();
}
-
+
public RepositoryProviderTests(String name) {
super(name);
}
-
+
public static Test suite() {
TestSuite suite = new TestSuite(RepositoryProviderTests.class);
return new TestSetup(suite);
//return new testSetup(new RepositoryProviderTests("test"));
}
-
+
public void testProvidersRegistered() throws CoreException, TeamException {
List repoProviderIds = new ArrayList(Arrays.asList(RepositoryProvider.getAllProviderTypeIds()));
assertEquals(true, repoProviderIds.contains(RepositoryProviderBic.NATURE_ID));
assertEquals(true, repoProviderIds.contains(RepositoryProviderNaish.NATURE_ID));
assertEquals(false, repoProviderIds.contains(RepositoryProviderOtherSport.NATURE_ID));
}
-
+
public void testGetProviderGeneric() throws CoreException, TeamException {
IProject project = getUniqueTestProject("testGetProviderGeneric1");
IProject project2 = getUniqueTestProject("testGetProviderGeneric2");
-
+
// test that adding a non registered provider doesn't work
boolean good = false;
try {
@@ -74,7 +74,7 @@ public class RepositoryProviderTests extends TeamTest {
good = true;
}
Assert.assertTrue(good);
-
+
// adding a valid team provider should be fine
RepositoryProvider.map(project, RepositoryProviderNaish.NATURE_ID);
RepositoryProvider.map(project2, RepositoryProviderNaish.NATURE_ID);
@@ -83,58 +83,58 @@ public class RepositoryProviderTests extends TeamTest {
Assert.assertTrue(provider1 != null && provider1.getID().equals(RepositoryProviderNaish.NATURE_ID));
Assert.assertTrue(provider2 != null && provider2.getID().equals(RepositoryProviderNaish.NATURE_ID));
Assert.assertTrue(provider1.getProject().equals(project) && provider2.getProject().equals(project2));
-
+
// remapping a provider is allowed
- RepositoryProvider.map(project, RepositoryProviderBic.NATURE_ID);
+ RepositoryProvider.map(project, RepositoryProviderBic.NATURE_ID);
provider1 = RepositoryProvider.getProvider(project);
Assert.assertTrue(provider1 != null && provider1.getID().equals(RepositoryProviderBic.NATURE_ID));
-
+
// closed or non-existant projects cannot be associated with a provider
IProject closedProject = getUniqueTestProject("testGetProviderGenericClosed");
IProject nonExistantProject = ResourcesPlugin.getWorkspace().getRoot().getProject("nonExistant");
closedProject.close(null);
Assert.assertTrue(RepositoryProvider.getProvider(closedProject) == null);
Assert.assertTrue(RepositoryProvider.getProvider(nonExistantProject) == null);
-
+
// removing the nature removes the provider association
RepositoryProvider.unmap(project);
RepositoryProvider.unmap(project2);
Assert.assertTrue(RepositoryProvider.getProvider(project) == null);
Assert.assertTrue(RepositoryProvider.getProvider(project2) == null);
}
-
+
public void testGetProviderById() throws CoreException, TeamException {
IProject project1 = getUniqueTestProject("testGetProviderById_1");
IProject project2 = getUniqueTestProject("testGetProviderById_2");
-
+
// adding a valid team provider should be fine
RepositoryProvider.map(project1, RepositoryProviderBic.NATURE_ID);
RepositoryProvider.map(project2, RepositoryProviderNaish.NATURE_ID);
Assert.assertTrue(RepositoryProvider.getProvider(project1, RepositoryProviderBic.NATURE_ID) != null);
Assert.assertTrue(RepositoryProvider.getProvider(project2, RepositoryProviderNaish.NATURE_ID) != null);
-
+
// closed or non-existant projects cannot be associated with a provider
IProject closedProject = getUniqueTestProject("testGetProviderGenericClosed");
IProject nonExistantProject = ResourcesPlugin.getWorkspace().getRoot().getProject("nonExistant");
closedProject.close(null);
Assert.assertTrue(RepositoryProvider.getProvider(closedProject, "id") == null);
Assert.assertTrue(RepositoryProvider.getProvider(nonExistantProject, "id") == null);
-
+
// removing the nature removes the provider association
RepositoryProvider.unmap(project1);
RepositoryProvider.unmap(project2);
Assert.assertTrue(RepositoryProvider.getProvider(project1, RepositoryProviderBic.NATURE_ID) == null);
Assert.assertTrue(RepositoryProvider.getProvider(project2, RepositoryProviderNaish.NATURE_ID) == null);
}
-
+
public void testFileModificationValidator() throws CoreException, TeamException {
IProject project = getUniqueTestProject("testFileModificationValidator");
-
+
// adding a valid team provider should be fine
RepositoryProvider.map(project, RepositoryProviderBic.NATURE_ID);
RepositoryProviderBic bicProvider = (RepositoryProviderBic)RepositoryProvider.getProvider(project, RepositoryProviderBic.NATURE_ID);
Assert.assertTrue(bicProvider != null);
-
+
// test that validator gets called by team core dispatching
final boolean[] called = new boolean[] {false};
bicProvider.setModificationValidator(new FileModificationValidator() {
@@ -151,7 +151,7 @@ public class RepositoryProviderTests extends TeamTest {
file.create(new ByteArrayInputStream("test".getBytes()), true, null);
file.setContents(new ByteArrayInputStream("test2".getBytes()), true, false, null);
Assert.assertTrue(called[0] == true);
-
+
// test that validator can veto a setContents
called[0] = false;
bicProvider.setModificationValidator(new FileModificationValidator() {
@@ -170,20 +170,20 @@ public class RepositoryProviderTests extends TeamTest {
} catch(CoreException e) {
Assert.assertTrue(called[0] == true);
}
-
+
// test that default validator allows the modification
bicProvider.setModificationValidator(null);
- file.setContents(new ByteArrayInputStream("test4".getBytes()), true, false, null);
+ file.setContents(new ByteArrayInputStream("test4".getBytes()), true, false, null);
}
-
+
public void testMoveDeleteHook() throws CoreException, TeamException {
final IProject project = getUniqueTestProject("testMoveDeleteHook");
-
+
// adding a valid team provider should be fine
RepositoryProvider.map(project, RepositoryProviderBic.NATURE_ID);
RepositoryProviderBic bicProvider = (RepositoryProviderBic)RepositoryProvider.getProvider(project, RepositoryProviderBic.NATURE_ID);
Assert.assertTrue(bicProvider != null);
-
+
// only testing that dispatching works, resources plugin is testing the rest of the API
final boolean[] called = new boolean[] {false, false, false, false, false, false};
IMoveDeleteHook hook = new IMoveDeleteHook() {
@@ -213,7 +213,7 @@ public class RepositoryProviderTests extends TeamTest {
}
};
bicProvider.setMoveDeleteHook(hook);
-
+
IResource[] resources = buildResources(project, new String[] {"deleteFile.txt", "moveFile.txt", "deletedFolder/", "moveFolder/"});
ensureExistsInWorkspace(resources, true);
resources[0].delete(false, null);
@@ -232,19 +232,19 @@ public class RepositoryProviderTests extends TeamTest {
Assert.assertTrue(called[i]);
}
}
-
+
public void testMoveDeleteHookBetweenProjects() throws CoreException, TeamException {
final IProject projectA = getUniqueTestProject("testMoveDeleteHookBetweenProjects_A");
final IProject projectB = getUniqueTestProject("testMoveDeleteHookBetweenProjects_B");
final IProject projectC = getUniqueTestProject("testMoveDeleteHookBetweenProjects_C");
-
+
// adding a valid team provider should be fine
RepositoryProvider.map(projectA, RepositoryProviderBic.NATURE_ID);
final RepositoryProviderBic bicProvider = (RepositoryProviderBic)RepositoryProvider.getProvider(projectA, RepositoryProviderBic.NATURE_ID);
RepositoryProvider.map(projectB, RepositoryProviderNaish.NATURE_ID);
final RepositoryProviderNaish naishProvider = (RepositoryProviderNaish)RepositoryProvider.getProvider(projectB, RepositoryProviderNaish.NATURE_ID);
Assert.assertTrue(bicProvider != null && naishProvider != null);
-
+
// only testing that dispatching works, resources plugin is testing the rest of the API
final boolean[] calledProjectA = new boolean[] {false, false};
bicProvider.setMoveDeleteHook(new IMoveDeleteHook() {
@@ -254,7 +254,7 @@ public class RepositoryProviderTests extends TeamTest {
public boolean deleteFolder(IResourceTree tree, IFolder folder, int updateFlags, IProgressMonitor monitor) {
return false;
}
- public boolean deleteProject(IResourceTree tree, IProject project, int updateFlags, IProgressMonitor monitor) {
+ public boolean deleteProject(IResourceTree tree, IProject project, int updateFlags, IProgressMonitor monitor) {
return false;
}
public boolean moveFile(IResourceTree tree, IFile source, IFile destination, int updateFlags, IProgressMonitor monitor) {
@@ -271,7 +271,7 @@ public class RepositoryProviderTests extends TeamTest {
return false;
}
});
-
+
final boolean[] calledProjectB = new boolean[] {false, false};
naishProvider.setMoveDeleteHook(new IMoveDeleteHook() {
public boolean deleteFile(IResourceTree tree, IFile file, int updateFlags, IProgressMonitor monitor) {
@@ -280,7 +280,7 @@ public class RepositoryProviderTests extends TeamTest {
public boolean deleteFolder(IResourceTree tree, IFolder folder, int updateFlags, IProgressMonitor monitor) {
return false;
}
- public boolean deleteProject(IResourceTree tree, IProject project, int updateFlags, IProgressMonitor monitor) {
+ public boolean deleteProject(IResourceTree tree, IProject project, int updateFlags, IProgressMonitor monitor) {
return false;
}
public boolean moveFile(IResourceTree tree, IFile source, IFile destination, int updateFlags, IProgressMonitor monitor) {
@@ -297,7 +297,7 @@ public class RepositoryProviderTests extends TeamTest {
return false;
}
});
-
+
// test that moving files/folders between two projects with providers calls the destination
IResource[] resources = buildResources(projectA, new String[] {"moveFile.txt", "moveFolder/"});
ensureExistsInWorkspace(resources, true);
@@ -306,7 +306,7 @@ public class RepositoryProviderTests extends TeamTest {
for (int i = 0; i < calledProjectA.length; i++) {
Assert.assertTrue(calledProjectA[i] && calledProjectB[i] == false);
}
-
+
// test that moving files/folders from a project with a provider to a project without a provider calls the
// hooks for the source
calledProjectA[0] = false; calledProjectA[1] = false;
@@ -319,18 +319,18 @@ public class RepositoryProviderTests extends TeamTest {
Assert.assertTrue(calledProjectA[i] && calledProjectB[i] == false);
}
}
-
+
public void testMapSuccess() throws CoreException, TeamException {
IProject project = getUniqueTestProject("testLinkSuccess");
buildResources(project, new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" }, true);
-
+
// Test shallow link when URI not allowed
IFolder folder = project.getFolder("link");
folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
RepositoryProviderWithLinking.setCanHandleLinking(true);
RepositoryProviderWithLinking.setCanHandleLinkedURI(false);
RepositoryProvider.map(project, RepositoryProviderWithLinking.TYPE_ID);
-
+
// Test shallow link when URI is allowed
RepositoryProvider.unmap(project);
folder.delete(false, null);
@@ -339,7 +339,7 @@ public class RepositoryProviderTests extends TeamTest {
RepositoryProviderWithLinking.setCanHandleLinking(true);
RepositoryProviderWithLinking.setCanHandleLinkedURI(true);
RepositoryProvider.map(project, RepositoryProviderWithLinking.TYPE_ID);
-
+
// Test deep link when URI is allowed
RepositoryProvider.unmap(project);
folder.delete(false, null);
@@ -349,7 +349,7 @@ public class RepositoryProviderTests extends TeamTest {
RepositoryProviderWithLinking.setCanHandleLinkedURI(true);
RepositoryProvider.map(project, RepositoryProviderWithLinking.TYPE_ID);
}
-
+
public void testLinkSuccess() throws CoreException, TeamException {
IProject project = getUniqueTestProject("testLinkSuccess");
buildResources(project, new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" }, true);
@@ -404,7 +404,7 @@ public class RepositoryProviderTests extends TeamTest {
}
if (fail)
fail("Link should be disallowed");
-
+
// Test deep failure when shallow is allowed
folder.delete(false, null);
RepositoryProviderWithLinking.setCanHandleLinking(true);
@@ -422,7 +422,7 @@ public class RepositoryProviderTests extends TeamTest {
if (fail)
fail("Link should be disallowed");
}
-
+
public void testLinkFailure() throws CoreException, TeamException {
IProject project = getUniqueTestProject("testLinkFailure");
@@ -456,7 +456,7 @@ public class RepositoryProviderTests extends TeamTest {
}
if (fail)
fail("Link should be disallowed");
-
+
// Test deep link when shallow allowed
RepositoryProviderWithLinking.setCanHandleLinking(true);
folder = project.getFolder("folder1/folder2");
@@ -472,7 +472,7 @@ public class RepositoryProviderTests extends TeamTest {
if (fail)
fail("Link should be disallowed");
}
-
+
public void testIsShared() throws CoreException, TeamException {
IProject project1 = getUniqueTestProject("testGetProviderById_1");
RepositoryProvider.map(project1, RepositoryProviderBic.NATURE_ID);
@@ -484,5 +484,5 @@ public class RepositoryProviderTests extends TeamTest {
RepositoryProvider.unmap(project1);
Assert.assertTrue(!RepositoryProvider.isShared(project1));
}
-
+
}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderWithLinking.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderWithLinking.java
index 8038d5b7b..0cf9e00b2 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderWithLinking.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderWithLinking.java
@@ -17,13 +17,13 @@ import org.eclipse.team.core.RepositoryProvider;
* This class is used to text resource linking
*/
public class RepositoryProviderWithLinking extends RepositoryProvider {
-
+
final public static String TYPE_ID = "org.eclipse.team.tests.core.linking";
-
+
private static boolean canHandleLinking = false;
private static boolean canHandleLinkedURI;
-
+
/**
* @see org.eclipse.team.core.RepositoryProvider#configureProject()
*/
@@ -51,11 +51,11 @@ public class RepositoryProviderWithLinking extends RepositoryProvider {
public boolean canHandleLinkedResources() {
return canHandleLinking;
}
-
+
public static void setCanHandleLinkedURI(boolean canHandleLinkedURI) {
RepositoryProviderWithLinking.canHandleLinkedURI = canHandleLinkedURI;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.RepositoryProvider#canHandleLinkedResourceURI()
*/
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StorageMergerTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StorageMergerTests.java
index a45bbf41c..26ed691d6 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StorageMergerTests.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StorageMergerTests.java
@@ -21,20 +21,20 @@ public class StorageMergerTests extends TeamTest {
public StorageMergerTests() {
super();
}
-
+
public StorageMergerTests(String name) {
super(name);
}
-
+
public static Test suite() {
return suite(StorageMergerTests.class);
}
-
+
public void testGetByExtension() {
IStorageMerger merger = new Team().createStorageMerger("blah");
assertNotNull("Merger for extension is missing", merger);
}
-
+
public void testGetByContentType() {
IStorageMerger merger = new Team().createStorageMerger(Platform.getContentTypeManager().getContentType("org.eclipse.team.tests.core.content-type1"));
assertNotNull("Merger for extension is missing", merger);
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java
index 3dbe2b749..1a7d42b65 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java
@@ -60,7 +60,7 @@ public class StreamTests extends TestCase {
testLFtoCRLFTranslation("The \r\n quick brown \n fox \r\n\n\r\r\n jumped \n\n over \r\n the \n lazy dog.\r\n",
"The \r\r\n quick brown \r\n fox \r\r\n\r\n\r\r\r\n jumped \r\n\r\n over \r\r\n the \r\n lazy dog.\r\r\n");
}
-
+
private void testLFtoCRLFTranslation(String pre, String post) throws IOException {
ByteArrayInputStream bin = new ByteArrayInputStream(pre.getBytes());
InputStream in = new LFtoCRLFInputStream(bin);
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TestStorageMerger.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TestStorageMerger.java
index 6a1a1cd91..4ea59fa5f 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TestStorageMerger.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TestStorageMerger.java
@@ -17,7 +17,7 @@ import org.eclipse.core.runtime.*;
import org.eclipse.team.core.mapping.IStorageMerger;
public class TestStorageMerger implements IStorageMerger {
-
+
public static final String MERGE_FAILURE = "merge failed";
public boolean canMergeWithoutAncestor() {
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeBuildingTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeBuildingTests.java
index c4ad7f68f..a880c04fd 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeBuildingTests.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeBuildingTests.java
@@ -32,7 +32,7 @@ public class ScopeBuildingTests extends TeamTest {
private class TestResourceMappingOperation extends ModelOperation {
protected TestResourceMappingOperation(ResourceMapping[] selectedMappings, final ResourceMapping[] additionalMappings) {
- super(null, new SynchronizationScopeManager("", selectedMappings, ResourceMappingContext.LOCAL_CONTEXT, false) {
+ super(null, new SynchronizationScopeManager("", selectedMappings, ResourceMappingContext.LOCAL_CONTEXT, false) {
public void initialize(
IProgressMonitor monitor) throws CoreException {
super.initialize(monitor);
@@ -57,11 +57,11 @@ public class ScopeBuildingTests extends TeamTest {
// Do nothing since we're just testing the scope build
}
}
-
+
public static Test suite() {
return suite(ScopeBuildingTests.class);
}
-
+
public ScopeBuildingTests() {
super();
}
@@ -69,7 +69,7 @@ public class ScopeBuildingTests extends TeamTest {
public ScopeBuildingTests(String name) {
super(name);
}
-
+
private void expectPrompt(TestResourceMappingOperation op) {
try {
op.run(new NullProgressMonitor());
@@ -84,39 +84,39 @@ public class ScopeBuildingTests extends TeamTest {
}
fail("Expected prompt did not occur");
}
-
+
private ResourceMapping getMapping(final IProject project, final IResource[] resources, final int depth) {
return new ResourceMapping() {
-
+
public ResourceTraversal[] getTraversals(ResourceMappingContext context,
IProgressMonitor monitor) throws CoreException {
return new ResourceTraversal[] { new ResourceTraversal(resources, depth, IResource.NONE)};
}
-
+
public IProject[] getProjects() {
return new IProject[] { project };
}
-
+
public Object getModelObject() {
return new Object();
}
-
+
public String getModelProviderId() {
return TEST_MODEL_PROVIDER_ID;
}
public boolean contains(ResourceMapping mapping) {
return false;
}
-
+
};
}
-
+
public void testAdditionalResources() throws CoreException {
IProject project = createProject(new String[]{"file.txt", "folder1/file2.txt", "folder1/folder2/file3.txt", "folder3/"});
- ResourceMapping[] mappings = new ResourceMapping[] {
+ ResourceMapping[] mappings = new ResourceMapping[] {
getMapping(project, new IResource[] { project.getFolder("folder1") }, IResource.DEPTH_INFINITE)
};
- ResourceMapping[] additionalMappings = new ResourceMapping[] {
+ ResourceMapping[] additionalMappings = new ResourceMapping[] {
getMapping(project, new IResource[] { project.getFile("file.txt")}, IResource.DEPTH_INFINITE)
};
TestResourceMappingOperation op = new TestResourceMappingOperation(mappings, additionalMappings);
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTestSubscriber.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTestSubscriber.java
index 04fd888e7..294778460 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTestSubscriber.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTestSubscriber.java
@@ -36,7 +36,7 @@ public class ScopeTestSubscriber extends Subscriber {
public boolean compare(IResource local, IResourceVariant remote) {
return false;
}
-
+
};
}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTests.java
index 9e53219ea..f5d642b32 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTests.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTests.java
@@ -30,7 +30,7 @@ public class ScopeTests extends TeamTest {
private IProject project1, project2, project3;
private IWorkingSet workingSet;
private SubscriberScopeManager manager;
-
+
public ScopeTests() {
super();
}
@@ -38,7 +38,7 @@ public class ScopeTests extends TeamTest {
public ScopeTests(String name) {
super(name);
}
-
+
protected void setUp() throws Exception {
super.setUp();
project1 = createProject("p1", new String[]{"file.txt"});
@@ -48,7 +48,7 @@ public class ScopeTests extends TeamTest {
workingSet = manager.createWorkingSet("TestWS", new IProject[] { project1 });
manager.addWorkingSet(workingSet);
}
-
+
protected void tearDown() throws Exception {
super.tearDown();
this.manager.dispose();
@@ -57,7 +57,7 @@ public class ScopeTests extends TeamTest {
IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
manager.removeWorkingSet(workingSet);
}
-
+
private void assertProperContainment(ISynchronizationScopeManager sm) throws OperationCanceledException, InterruptedException {
waitForManager(sm);
testProjectContainment(sm, project1);
@@ -97,7 +97,7 @@ public class ScopeTests extends TeamTest {
waitForManager(manager);
return manager;
}
-
+
public void testScopeExpansion() throws CoreException, OperationCanceledException, InterruptedException {
ISynchronizationScopeManager sm = createScopeManager();
assertProperContainment(sm);
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/Bug_217673.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/Bug_217673.java
index 82a66e173..0a5fdc88f 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/Bug_217673.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/Bug_217673.java
@@ -4,7 +4,7 @@
* 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/DoNotRemoveTest.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/DoNotRemoveTest.java
index 58b61a2c1..8d0cc763a 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/DoNotRemoveTest.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/DoNotRemoveTest.java
@@ -4,7 +4,7 @@
* 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/PessimisticRepositoryProvider.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/PessimisticRepositoryProvider.java
index e65f5dab1..85e1dd770 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/PessimisticRepositoryProvider.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/PessimisticRepositoryProvider.java
@@ -27,16 +27,16 @@ import org.eclipse.team.core.RepositoryProvider;
*/
public class PessimisticRepositoryProvider extends RepositoryProvider implements IFileModificationValidator {
private static PessimisticRepositoryProvider soleInstance;
-
+
public static final String NATURE_ID = "org.eclipse.team.tests.core.regression.pessimistic-provider";
-
+
public static boolean markWritableOnEdit;
public static boolean markWritableOnSave;
public PessimisticRepositoryProvider() {
soleInstance = this;
}
-
+
public void configureProject() {
}
@@ -55,7 +55,7 @@ public class PessimisticRepositoryProvider extends RepositoryProvider implements
public IFileModificationValidator getFileModificationValidator() {
return soleInstance;
}
-
+
public IStatus validateEdit(final IFile[] files, Object context) {
if (markWritableOnEdit) {
try {
@@ -76,7 +76,7 @@ public class PessimisticRepositoryProvider extends RepositoryProvider implements
e.printStackTrace();
return e.getStatus();
}
- }
+ }
return Status.OK_STATUS;
}
@@ -97,7 +97,7 @@ public class PessimisticRepositoryProvider extends RepositoryProvider implements
if (resourceAttributes != null) {
resourceAttributes.setReadOnly(readOnly);
resource.setResourceAttributes(resourceAttributes);
- }
+ }
}
public boolean isReadOnly(IResource resource) throws CoreException {
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 7591d873a..60aad58dd 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
@@ -56,7 +56,7 @@ public class SaveableCompareEditorInputTest extends TeamTest {
private static final String COMPARE_EDITOR = CompareUIPlugin.PLUGIN_ID
+ ".CompareEditor"; //$NON-NLS-1$
-
+
private IFile file1;
private IFile file2;
private String appendFileContents = "_append";
@@ -334,7 +334,7 @@ public class SaveableCompareEditorInputTest extends TeamTest {
* handled, see javadoc to SaveableCompareEditorInput.
*/
}
-
+
private void verifyModifyAndSaveBothSidesOfCompareEditor(String extention)
throws InterruptedException, InvocationTargetException,
IllegalArgumentException, SecurityException,
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java
index 360d989b3..fd9a8b26a 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java
@@ -32,7 +32,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
public class ResourceContentTests extends TeamTest {
public static class TestableResourceModelContentProvider extends ResourceModelContentProvider {
-
+
private final ISynchronizationScope scope;
private final ISynchronizationContext context;
private final ISynchronizePageConfiguration configuration;
@@ -55,13 +55,13 @@ public class ResourceContentTests extends TeamTest {
return scope;
}
}
-
+
public static Test suite() {
return suite(ResourceContentTests.class);
}
private ResourceModelContentProvider provider;
-
+
public ResourceContentTests() {
super();
}
@@ -69,12 +69,12 @@ public class ResourceContentTests extends TeamTest {
public ResourceContentTests(String name) {
super(name);
}
-
+
protected void setUp() throws Exception {
initializeProvider(null, null, null);
super.setUp();
}
-
+
protected void tearDown() throws Exception {
cleanupProvider();
super.tearDown();
@@ -84,17 +84,17 @@ public class ResourceContentTests extends TeamTest {
cleanupProvider();
provider = new TestableResourceModelContentProvider(scope, context, configuration);
}
-
+
private void cleanupProvider() {
if (provider != null)
provider.dispose();
provider = null;
}
-
+
private void assertContentMatches(IProject project, String[] leaves) {
assertContentsMatch(asResources(project, leaves));
}
-
+
private void assertContentsMatch(IResource[] resources) {
Set paths = getPaths(ResourcesPlugin.getWorkspace().getRoot());
Set resourceSet = new HashSet();
@@ -129,9 +129,9 @@ public class ResourceContentTests extends TeamTest {
}
return result;
}
-
+
private Set getPaths(ResourceModelContentProvider provider, TreePath path) {
- Object[] children = provider.getChildren(path);
+ Object[] children = provider.getChildren(path);
Set result = new HashSet();
if (children.length == 0)
result.add(path);
@@ -186,11 +186,11 @@ public class ResourceContentTests extends TeamTest {
files = new String[] {".project", "file.txt", "file2.txt", "folder1/file3.txt", "folder1/folder2/file4.txt"};
assertContentMatches(project, files);
}
-
+
public void testFileChange() throws CoreException {
// String[] files = new String[] {"file.txt", "file2.txt", "folder1/file3.txt", "folder1/folder2/file4.txt"};
// IProject project = createProject(files);
-
+
}

Back to the top