| Summary: | Adopters should be able to hide folders from displaying as resource mappings | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Common Tools | Reporter: | Aidyl Kareh <amkareh> | ||||||||||
| Component: | wst.common | Assignee: | Aidyl Kareh <amkareh> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | Carl Anderson <ccc> | ||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | amkareh, ccc, jsholl | ||||||||||
| Version: | unspecified | Flags: | ccc:
review+
jsholl: review+ |
||||||||||
| Target Milestone: | 3.2.2 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows XP | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Aidyl Kareh
Created attachment 176844 [details]
Proposed Patch
The attached patch adds an extension point so that adopters can specify folders that they want to be filtered out from the 'Add Folder Mappings' wizard and the 'Deployment Assembly' table. The extension point should be used as follows:
<extension
point="org.eclipse.wst.common.modulecore.ui.resourceMappingFilter">
<resourceMapping
source-path="/.settings">
</resourceMapping>
</extension>
This patch also uses the extension point to add a filter so that the '/.settings' folder is not shown as a resource mapping option.
Created attachment 177335 [details]
Updated Patch
This patch updates the original patch by adding the ResourceMappingFilterExtensionRegistry class to handle the loading and some functionality of resourceMappingFilter extensions. This patch also changes that the source-path attribute now expects a project relative source path represented as regular expression. The following example would filter out the '.settings' folder and its contents:
<extension
point="org.eclipse.wst.common.modulecore.ui.resourceMappingFilter">
<resourceMapping
source-path="\.settings">
</resourceMapping>
</extension>
Reviewed and looks good. Please include the following changes. 1. There are a few places where exceptions are caught and eaten. Please review all of these places and log the exceptions if they should be logged (they probably should be). Also, there was one place where Exception was caught, does the catch need to be that general, or can you catch a more specific exception? 2. Please test some badly configured extension contributions that would not be caught by the schema validator. (not sure if there is one, but perhaps a badly configured regex string?) Make sure the registry reader fails gracefully (i.e. the properly configured extensions are still read) and logs an error message for the developer to help them fix it (if possible). Created attachment 177459 [details]
Latest Updated Patch
Thanks for the comments Jason. This patch takes into account all of your recommended changes.
I approve Committed to HEAD for WTP 3.2.2 and WTP 3.3 Created attachment 177529 [details]
Patch - Changes that were not checked in
There seems to have been a problem while checking in my bug fix patch. The attached patch contains all the changes that were missing from the checked in code.
|