Community
Participate
Working Groups
The method getDescriptionFor(ContentTypeMatcher, ILazySource, String, QualifiedName[]) in ContentTypeCatalog will only process the description for the first content type in the selected array, even if it turns out that the content for that type is invalid. If a content type is determined to be invalid (i.e., the call to internalGetDescriptionFor returns null), could the other content types be checked for validity or is the priority of the first element so high that no others can be checked? The case that we have is another XML content describer that is not able to try and describe the content because XMLContentDescriber is the first in the selected queue. The XMLContentDescriber identifies something like the encoding as invalid, whereas our content describer may be a little more forgiving in identifying the content so that we can associate our editor with the file.
Interesting case. I'll look at it.
Created attachment 120120 [details] xmlcontentdescriber patch I'm attaching a patch that doesn't change the ContentTypeCatalog at all. Instead, to address our problems, I've changed the XMLContentDescriber so that when the description == null, it's described as INDETERMINATE instead of VALID. This permits our content describer to declare itself VALID and have a higher priority than the INDERTMINATE XMLContentDescriber for some malformed XML that our editor can handle (e.g., <?xml version="1.0" encoding=""?>).
One runtime test fails with the patch. This can be problem with the test itself, however I'm not looking at it now.
(In reply to comment #3) > One runtime test fails with the patch. This can be problem with the test > itself, however I'm not looking at it now. > Which unit test is failing, I might have some time to take a look and provide a patch.
Hi, Szymon. I know it's been quite awhile, but is there any way this can be revisted?
I am no longer involved in Platform Core development.
@Nick: could you please rebase your patch on top of master and submit it via Gerrit? Also, it would be nice if you could add some automated tests for the issue you got to prevent from regressions.
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. -- The automated Eclipse Genie.
This is still an issue, and still worth a fix at some point.
Please reopen if the problem still persists.
New Gerrit change created: https://git.eclipse.org/r/162854
Gerrit change https://git.eclipse.org/r/162854 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=b97854a13c94a33aa7c3af146710d3ea0c539897
This causes regression in platform resources tests, please check bug 563139. May be test must be updated, may be the patch here.