| Summary: | Property tester for facets should include testing resources inside of projects | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Common Tools | Reporter: | Amy Wu <for.work.things> | ||||||
| Component: | wst.common | Assignee: | Konstantin Komissarchik <konstantin> | ||||||
| Status: | CLOSED FIXED | QA Contact: | Konstantin Komissarchik <konstantin> | ||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | jeffliu | ||||||
| Version: | 1.5 | ||||||||
| Target Milestone: | 1.5 RC4 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Amy Wu
Amy, Are you blocked on this? Do you need this in 1.5 or is this a nice-to-have for 2.0? Created attachment 42191 [details]
org.eclipse.wst.common.project.facet.core.patch
The fix is pretty small, but the outcome should be very beneficial to clients. For example, I currently have the new JSP wizard action showing up in project explorer on web projects, all folders, all files. It would much better if the new JSP wizard action only showed up on all folders and files *within* a web project.
Fix details:
plugin.xml
<extension point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
id="org.eclipse.wst.common.project.facet.core.internal.FacetedProjectPropertyTester"
==> type="org.eclipse.core.resources.IResource"
namespace="org.eclipse.wst.common.project.facet.core"
properties="projectFacet"
class="org.eclipse.wst.common.project.facet.core.internal.FacetedProjectPropertyTester">
</propertyTester>
</extension>
FacetedProjectPropertyTester#test
add the following:
if (!(receiver instanceof IResource))
return false;
final IProject pj = ((IResource) receiver).getProject();
It's not blocking, but it would greatly improve usability, so I'd prefer it be put in for 1.5. Especially since the fix is pretty simple. Plus, I think other clients would be interested in this as well. Sounds good. I will get it in. Created attachment 42265 [details]
Patch
Essentially Amy's patch. I just added an extra check to handle one IResource that returns null for getProject... IWorkspaceRoot.
+1 (if you still need it :) Fix approved by Chuck Bridgham and released into the RC4 stream. verified in 1.5rc5 Closing. |