platform-core-home/documents/content_types.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6, Fri Oct 15 17:53:54 2004 UTC revision 1.7, Mon Jan 17 17:17:37 2005 UTC
# Line 313  Line 313 
313    should be discussed in the platform-core-dev list, or bug <a    should be discussed in the platform-core-dev list, or bug <a
314   href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37668">37668</a>. </em></p>   href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37668">37668</a>. </em></p>
315  <h2>Addendum: issues to be addressed in the 3.1 cycle</h2>  <h2>Addendum: issues to be addressed in the 3.1 cycle</h2>
316  <p><font size="-1">Last modified: October 15th, 2004</font></p>  <p><font size="-1">Last modified: January 17th, 2005</font></p>
317  <p>The solution described above was implemented and relatively succesful. Some  <p>The solution described above was implemented and relatively succesful. Some
318    components took advantage of the new content type infrastructure, but still    components took advantage of the new content type infrastructure, but still
319    in many cases file-association is being done in an ad-hoc manner. Also, no UI    in many cases file-association is being done in an ad-hoc manner. Also, no UI
# Line 333  Line 333 
333      content types. </li>      content types. </li>
334  </ul>  </ul>
335  <h3>Support more use cases</h3>  <h3>Support more use cases</h3>
336  <p>Ensure the Content Type works for the SDK plug-ins and for products built on  <p>Ensure the content type support works for the SDK plug-ins and for products
337    top of Eclipse.</p>    built on top of Eclipse.</p>
338  <p>TBD</p>  <p>TBD</p>
339  <p><strong>Platform/UI - file/editor association</strong></p>  <p><strong>Platform/UI - file/editor association</strong></p>
340  <p>TBD</p>  <p>Content type-editor association is definitely the most important use case for
341      the content type support. The basic idea is that for a given file or stream
342      of data, the UI should be able to:</p>
343    <ol>
344      <li>provide a default editor to be used when opening the file</li>
345      <li>present any other editors that are also able to handle the file</li>
346      <li>allow the user to pick a completely unrelated file not initially suggested</li>
347      <li>remember the user decision (if the user wants so) so it becomes the default
348        for that file</li>
349    </ol>
350    <p> <strong>1</strong>, <strong>2</strong> and <strong>4</strong> are currently
351      supported by the existing file-editor association mechanism. <strong>3</strong>
352      is being requested by users, and it is orthogonal (as 4 is) to the content type
353      support provided by runtime.</p>
354    <p>Content types add a level of indirection between files and editors. At a first
355      glance, there is no reason why changing the default editor would affect what
356      content type is assigned to a file, so users should be able to pick up any editors
357      without affecting what content type detection.</p>
358  <p><strong>Platform/Team - binary vs ascii files</strong></p>  <p><strong>Platform/Team - binary vs ascii files</strong></p>
359  <p>TBD</p>  <p>The Team plug-in keeps a catalog of file extensions and their expected content
360      type (either binary or ASCII). If content types were broadly adopted throughout the rest
361      of Eclipse (so that most files dealt with by users have a content type), couldn't the Team
362      plug-in use content type based encoding determination to figure out a good default for this
363      setting?</p>
364  <h3>Give users more power</h3>  <h3>Give users more power</h3>
365  <p>Ensure users have means to customize how the content type detection works  <p>Ensure users have means to customize how the content type detection works for
366    for them.</p>    them. Provide UI for content types. May provide some way of showing related
367  <p>TBD</p>    objects for a given content type (editors, views, comparators, etc). Users cannot
368  <h3>Improve conflict handling</h3>    provide content type detection code, so user-defined content types would be
369      useful only for cases where content type detection is file name based (like
370      for non-formatted text files, such as source files, configuration files, etc).
371    </p>
372    <h3>Improve content type determination</h3>
373  <p>Ensure content type detection works (or can be made to work) appropriately  <p>Ensure content type detection works (or can be made to work) appropriately
374    when incompatible products are deployed together.</p>    when incompatible products are deployed together.</p>
375  <p>TBD</p>  <ol>
376      <li><strong>nature-specific content types</strong> - to reduce chances for collisions,
377        there should be a way of constraining which content types are available on
378        a project basis. One possible solution would be to have content type-nature
379        associations. Natures could declare somre preferred content types, and those
380        preferred content types would always win.</li>
381      <li><strong>user-defined content type determination - </strong>two plug-ins
382        provide completely unrelated content types A and B for files with extension
383        &quot;.foo&quot;. The current implementation will choose one of them (by priority,
384        depth, or arbitrarily if they have the same priority and depth) and mark the
385        other one as an alias, so if they have sub-content types, the two trees will
386        be combined under the chosen one. If A is automatically chosen, the user might
387        want to choose B instead as the default content type. </li>
388      <li><strong>fine-grained user-defined content type determination</strong> -
389        if for some reason we have problems detecting the right content type for a
390        file, the user should be able to fix that by saying: I want <em><strong>this</strong></em>
391        content type for this file. This is similar to allowing users to specify encoding
392        on a file basis. A possible implementation could be to use persistent properties
393        for that. Another would be to use project preferences (because they are shared).</li>
394      <li><strong>product defined policies for overriding content types</strong> -
395        a product may want to override some of the existing content type definitions.
396        Products should be able to do that in a way that would circumvent the regular
397        conflict resolution.</li>
398    </ol>
399    <p>See also corresponding PR <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=78654">78654</a>
400      - content type should be used universally</p>.
401  </body></html>  </body></html>

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7