platform-core-home/documents/content_types.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (view) (download) (as text)

1 : rchaves 1.1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 :     <html>
3 :     <head>
4 :     <title>Central content type catalog for Eclipse</title>
5 : dj 1.4 <link rel="stylesheet" href="../default_style.css" type="text/css">
6 : rchaves 1.1 </head>
7 :     <body text="#000000" bgcolor="#ffffff">
8 :     <h1>A central content type catalog for Eclipse</h1>
9 : rchaves 1.8 <p><font size="-1">Last modified: Feb 16, 2005</font></p>
10 : rchaves 1.9 <p><font size="-1"><strong>Note: this document has been updated/extended to depict
11 :     the solution actually implemented in the 3.0 release and changes made during
12 :     the 3.1 cycle. The <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-core-home/documents/content_types.html?rev=1.4">
13 :     original proposal written the 3.0 development cycle</a>, as well as <a href="http://dev.eclipse.org/viewcvs/index.cgi/platform-core-home/documents/content_types.html">
14 :     all versions of this document</a> are also available</strong> (<img src="../images/changed.gif" width="12" height="12">
15 :     marks interesting changes since the original proposal).</font></p>
16 : rchaves 1.1 <p><cite><strong>Plan item description:</strong> Content-type-based editor lookup.
17 :     The choice of editor is currently based on file name pattern. This is not very
18 :     flexible, and breaks down when fundamentally different types of content are
19 :     found in files with undistinguished file names or internal formats. For example,
20 :     many different models with specialized editors get stored in XML format files
21 :     named *.xml. Eclipse should support a notion of content type for files and resources,
22 :     and use these to drive decisions like which editor to use. This feature would
23 :     also be used by team providers when doing comparisons based on file type. The
24 :     several existing file-type registries in Eclipse should be consolidated. [Platform
25 :     Core, Platform UI] [Theme: User experience] (bug <a
26 :     href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37668">37668</a>, <a
27 :     href="http://dev.eclipse.org/bugs/show_bug.cgi?id=51791">51791</a>, <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=52784">52784</a>)
28 :     </cite></p>
29 :     <p>This plan item is about two important features: </p>
30 :     <ol>
31 :     <li>a single content-type repository to be provided by Eclipse on top of which
32 :     content-type related features provided by any plugins could be built upon, and</li>
33 :     <li>a mechanism for automatically determining the content type given a file name and/or its
34 :     contents.</li>
35 :     </ol>
36 :     <h2>Driving forces</h2>
37 :     <ul>
38 :     <li>the catalog must be extensible: plug-ins must be able to contribute new
39 :     content types;</li>
40 :     <li>content types must have an identity, a unique identifier by which they can
41 :     be unambiguously retrieved from the catalog;</li>
42 :     <li>content types should be hierarchical: new content types are very often specializations
43 :     of existing ones (example, Ant Scripts and Plugin manifests are kinds of XML
44 :     documents, XML is a kind of text document), so it should be possible for new
45 :     content types to inherit interesting properties from existing ones (see <a href="#FAQ-hierarchy">FAQ</a>);</li>
46 :     <li>content types have either a predominantly binary or text nature;</li>
47 :     <li>content types are associated with specific file names/extensions;</li>
48 :     <li>some level of automatic content/name based type discovery must be provided;</li>
49 :     <li>existing plug-in-specific content type registry could be replaced/built
50 :     upon the central catalog;</li>
51 :     <li>encoding determination is strongly related concern and should be taken into
52 :     consideration when sketching a solution.</li>
53 :     </ul>
54 :     <h3>On automatic content type detection</h3>
55 :     <p>Content types determine many properties and actions related to files such as
56 :     encoding, associated editors, etc. Automatic content type determination allows
57 :     content type specific actions without requiring the user to manually define
58 :     the content type for a given file. Content type detection is based on:</p>
59 :     <ul>
60 :     <li>file selection specifications</li>
61 :     <li>file contents</li>
62 :     </ul>
63 :     <p>Content type determination based on file name/extension (&quot;file selection
64 :     specs&quot;) is the easiest one to compute. Each content type has a set of file
65 :     selection specs associated to it. Determining the content type corresponding
66 :     to a file selection spec is done by a simple lookup on the catalog. </p>
67 :     <p>Content type determination based on file contents is more complex, and requires
68 :     examining the contents. Since we are talking about an open set of possible content
69 :     types, this examination implies in delegation to content type detectors contributed
70 :     by other plug-ins (content describers).</p>
71 :     <h2>Solution</h2>
72 :     <h3>The proposed API</h3>
73 :     <p>The proposed API contains 4 new interfaces in a new package called <code>org.eclipse.core.runtime.content</code>:</p>
74 :     <ul>
75 :     <li><code><a href="#IContentType">org.eclipse.core.runtime.content.IContentType</a></code></li>
76 :     <li><code><a href="#IContentTypeManager">org.eclipse.core.runtime.content.IContentTypeManager</a></code></li>
77 :     <li><code><a href="#IContentDescription">org.eclipse.core.runtime.content.IContentDescription</a></code></li>
78 :     <li><code><a href="#IContentDescriber">org.eclipse.core.runtime.content.IContentDescriber</a></code></li>
79 :     </ul>
80 :     <p>Following is a brief description for each of them. </p>
81 :     <h4><code><a name="IContentType"></a>org.eclipse.core.runtime.content.IContentType</code></h4>
82 :     <p>Represents a content type in the platform. <code>IContentType</code> instances
83 :     are provided by the platform, built from extensions to the <code>org.eclipse.core.runtime.contentTypes</code>
84 :     extension point. Relevant properties for <code>IContentType</code> are:</p>
85 :     <ul>
86 :     <li>unique id (example: org.eclipse.core.runtime.xml), which is based on the
87 :     plug-in's unique identifier (the registry namespace);</li>
88 :     <li>user-friendly name (example: Text, or XML document, or ZIP file, );</li>
89 :     <li>file selection spec - comma-separated lists of associated file names and
90 :     extensions;</li>
91 :     <li>default charset (example: ISO-8859-1, for Java properties files);</li>
92 :     <li>content describer (see <code><a href="#IContentDescriber">org.eclipse.core.runtime.content.IContentDescriber</a></code>),
93 :     a class that knows how to recognize if a given stream of bytes contains compatible
94 :     to the content type, and how to extract other content-type specific information
95 :     from the stream.</li>
96 :     </ul>
97 :     <p>Also, <code>IContentType</code> provides methods that check whether the given
98 :     file name is matched by this content type file selection spec, or whether a
99 :     content type is a subtype of another content type.</p>
100 :     <h4><a name="IContentTypeManager"></a><code>org.eclipse.core.runtime.content.IContentTypeManager</code></h4>
101 :     <p>Represents the content type registry. Provides methods for obtaining the content
102 :     type associated to a file name, and for discovering the corresponding content
103 :     type for a stream of bytes. <code>IContentTypeManager</code> allows clients
104 :     to:</p>
105 :     <ul>
106 :     <li>retrieve the content type for a given id;</li>
107 :     <li>retrieve a set of content types associated to a given file name;</li>
108 :     <li>discover which content types recognize a given stream as a valid sample
109 :     for the corresponding file format;</li>
110 :     <li>obtain a description for a stream of bytes, including platform (such as
111 :     encoding) and custom (content type specific) properties.</li>
112 :     </ul>
113 :     <h4><code><a name="IContentDescriber"></a>org.eclipse.core.runtime.content.IContentDescriber</code></h4>
114 :     <p>Content-based content type detection and content description rely on specialized
115 :     content detectors associated to content types. When a content type is contributed
116 :     to the platform, a content describer class may be provided. Content describers
117 :     are able to detect if a given stream of bytes is conformant to the content type
118 :     file format, and may also be able to extract important properties from the contents,
119 :     such as what charset was used to encode the contents (for text files), and any
120 :     content type specific information that may be required.</p>
121 :     <p>The main method in <code>IContentDescriber</code> is:</p>
122 : rchaves 1.9 <p><code>int describe(InputStream contents, IContentDescription description, QualifiedName[]
123 :     options) throws IOException;</code></p>
124 : rchaves 1.1 <p>The first thing implementations for this method must do is to check if the
125 :     contents represent a valid sample for their corresponding content type file
126 :     format. If not (or if cannot be determined), this method should exit immediately,
127 :     returning <code>IContentDescription.INVALID</code> or <code>IContentDescription.INDETERMINATE</code>,
128 :     depending on how strict the file format is. Otherwise, this method should return
129 :     <code>IContentDescription.VALID</code>, but only after trying to provide all
130 :     required information (according to the specified options, if any) by reading
131 :     the contents and filling the <a href="#IContentDescription">content description</a>
132 :     provided.</p>
133 :     <p><strong><em>Note</em></strong><em>: it is essential that for this mechanism
134 :     to work in a suitable manner, the execution of content describers by the platform
135 :     should not cause the activation of the plugins providing them. In the Eclipse
136 :     3.0 runtime, plug-ins that have built-in bundle manifests will be able to selectively
137 :     enable/disable auto-activation on a per-package basis (for more information,
138 :     see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=52393">bug 52393</a>).
139 :     Although this will not be enforced by the platform, content describers <strong>must</strong>
140 :     be self-contained and not trigger auto-activation.</em></p>
141 :     <h4><code><a name="IContentDescription"></a>org.eclipse.core.runtime.content.IContentDescription</code></h4>
142 :     <p>Content descriptions are obtained by calling <code>IContentTypeManager#getDescriptionFor</code>
143 :     method. A content description contains interesting information (such as encoding)
144 :     about an arbitrary stream of bytes. These information are filled partially by
145 :     the platform and partially by the content describer elected (if any).</p>
146 :     <h3>Conflict resolution</h3>
147 : rchaves 1.9 <p>Content types are managed by the platform but plug-ins are in charge of contributing
148 :     content types. While this provides good flexibility, it also opens oportunities
149 :     for conflicts. There are a few scenarios where conflicts may arise:</p>
150 : rchaves 1.1 <ol>
151 :     <li><em>two content types provided by independently developed plug-ins intended
152 :     for the same file selection specification</em> - this may happen for popular
153 :     file types that are not provided by the platform. In this case, one of the
154 : rchaves 1.9 content types will be ellected arbitrarily. User intervention is required
155 :     (by disabling one of the content types, for instance) if automatic determination
156 :     does not choose the preferred content type If multiple content types can be
157 :     returned by the API, both will appear in the list.<img src="../images/changed.gif" width="12" height="12"> (see
158 :     bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=83004">83004</a>) <font size="-1">
159 :     </font></li>
160 : rchaves 1.1 <li><em>two related (but different) content types that share a same file name/extension
161 :     specification</em> - think of general XML documents and Ant build scripts
162 :     (a sub-type of XML document, inheriting its file selection specifications).
163 :     This is different than the previous case here at most one content type will
164 :     be contributing file specs (the more basic type). In this scenario, for APIs
165 :     that return content-types based exclusively on file name, the ancestor will
166 :     be appear first in the returned array, since it is more general. Note that
167 :     when a general type specifies a file extension for it to be associated with,
168 :     and a subtype specifies a file name that has the same file extension, the
169 :     more specific type will appear before the general one. For APIs that do content-based
170 :     analysis, if both content type describers deem the contents as valid, the
171 :     more specific content type will also appear first. For two sibling content
172 : rchaves 1.9 types that deem a same set of bytes as valid, an arbitrary order will be chosen.</li>
173 : rchaves 1.1 <li><em>two completely unrelated content types that share a same file name/extension
174 :     specification</em> - this is the more unlikely scenario (imagine an image
175 :     file format and a word-processor file format sharing the same file extension).
176 : rchaves 1.9 In this case, one of the content types will be ellected arbitrarily. User
177 :     intervention is required (by disabling one of the content types, for instance)
178 :     if automatic determination does not choose the preferred content type.<img src="../images/changed.gif" width="12" height="12"> (see
179 :     bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=83004">83004</a>) <font size="-1"></li>
180 : rchaves 1.1 </ol>
181 :     <h3>Frequently Asked Questions</h3>
182 :     <ol>
183 :     <li> How will plugin providers benefit from a central content type catalog?
184 :     <p> Generally by using the same content type registry and sharing the same
185 : rchaves 1.9 concept of content/file type. Other examples are:
186 : rchaves 1.1 <ul>
187 :     <li>a builder could use its well-known content type to filter out files
188 :     whose names don't match with the content type file section spec;</li>
189 :     <li>the user interface could know what editors to offer for a given file
190 :     selected (associations between editors and content types should be kept
191 :     separately from the content type catalog);</li>
192 : rchaves 1.9 </ul></p>
193 : rchaves 1.1 </li>
194 :     <li><a name="FAQ-hierarchy"></a>Why are content types hierarchical?
195 :     <p>To allow important properties to be inherited by new specialized content
196 :     types:
197 :     <ul>
198 :     <li>the default charset</li>
199 :     <li>text/binary nature</li>
200 :     <li>content description</li>
201 :     <li>associations defined externally by plug-ins (for instance, any editors
202 :     associated with an ancestor should work with any descendants)</li>
203 :     </ul></p>
204 :     </li>
205 :     <li> What happens if the base type for a new content type is not present in
206 :     the platform (the plug-in that provides it is not available)?
207 : rchaves 1.9 <p>The content type (and consequently any descendants) will be deemed invalid
208 :     and ignored.</p>
209 : rchaves 1.1 </li>
210 :     <li><a name="FAQ-MIME"></a>Do Eclipse's content types have anything to do with
211 :     IANA's MIME Media Types?
212 : rchaves 1.9 <p>Not so far. The main reason is that not every file format with a content
213 :     type in Eclipse will have a MIME type, so we could not use it as the main
214 :     association mechanism between content types and applications. We considered
215 :     keeping MIME-types as an optional property for each content type, and provide
216 :     a method findContentTypesByMIMEType (or something like that), but decided
217 :     removing it since there was no sound use case for that (and the idea in
218 :     the initial proposal was to keep only the essential stuff to avoid distractions).<font size="-1"><strong><img src="../images/changed.gif" width="12" height="12"></strong></font></p>
219 : rchaves 1.1 </li>
220 :     <li>How can users customize the way content types are chosen?
221 : rchaves 1.9 <p>By:
222 : rchaves 1.1 <ul>
223 :     <li>associating additional file specs to existing content types</li>
224 :     <li>defining a content type as the default one for a given file spec (not
225 :     supported yet)</li>
226 :     <li>overriding content type defined attributes, such as default encoding
227 :     (not supported yet)</li>
228 : rchaves 1.9 </ul></p>
229 : rchaves 1.1 </li>
230 :     <li>Can plug-ins override the content type describer for an existing content
231 :     type?
232 :     <p>Not so far. It is up to the plugin provider to determine whether a content
233 :     type describer will be provided.</p>
234 :     </li>
235 :     <li>Can two completely unrelated content types be associated with the same file
236 :     spec?
237 : rchaves 1.9 <p>One of the content types (arbitrarily selected) will be chosen as the preferred
238 :     one (the other will also be associated). Priorities are also taken into
239 :     account.</p>
240 : rchaves 1.1 </li>
241 :     <!--li>How are conflicts (two different content types associated to the same file)
242 :     prevented?
243 :     <p>They are not. At least, not automatically. It is up to clients to decide
244 :     what to do when more than one content type is offered by the platform. A
245 :     client that does not care about which one is picked, will randomly choose
246 :     one of them. A client that cares but does not know which one to choose may
247 :     refuse to use any of them. User-guided code may ask the user what should
248 :     be done. The content type chosen may be marked as the default one for the
249 :     file spec, or the user may want to mark one as an alias for the other.</p>
250 :     </li-->
251 :     <li>What if a given file name is matched by two different file specs provided
252 :     by two completely unrelated content types?
253 :     <p> As seem above, the only way this can happen is when two <em>different</em>
254 :     file specs (for instance, a file name and a file extension) accept the same
255 :     file name (for instance, one content type is associated with a &quot;xml&quot;
256 :     file extension, other is associated with a &quot;plugin.xml&quot; file name.
257 :     ) File name specs have priority over file extension specs (so plugin.xml
258 :     is a plugin manifest before being a XML document). The normal case is that
259 :     the content type that defines a file name spec is based on the file type
260 :     that defines a file extension spec (a plugin manifest is a kind of XML document).
261 :     This ensures that actions applicable to general XML documents will be applicable
262 :     to a plugin manifest.</p>
263 :     </li>
264 : rchaves 1.9 <li>What are aliases for? <font size="-1"><strong><img src="../images/changed.gif" width="12" height="12"></strong></font>
265 :     (see bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=83004">83004</a>)
266 : rchaves 1.1 <p>It is a mechanism to prevent conflicts. When multiple plugins contribute
267 :     content types associated with the same file specs, we have a conflict. Conflicts
268 : rchaves 1.9 are bad because introduce ambiguity (what is the right content type?). Most
269 :     of times when such conflicts arise, it is a case of independently developed
270 : rchaves 1.1 plugins trying to contribute the same content type (semantically speaking).
271 : rchaves 1.9 Imagine a plug-in com.examples.foo that wants to be associated to the Java
272 :     Source content typ (org.eclipse.jdt.core.javaSource)e, provided by org.eclipse.jdt.core,
273 :     but that does not require org.eclipse.jdt.core to be present to work. Such
274 :     plug-in can contribute its own Java Source content type (com.examples.foo.java),
275 :     and mark it as an alias for the content type provided by JDT/Core. If JDT/Core
276 :     is present, the com.examples.foo.java will be omitted from the content type
277 :     registry, and all references to it will be automatically interpreted as
278 :     references to org.eclipse.jdt.core.javaSource instead.<font size="-1"></font></p>
279 : rchaves 1.1 </li>
280 :     <li>How do I prevent my specialized content-type to be disabled even if its
281 : rchaves 1.9 parent is not available? <font size="-1"><strong><img src="../images/changed.gif" width="12" height="12"></strong></font>
282 :     (see bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=83004">83004</a>)
283 : rchaves 1.1 <p> Sometimes a plugin A does not depend on plugin B, but declares a content
284 :     type which is intended to be a specialization of another content type declared
285 :     by B. To prevent the content type declared by A to be disabled: </p>
286 :     <ol>
287 : rchaves 1.9 <li>declare an alias content type having the intended parent as its target
288 :     (a placeholder);</li>
289 : rchaves 1.1 <li>make your specialized content type have this placeholder as its base
290 :     type;</li>
291 :     </ol>
292 :     <p>If the originally intended base type is available, your base type will
293 :     be marked as just an alias, and your specialized content type will be properly
294 : rchaves 1.9 attached to the intended content type. Otherwise, the placeholder will be
295 :     enabled, and although things might not be as great as intended (actions
296 : rchaves 1.1 associated to the original content type will not be available), your content
297 : rchaves 1.9 type will still be enabled.<font size="-1"></font></p>
298 : rchaves 1.1 </li>
299 :     <li>When should a file-association be contributed instead of declaring a new
300 :     (derived) content type?
301 :     <p>New content types should be created only if there is no existing content
302 :     type with the semantics required. Otherwise, when only additional file specs
303 :     must be provided, file associations are the way to go.</p>
304 :     </li>
305 :     <li>Are file specs inherited?
306 :     <p> Only if none is specified in the sub type. </p>
307 :     </li>
308 :     <li>How does a client figure out whether a given file is a text file or not?
309 :     <p>The proposed approach is to check if the file's content type is a kind
310 : rchaves 1.2 of the &quot;org.eclipse.core.runtime.text&quot; content type, which is
311 :     intended to be the ancestor for all text oriented content types. If it turns
312 :     out to be a very frequent idiom, we might consider proving a convenience
313 :     API to do that.</p>
314 : rchaves 1.1 </li>
315 : rchaves 1.9 <li>Do content types have to contribute content describers?
316 : rchaves 1.1 <p> No, although if the file has a identifiable signature/format, it is recommended,
317 :     because improves the overall quality of content-based content type lookups.</p>
318 :     </li>
319 :     </ol>
320 : rchaves 1.5 <p> <em>Note: comments are encouraged. Any questions/concerns not addressed here
321 :     should be discussed in the platform-core-dev list, or bug <a
322 :     href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37668">37668</a>. </em></p>
323 : rchaves 1.9 <h2>Addendum: issues to be addressed in the 3.1 cycle<font size="-1"><strong><img src="../images/changed.gif" width="12" height="12"></strong></font></h2>
324 : rchaves 1.5 <p>The solution described above was implemented and relatively succesful. Some
325 :     components took advantage of the new content type infrastructure, but still
326 :     in many cases file-association is being done in an ad-hoc manner. Also, no UI
327 :     was provided for customizing content types (such as changing the default encoding,
328 :     adding associations with files) so the user has no control on how the content
329 :     type detection mechanism works. Thus, the main issues to be addressed in the
330 :     3.1 cycle are:</p>
331 :     <ul>
332 :     <li>ensure the content type framework works for clients that have not adopted
333 :     it yet, or at least we understand why it is not (cannot be made) suitable
334 :     to them. Examples are: Platform/UI, Platform/CVS, and products built on top
335 :     of Eclipse.</li>
336 :     <li>ensure users are granted appropriate means so they can customize the behavior
337 :     of content type detection so things just work for them.</li>
338 :     <li>ensure content type resolution works (or can be made to work) appropriately
339 :     in setups where multiple independently developed products contribute conflicting
340 :     content types. </li>
341 :     </ul>
342 :     <h3>Support more use cases</h3>
343 : rchaves 1.7 <p>Ensure the content type support works for the SDK plug-ins and for products
344 : rchaves 1.9 built on top of Eclipse (see bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=78654">78654</a>).</p>
345 : rchaves 1.5 <p><strong>Platform/UI - file/editor association</strong></p>
346 : rchaves 1.7 <p>Content type-editor association is definitely the most important use case for
347 :     the content type support. The basic idea is that for a given file or stream
348 :     of data, the UI should be able to:</p>
349 :     <ol>
350 :     <li>provide a default editor to be used when opening the file</li>
351 :     <li>present any other editors that are also able to handle the file</li>
352 :     <li>allow the user to pick a completely unrelated file not initially suggested</li>
353 :     <li>remember the user decision (if the user wants so) so it becomes the default
354 :     for that file</li>
355 :     </ol>
356 :     <p> <strong>1</strong>, <strong>2</strong> and <strong>4</strong> are currently
357 :     supported by the existing file-editor association mechanism. <strong>3</strong>
358 :     is being requested by users, and it is orthogonal (as 4 is) to the content type
359 :     support provided by runtime.</p>
360 :     <p>Content types add a level of indirection between files and editors. At a first
361 :     glance, there is no reason why changing the default editor would affect what
362 :     content type is assigned to a file, so users should be able to pick up any editors
363 : rchaves 1.9 without affecting content type detection.</p>
364 : rchaves 1.5 <p><strong>Platform/Team - binary vs ascii files</strong></p>
365 : rchaves 1.7 <p>The Team plug-in keeps a catalog of file extensions and their expected content
366 : rchaves 1.9 type (either binary or ASCII). If content types were broadly adopted throughout
367 :     the rest of Eclipse (so that most files dealt with by users have a content type),
368 :     couldn't the Team plug-in use content type based encoding determination to figure
369 :     out a good default for this setting? (see bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=85490">85490</a>)</p>
370 : rchaves 1.5 <h3>Give users more power</h3>
371 : rchaves 1.7 <p>Ensure users have means to customize how the content type detection works for
372 :     them. Provide UI for content types. May provide some way of showing related
373 :     objects for a given content type (editors, views, comparators, etc). Users cannot
374 :     provide content type detection code, so user-defined content types would be
375 :     useful only for cases where content type detection is file name based (like
376 : rchaves 1.8 for non-formatted text files, such as source files, configuration files, etc).</p>
377 :     <p>A simple plug-in that allows users to add/remove file associations is available
378 :     in the <a href="../downloads.html">downloads page</a>.</p>
379 : rchaves 1.7 <h3>Improve content type determination</h3>
380 : rchaves 1.5 <p>Ensure content type detection works (or can be made to work) appropriately
381 :     when incompatible products are deployed together.</p>
382 : rchaves 1.7 <ol>
383 : rchaves 1.9 <li><strong>project-specific content type resolution</strong> - to reduce chances
384 :     for collisions, there should be a way of constraining which content types
385 :     are available on a project basis. One possible solution would be to have content
386 :     type-nature associations. Natures could declare some preferred content types,
387 :     and those preferred content types would always win (see bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=69640">69640</a>)</li>
388 : rchaves 1.7 <li><strong>user-defined content type determination - </strong>two plug-ins
389 :     provide completely unrelated content types A and B for files with extension
390 :     &quot;.foo&quot;. The current implementation will choose one of them (by priority,
391 : rchaves 1.9 depth, or arbitrarily if they have the same priority and depth). If A is automatically
392 :     chosen, the user might want to choose B instead as the default content type.
393 :     Instead of doing that on a file basis, it seems better to do it on a coarser
394 :     granularity, such as at the project level or at the workspace level (see bug
395 :     <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=85765">85765</a>).
396 :     </li>
397 : rchaves 1.7 <li><strong>product defined policies for overriding content types</strong> -
398 :     a product may want to override some of the existing content type definitions.
399 :     Products should be able to do that in a way that would circumvent the regular
400 :     conflict resolution.</li>
401 :     </ol>
402 : rchaves 1.9 <p>See also corresponding PR <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=78654">78654</a>
403 :     - content type should be used universally</p>
404 : rchaves 1.1 </body></html>