Wednesday, September 12, 2007

Priority of content types

Today I found an interesting thing about the content types in Eclipse.

Yesterday I was trying to fix Bug 198544. I went the wrong way trying to fix the issue due to the reporter's hint. Looked good...

Today I found that the priority is respected indeed, but as a second criteria. Those who are interested in the case should look at org.eclipse.core.internal.content.ContentTypeCatalog class in org.eclipse.core.contenttype project.



Kim Sullivan said...

I think the whole content type system should go through a careful review that would also address things like bug 198208 (which renders the XMLRootElementContentDescriber virtually useless).

When I reported that bug, I got the impression that the interactions between the results returned by content describers, content type priorities and other ways to determine the content type (such as file name or file extension) are not really documented anywhere.

(besides, things like bug 146951 explain that eclipse sometimes picks the wrong content type on purpose, for speed reasons).

Lars Gersmann said...

whoooo - i am happy to hear this !!

fixing this bug (as i remember correctly it reported by me :-) makes eclipsexslt running correctly !! or better to say : the forthcoming xsl support of eclipse wtp.

congratulations !!