Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Salinas2012-03-15 21:11:47 -0400
committerVivian Kong2012-03-15 21:11:47 -0400
commitd18cb3e07ccdad1b602b616065f6b02f25472d0e (patch)
tree5074d2fcdb5120463a261701ad37715d1981f640 /core/org.eclipse.cdt.core.tests
parent12d44ec8becdf85fbc87e8e0da7fde7bd5d3a3ac (diff)
downloadorg.eclipse.cdt-d18cb3e07ccdad1b602b616065f6b02f25472d0e.tar.gz
org.eclipse.cdt-d18cb3e07ccdad1b602b616065f6b02f25472d0e.tar.xz
org.eclipse.cdt-d18cb3e07ccdad1b602b616065f6b02f25472d0e.zip
Bug 374442 - Refresh resource by build configuration
Diffstat (limited to 'core/org.eclipse.cdt.core.tests')
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/RefreshScopeTests.java297
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/TestExclusion.java9
2 files changed, 205 insertions, 101 deletions
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/RefreshScopeTests.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/RefreshScopeTests.java
index 7a6384022c..77b493ea86 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/RefreshScopeTests.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/RefreshScopeTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2012 IBM Corporation 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
@@ -12,6 +12,7 @@ package org.eclipse.cdt.core.resources.tests;
import java.io.File;
import java.io.IOException;
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@@ -54,6 +55,7 @@ public class RefreshScopeTests extends TestCase {
private IFolder fFolder4;
private IFolder fFolder5;
private IFolder fFolder6;
+ private String config1,config2;
/* (non-Javadoc)
* @see junit.framework.TestCase#setUp()
@@ -74,6 +76,9 @@ public class RefreshScopeTests extends TestCase {
IWorkspaceRoot root = CTestPlugin.getWorkspace().getRoot();
IProject project = root.getProject("testRefreshScope");
+ config1 = "Debug";
+ config2 = "Release";
+
// create some folders
// structure is:
/*
@@ -123,56 +128,80 @@ public class RefreshScopeTests extends TestCase {
}
public void testAddDeleteResource() throws CoreException {
-
RefreshScopeManager manager = RefreshScopeManager.getInstance();
manager.clearAllData();
- manager.addResourceToRefresh(fProject, fFolder1);
-
- IResource[] resources = manager.getResourcesToRefresh(fProject).toArray(new IResource[0]);
- assertEquals(resources.length, 1);
- assertEquals(fFolder1, resources[0]);
-
- manager.addResourceToRefresh(fProject, fFolder2);
- resources = manager.getResourcesToRefresh(fProject).toArray(new IResource[0]);
- assertEquals(resources.length, 2);
- assertEquals(fFolder1, resources[0]);
- assertEquals(fFolder2, resources[1]);
-
- // first try deleting a resource that was never added... the project
- manager.deleteResourceToRefresh(fProject, fProject);
- IResource[] resourcesAfterDelete = manager.getResourcesToRefresh(fProject).toArray(new IResource[0]);
- assertEquals(resourcesAfterDelete.length, 2);
- assertEquals(fFolder1, resources[0]);
- assertEquals(fFolder2, resources[1]);
-
+ // TEST 1:
+ // add resource "folder1" under config1.
+ manager.addResourceToRefresh(fProject, config1, fFolder1);
+ // now, check that it was added.
+ IResource[] config1_resources = manager.getResourcesToRefresh(fProject, config1).toArray(new IResource[0]);
+ assertEquals(config1_resources.length, 2);
+ assertEquals(fFolder1, config1_resources[1]);
+
+ // TEST 2:
+ // add resource "folder2" under config1
+ manager.addResourceToRefresh(fProject, config1, fFolder2);
+ // now check to see that it and "folder1" are still there.
+ config1_resources = manager.getResourcesToRefresh(fProject, config1).toArray(new IResource[0]);
+ assertEquals(config1_resources.length, 3); // 3 because by default the project is always there.
+ assertEquals(fFolder2, config1_resources[0]);
+ assertEquals(fFolder1, config1_resources[2]);
+ // make sure it wasn't added under "Release", which should be empty now.
+ IResource[] config2_resources = manager.getResourcesToRefresh(fProject, config2).toArray(new IResource[0]);
+ assertEquals(config2_resources.length,1); // 1 because project is there by default.
+ assertEquals(fProject,config2_resources[0]);
+ // and add one under config 2.
+ manager.addResourceToRefresh(fProject, config2, fFolder1);
+ config2_resources = manager.getResourcesToRefresh(fProject, config2).toArray(new IResource[0]);
+ assertEquals(config2_resources.length,2);
+ assertEquals(fFolder1, config2_resources[1]);
+
+ // TEST 3:
+ // first try deleting a resource that was never added... folder5
+ manager.deleteResourceToRefresh(fProject, config1, fFolder5);
+ IResource[] config1_resourcesAfterDelete = manager.getResourcesToRefresh(fProject, config1).toArray(new IResource[0]);
+ assertEquals(config1_resourcesAfterDelete.length, 3);
+ assertEquals(fFolder2, config1_resources[0]);
+ assertEquals(fFolder1, config1_resources[2]);
+ // ditto for config2, but this time we did add the resource, to make sure fFolder1 wasn't added.
+ manager.deleteResourceToRefresh(fProject, config2, fFolder5);
+ IResource[] config2_resourcesAfterDelete = manager.getResourcesToRefresh(fProject, config2).toArray(new IResource[0]);
+ assertEquals(config2_resourcesAfterDelete.length, 2);
+
+ // TEST 4:
// now delete the resources from the manager one by one
- manager.deleteResourceToRefresh(fProject, resources[1]);
- resourcesAfterDelete = manager.getResourcesToRefresh(fProject).toArray(new IResource[0]);
- assertEquals(resourcesAfterDelete.length, 1);
- assertEquals(resourcesAfterDelete[0], resources[0]);
-
- manager.deleteResourceToRefresh(fProject, resources[0]);
- resourcesAfterDelete = manager.getResourcesToRefresh(fProject).toArray(new IResource[0]);
- assertEquals(resourcesAfterDelete.length, 0);
-
+ manager.deleteResourceToRefresh(fProject, config1, config1_resources[2]);
+ config1_resourcesAfterDelete = manager.getResourcesToRefresh(fProject, config1).toArray(new IResource[0]);
+ assertEquals(config1_resourcesAfterDelete.length, 2);
+ assertEquals(config1_resourcesAfterDelete[1], config1_resources[1]);
+
+ manager.deleteResourceToRefresh(fProject, config1, config1_resources[0]);
+ config1_resourcesAfterDelete = manager.getResourcesToRefresh(fProject, config1).toArray(new IResource[0]);
+ assertEquals(config1_resourcesAfterDelete.length, 1);
+
+ // and ditto for config2
+ manager.deleteResourceToRefresh(fProject, config2, config2_resources[0]);
+ config2_resourcesAfterDelete = manager.getResourcesToRefresh(fProject, config2).toArray(new IResource[0]);
+ assertEquals(config2_resourcesAfterDelete.length, 1);
}
- public void testSetResourcesToRefresh() {
+
+ public void testSetResourcesToExclusionsMapRefresh() {
RefreshScopeManager manager = RefreshScopeManager.getInstance();
manager.clearAllData();
- List<IResource> resources = new LinkedList<IResource>();
- resources.add(fFolder1);
- resources.add(fFolder2);
- manager.setResourcesToRefresh(fProject, resources);
+ HashMap<IResource, List<RefreshExclusion>> config1_resourceMap = new HashMap<IResource, List<RefreshExclusion>>();
+ config1_resourceMap.put(fFolder1,new LinkedList<RefreshExclusion>());
+ config1_resourceMap.put(fFolder2,new LinkedList<RefreshExclusion>());
+ manager.setResourcesToExclusionsMap(fProject, config1, config1_resourceMap);
- IResource[] resourcesAfterSet = manager.getResourcesToRefresh(fProject).toArray(new IResource[0]);
- assertEquals(resourcesAfterSet.length, 2);
- assertEquals(fFolder1, resourcesAfterSet[0]);
- assertEquals(fFolder2, resourcesAfterSet[1]);
+ IResource[] config1_resourcesAfterSet = manager.getResourcesToRefresh(fProject, config1).toArray(new IResource[0]);
+ assertEquals(config1_resourcesAfterSet.length, 2);
+ assertEquals(fFolder2, config1_resourcesAfterSet[0]);
+ assertEquals(fFolder1, config1_resourcesAfterSet[1]);
manager.clearResourcesToRefresh(fProject);
@@ -182,28 +211,31 @@ public class RefreshScopeTests extends TestCase {
RefreshScopeManager manager = RefreshScopeManager.getInstance();
manager.clearAllData();
- manager.addResourceToRefresh(fProject, fProject);
- RefreshExclusion exclusion1 = new TestExclusion();
- manager.addExclusion(fProject, exclusion1);
- RefreshExclusion exclusion2 = new TestExclusion();
- manager.addExclusion(fProject, exclusion2);
+ IResource config1_resource = fProject;
+
+
+ manager.addResourceToRefresh(fProject, config1, config1_resource);
+ RefreshExclusion config1_exclusion1 = new TestExclusion();
+ manager.addExclusion(fProject, config1, config1_resource, config1_exclusion1);
+ RefreshExclusion config1_exclusion2 = new TestExclusion();
+ manager.addExclusion(fProject, config1, config1_resource, config1_exclusion2);
// make sure the exclusions are there
- List<RefreshExclusion> exclusionsList = manager.getExclusions(fProject);
+ List<RefreshExclusion> exclusionsList = manager.getExclusions(fProject, config1, config1_resource);
RefreshExclusion[] exclusionsArray = exclusionsList.toArray(new RefreshExclusion[0]);
assertEquals(exclusionsArray.length, 2);
- assertEquals(exclusionsArray[0], exclusion1);
- assertEquals(exclusionsArray[1], exclusion2);
+ assertEquals(exclusionsArray[0], config1_exclusion1);
+ assertEquals(exclusionsArray[1], config1_exclusion2);
// remove the exclusions one by one
- manager.removeExclusion(fProject, exclusion2);
- exclusionsList = manager.getExclusions(fProject);
+ manager.removeExclusion(fProject, config1, config1_resource, config1_exclusion2);
+ exclusionsList = manager.getExclusions(fProject,config1,config1_resource);
exclusionsArray = exclusionsList.toArray(new RefreshExclusion[0]);
assertEquals(exclusionsArray.length, 1);
- assertEquals(exclusionsArray[0], exclusion1);
+ assertEquals(exclusionsArray[0], config1_exclusion1);
- manager.removeExclusion(fProject, exclusion1);
- exclusionsList = manager.getExclusions(fProject);
+ manager.removeExclusion(fProject, config1, config1_resource, config1_exclusion1);
+ exclusionsList = manager.getExclusions(fProject, config1,config1_resource);
exclusionsArray = exclusionsList.toArray(new RefreshExclusion[0]);
assertEquals(exclusionsArray.length, 0);
@@ -213,24 +245,46 @@ public class RefreshScopeTests extends TestCase {
RefreshScopeManager manager = RefreshScopeManager.getInstance();
manager.clearAllData();
- manager.addResourceToRefresh(fProject, fProject);
+ IResource config1_resource = fProject;
+ IResource config2_resource = fFolder1;
+
+ //add a resource and two exclusions for config1.
+ manager.addResourceToRefresh(fProject, config1, config1_resource);
+ RefreshExclusion config1_exclusion1 = new TestExclusion();
+ manager.addExclusion(fProject, config1, config1_resource, config1_exclusion1);
+ RefreshExclusion config1_exclusion2 = new TestExclusion();
+ manager.addExclusion(fProject, config1, config1_resource, config1_exclusion2);
- RefreshExclusion exclusion1 = new TestExclusion();
- manager.addExclusion(fProject, exclusion1);
- RefreshExclusion exclusion2 = new TestExclusion();
- manager.addExclusion(fProject, exclusion2);
+ // add a nested exclusion to the first exclusion
+ RefreshExclusion config1_exclusion3 = new TestExclusion();
+ config1_exclusion1.addNestedExclusion(config1_exclusion3);
+
+ // add an instance to the second exclusion
+ ExclusionInstance config1_instance = new ExclusionInstance();
+ config1_instance.setDisplayString("foo");
+ config1_instance.setResource(fFolder2);
+ config1_instance.setExclusionType(ExclusionType.RESOURCE);
+ config1_instance.setParentExclusion(config1_exclusion2);
+ config1_exclusion2.addExclusionInstance(config1_instance);
+
+ //add a resource and two exclusions for config2.
+ manager.addResourceToRefresh(fProject, config2, config2_resource);
+ RefreshExclusion config2_exclusion1 = new TestExclusion();
+ manager.addExclusion(fProject, config2, config2_resource, config2_exclusion1);
+ RefreshExclusion config2_exclusion2 = new TestExclusion();
+ manager.addExclusion(fProject, config2, config2_resource, config2_exclusion2);
// add a nested exclusion to the first exclusion
- RefreshExclusion exclusion3 = new TestExclusion();
- exclusion1.addNestedExclusion(exclusion3);
+ RefreshExclusion config2_exclusion3 = new TestExclusion();
+ config2_exclusion1.addNestedExclusion(config2_exclusion3);
// add an instance to the second exclusion
- ExclusionInstance instance = new ExclusionInstance();
- instance.setDisplayString("foo");
- instance.setResource(fFolder2);
- instance.setExclusionType(ExclusionType.RESOURCE);
- instance.setParentExclusion(exclusion2);
- exclusion2.addExclusionInstance(instance);
+ ExclusionInstance config2_instance = new ExclusionInstance();
+ config2_instance.setDisplayString("foo");
+ config2_instance.setResource(fFolder2);
+ config2_instance.setExclusionType(ExclusionType.RESOURCE);
+ config2_instance.setParentExclusion(config2_exclusion2);
+ config2_exclusion2.addExclusionInstance(config1_instance);
ICProjectDescription projectDescription = CCorePlugin.getDefault().getProjectDescription(fProject, true);
@@ -251,53 +305,96 @@ public class RefreshScopeTests extends TestCase {
fail();
}
- // make sure we got the same stuff we saved
+ // make sure we got the same stuff we saved for config1
+
+ // the project should be set to refresh its root
+ List<IResource> config1_resources = manager.getResourcesToRefresh(fProject,config1);
+ assertEquals(config1_resources.size(), 1);
+ assertEquals(config1_resources.toArray(new IResource[0])[0], config1_resource);
+
+ // there should be 2 top-level exclusions
+ List<RefreshExclusion> config1_exclusions = manager.getExclusions(fProject, config1,config1_resource);
+ assertEquals(2, config1_exclusions.size());
+ RefreshExclusion[] config1_exclusionsArray = config1_exclusions.toArray(new RefreshExclusion[0]);
+
+ // both exclusions should have parent resource set to the project
+ assertEquals(config1_resource, config1_exclusionsArray[0].getParentResource());
+ assertEquals(config1_resource, config1_exclusionsArray[1].getParentResource());
+ // the first exclusion should have one nested exclusion
+ List<RefreshExclusion> config1_nestedExclusions1 = config1_exclusionsArray[0].getNestedExclusions();
+ assertEquals(config1_nestedExclusions1.size(), 1);
+ RefreshExclusion[] config1_nestedExclusionsArray = config1_nestedExclusions1.toArray(new RefreshExclusion[0]);
+ // the nested exclusion should have its parent exclusion set properly
+ assertEquals(config1_nestedExclusionsArray[0].getParentExclusion(), config1_exclusionsArray[0]);
+
+ // the second exclusion should have no nested exclusions
+ List<RefreshExclusion> config1_nestedExclusions2 = config1_exclusionsArray[1].getNestedExclusions();
+ assertEquals(config1_nestedExclusions2.size(), 0);
+
+ // the second exclusion should have an instance
+ List<ExclusionInstance> config1_instances = config1_exclusionsArray[1].getExclusionInstances();
+ assertEquals(1, config1_instances.size());
+ ExclusionInstance[] config1_instancesArray = config1_instances.toArray(new ExclusionInstance[0]);
+ ExclusionInstance config1_loadedInstance = config1_instancesArray[0];
+
+ // check the contents of the instance
+ assertEquals("foo", config1_loadedInstance.getDisplayString());
+ assertEquals(fFolder2, config1_loadedInstance.getResource());
+ assertEquals(ExclusionType.RESOURCE, config1_loadedInstance.getExclusionType());
+
+ // clear data for config1
+ manager.deleteResourceToRefresh(fProject, config1, config1_resource);
+
+ // make sure we got the same stuff we saved for config2
// the project should be set to refresh its root
- List<IResource> resources = manager.getResourcesToRefresh(fProject);
- assertEquals(resources.size(), 1);
- assertEquals(resources.toArray(new IResource[0])[0], fProject);
+ List<IResource> config2_resources = manager.getResourcesToRefresh(fProject,config2);
+ assertEquals(config2_resources.size(), 2);
+ assertEquals(config2_resources.toArray(new IResource[0])[1], config2_resource);
// there should be 2 top-level exclusions
- List<RefreshExclusion> exclusions = manager.getExclusions(fProject);
- assertEquals(2, exclusions.size());
- RefreshExclusion[] exclusionsArray = exclusions.toArray(new RefreshExclusion[0]);
+ List<RefreshExclusion> config2_exclusions = manager.getExclusions(fProject,config2,config2_resource);
+ assertEquals(2, config2_exclusions.size());
+ RefreshExclusion[] config2_exclusionsArray = config2_exclusions.toArray(new RefreshExclusion[0]);
// both exclusions should have parent resource set to the project
- assertEquals(fProject, exclusionsArray[0].getParentResource());
- assertEquals(fProject, exclusionsArray[1].getParentResource());
+ assertEquals(config2_resource, config2_exclusionsArray[0].getParentResource());
+ assertEquals(config2_resource, config2_exclusionsArray[1].getParentResource());
// the first exclusion should have one nested exclusion
- List<RefreshExclusion> nestedExclusions1 = exclusionsArray[0].getNestedExclusions();
- assertEquals(nestedExclusions1.size(), 1);
- RefreshExclusion[] nestedExclusionsArray = nestedExclusions1.toArray(new RefreshExclusion[0]);
+ List<RefreshExclusion> config2_nestedExclusions1 = config2_exclusionsArray[0].getNestedExclusions();
+ assertEquals(config2_nestedExclusions1.size(), 1);
+ RefreshExclusion[] config2_nestedExclusionsArray = config2_nestedExclusions1.toArray(new RefreshExclusion[0]);
// the nested exclusion should have its parent exclusion set properly
- assertEquals(nestedExclusionsArray[0].getParentExclusion(), exclusionsArray[0]);
+ assertEquals(config2_nestedExclusionsArray[0].getParentExclusion(), config2_exclusionsArray[0]);
// the second exclusion should have no nested exclusions
- List<RefreshExclusion> nestedExclusions2 = exclusionsArray[1].getNestedExclusions();
- assertEquals(nestedExclusions2.size(), 0);
+ List<RefreshExclusion> config2_nestedExclusions2 = config2_exclusionsArray[1].getNestedExclusions();
+ assertEquals(config2_nestedExclusions2.size(), 0);
// the second exclusion should have an instance
- List<ExclusionInstance> instances = exclusionsArray[1].getExclusionInstances();
- assertEquals(1, instances.size());
- ExclusionInstance[] instancesArray = instances.toArray(new ExclusionInstance[0]);
- ExclusionInstance loadedInstance = instancesArray[0];
+ List<ExclusionInstance> config2_instances = config2_exclusionsArray[1].getExclusionInstances();
+ assertEquals(1, config2_instances.size());
+ ExclusionInstance[] config2_instancesArray = config2_instances.toArray(new ExclusionInstance[0]);
+ ExclusionInstance config2_loadedInstance = config2_instancesArray[0];
// check the contents of the instance
- assertEquals("foo", loadedInstance.getDisplayString());
- assertEquals(fFolder2, loadedInstance.getResource());
- assertEquals(ExclusionType.RESOURCE, loadedInstance.getExclusionType());
+ assertEquals("foo", config2_loadedInstance.getDisplayString());
+ assertEquals(fFolder2, config2_loadedInstance.getResource());
+ assertEquals(ExclusionType.RESOURCE, config2_loadedInstance.getExclusionType());
// cleanup
manager.clearAllData();
}
+
public void testResourceExclusion() {
RefreshScopeManager manager = RefreshScopeManager.getInstance();
manager.clearAllData();
- manager.addResourceToRefresh(fProject, fProject);
+ IResource config1_resource = fProject;
+
+ manager.addResourceToRefresh(fProject, config1, config1_resource);
// create a series of nested exclusions that include/exclude certain folders
// will be included/excluded as follows
@@ -319,7 +416,7 @@ public class RefreshScopeTests extends TestCase {
ExclusionInstance instance2 = new ExclusionInstance();
instance2.setResource(fFolder2);
exclusion1.addExclusionInstance(instance2);
- manager.addExclusion(fProject, exclusion1);
+ manager.addExclusion(fProject, config1, config1_resource, exclusion1);
ResourceExclusion exclusion2 = new ResourceExclusion();
ExclusionInstance instance3 = new ExclusionInstance();
@@ -335,13 +432,13 @@ public class RefreshScopeTests extends TestCase {
// now check and see if the right folders are included/excluded
- assertEquals(true, manager.shouldResourceBeRefreshed(fProject));
- assertEquals(false, manager.shouldResourceBeRefreshed(fFolder1));
- assertEquals(false, manager.shouldResourceBeRefreshed(fFolder2));
- assertEquals(true, manager.shouldResourceBeRefreshed(fFolder3));
- assertEquals(false, manager.shouldResourceBeRefreshed(fFolder4));
- assertEquals(true, manager.shouldResourceBeRefreshed(fFolder5));
- assertEquals(false, manager.shouldResourceBeRefreshed(fFolder6));
+ assertEquals(true, manager.shouldResourceBeRefreshed(config1, config1_resource));
+ assertEquals(false, manager.shouldResourceBeRefreshed(config1, fFolder1));
+ assertEquals(false, manager.shouldResourceBeRefreshed(config1, fFolder2));
+ assertEquals(true, manager.shouldResourceBeRefreshed(config1, fFolder3));
+ assertEquals(false, manager.shouldResourceBeRefreshed(config1, fFolder4));
+ assertEquals(true, manager.shouldResourceBeRefreshed(config1, fFolder5));
+ assertEquals(false, manager.shouldResourceBeRefreshed(config1, fFolder6));
// now let's create a bunch of files in these directories using java.io.File (so that we don't get
// resource deltas happening), and refresh the project according to the policy. We should only see the files
@@ -412,13 +509,13 @@ public class RefreshScopeTests extends TestCase {
manager.clearAllData();
// by default, a project should refresh its root
- List<IResource> resourcesToRefresh = manager.getResourcesToRefresh(fProject);
+ List<IResource> resourcesToRefresh = manager.getResourcesToRefresh(fProject, config1);
assertEquals(1, resourcesToRefresh.size());
IResource[] resourceArray = resourcesToRefresh.toArray(new IResource[0]);
assertEquals(fProject, resourceArray[0]);
// there should be no exclusions
- List<RefreshExclusion> exclusions = manager.getExclusions(fProject);
+ List<RefreshExclusion> exclusions = manager.getExclusions(fProject, config1, fProject);
assertEquals(0, exclusions.size());
ICProjectDescription projectDescription = CCorePlugin.getDefault().getProjectDescription(fProject);
@@ -440,12 +537,12 @@ public class RefreshScopeTests extends TestCase {
// test the defaults again
// by default, a project should refresh its root
- resourcesToRefresh = manager.getResourcesToRefresh(fProject);
+ resourcesToRefresh = manager.getResourcesToRefresh(fProject, config1);
assertEquals(1, resourcesToRefresh.size());
resourceArray = resourcesToRefresh.toArray(new IResource[0]);
assertEquals(fProject, resourceArray[0]);
// there should be no exclusions
- exclusions = manager.getExclusions(fProject);
+ exclusions = manager.getExclusions(fProject, config1, fProject);
assertEquals(0, exclusions.size());
}
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/TestExclusion.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/TestExclusion.java
index 79a5ad5c83..50505af5b5 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/TestExclusion.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/TestExclusion.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2012 IBM Corporation 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
@@ -31,4 +31,11 @@ public class TestExclusion extends RefreshExclusion {
public boolean supportsExclusionInstances() {
return false;
}
+
+ @Override
+ public Object clone() {
+ TestExclusion clone = new TestExclusion();
+ copyTo(clone);
+ return clone;
+ }
} \ No newline at end of file

Back to the top