Summary: | [content type] IContentType.isKindOf returns false even though argument is target's base type | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Peter Nehrer <pnehrer> |
Component: | Resources | Assignee: | Platform-Resources-Inbox <platform-resources-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | eclipse |
Version: | 3.2 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Peter Nehrer
2006-10-05 16:19:20 EDT
It is a bug indeed. The idea was that client code would never be given instances of ContentType, only ContentTypeHandlers (to avoid leaks in the case a new content type catalog is built). ISelectionPolicy is clearly a case where this rule was broken. It was never noticed before because the only implementation we had in the platform (in the resources plug-in) didn't call isKindOf. I would say it would be ok if the content type manager kept passing in instances of ContentType because selection policies are unlikely to hold them (ISelectionPolicy is more of a SPI than a regular API). Then, changing ContentType.isKindOf to only check the id should be enough to fix this problem. Clearing target milestone because it is milestone week and nobody has signed up to fix this. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. |