Bug 92270 - compare should use content-based content type matching
Summary: compare should use content-based content type matching
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Andre Weinand CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-21 14:26 EDT by Rafael Chaves CLA
Modified: 2005-05-09 09:29 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Chaves CLA 2005-04-21 14:26:40 EDT
(maybe this is the cause for bug 78652 comment 13)

From the newsgroups: news://news.eclipse.org:119/d45338$at9$1@news.eclipse.org

"we implemented a comparer for xml files of a particular content type. The
comparer consists of a content (merge) viewer and structure creators and works
well if the viewers and structure creators are assigned to the file extension
xml. But the comparer is not intended to compare any xml files but only our xml
content type. Because of that we assigned the viewers and structure creates
using the contentTypeBinding tags in the extension points provided by the
compare plugins. Nevertheless the compare action does not use our viewers but
the most common text viewer. How can we make sure that our viewers and structure
creators are used only with xml files that have our content type assigned?" 

According to the poster, compare uses name-based matching only instead of
content-based matching (see CompareUIPlugin#getContentType(...)). Name-matching
is more conservative so precedence is given to more basic content types (for
instance, foo.xml is said to be an XML file instead of an Ant Build Script).
Content matching can be more precise because it reads the contents. I would
expect compare to use content matching instead.
Comment 1 Andre Weinand CLA 2005-05-09 09:29:44 EDT
fixed for N20050509