Bug 92270

Summary: compare should use content-based content type matching
Product: [Eclipse Project] Platform Reporter: Rafael Chaves <eclipse>
Component: CompareAssignee: Andre Weinand <andre_weinand>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: s.holzknecht
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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