Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 172888 Details for
Bug 318162
[backport] Resource filters do not work in CDT 7.0 projects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
JUnit test
patch317783.txt (text/plain), 2.79 KB, created by
Serge Beauchamp
on 2010-06-28 07:02:43 EDT
(
hide
)
Description:
JUnit test
Filename:
MIME Type:
Creator:
Serge Beauchamp
Created:
2010-06-28 07:02:43 EDT
Size:
2.79 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.core.tests.resources >Index: src/org/eclipse/core/tests/resources/FilteredResourceTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/FilteredResourceTest.java,v >retrieving revision 1.18 >diff -u -r1.18 FilteredResourceTest.java >--- src/org/eclipse/core/tests/resources/FilteredResourceTest.java 9 Apr 2010 13:29:52 -0000 1.18 >+++ src/org/eclipse/core/tests/resources/FilteredResourceTest.java 24 Jun 2010 16:33:33 -0000 >@@ -1690,4 +1690,67 @@ > fail("5.0", e); > } > } >+ >+ /** >+ * Regression for Bug 317783 - Resource filters do not work at all in "Project Explorer" >+ * The problem is that a client calls explicitly refreshLocal on a folder that is filtered out by >+ * resource filters and that doesn't exist in the workspace. This used to cause the resource to >+ * appear in the workspace, along with all its children, in spite of active resource filters to the >+ * contrary. >+ */ >+ public void test317783() { >+ IFolder folder = existingProject.getFolder("foo"); >+ ensureExistsInWorkspace(folder, true); >+ >+ IFile file = folder.getFile("bar.txt"); >+ ensureExistsInWorkspace(file, "content"); >+ >+ try { >+ existingProject.refreshLocal(IResource.DEPTH_INFINITE, getMonitor()); >+ } catch (CoreException e) { >+ fail("1.1", e); >+ } >+ >+ try { >+ FileInfoMatcherDescription matcherDescription = new FileInfoMatcherDescription(REGEX_FILTER_PROVIDER, ".*"); >+ existingProject.createFilter(IResourceFilterDescription.EXCLUDE_ALL | IResourceFilterDescription.FOLDERS, matcherDescription, 0, getMonitor()); >+ } catch (CoreException e) { >+ fail("1.2"); >+ } >+ >+ try { >+ existingProject.refreshLocal(IResource.DEPTH_INFINITE, getMonitor()); >+ } catch (CoreException e) { >+ fail("1.3", e); >+ } >+ >+ IResource members[] = null; >+ try { >+ members = existingProject.members(); >+ } catch (CoreException e) { >+ fail("1.4", e); >+ } >+ assertEquals("1.5", members.length, 2); >+ assertEquals("1.6", members[0].getName(), ".project"); >+ assertEquals("1.7", members[1].getName(), existingFileInExistingProject.getName()); >+ >+ try { >+ folder.refreshLocal(IResource.DEPTH_INFINITE, getMonitor()); >+ } catch (CoreException e) { >+ fail("2.0", e); >+ } >+ >+ try { >+ members = existingProject.members(); >+ } catch (CoreException e) { >+ fail("2.1", e); >+ } >+ assertEquals("2.2", members.length, 2); >+ assertEquals("2.3", members[0].getName(), ".project"); >+ assertEquals("2.4", members[1].getName(), existingFileInExistingProject.getName()); >+ >+ assertEquals("2.5", false, folder.exists()); >+ assertEquals("2.6", false, file.exists()); >+ >+ } > } >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 318162
: 172888 |
172889