Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365649 - Support content type validation in navigate.command extension
Summary: Support content type validation in navigate.command extension
Status: RESOLVED DUPLICATE of bug 370903
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.3   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Mark Macdonald CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 13:49 EST by Mark Macdonald CLA
Modified: 2012-04-20 16:05 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Macdonald CLA 2011-12-05 13:49:04 EST
Should add support for scoping a contributed command using content type IDs. This would be more flexible/accurate than matching on the filename (as commands currently do).

See Bug 364481, comment 7 for more discussion.
Comment 1 libing wang CLA 2011-12-05 14:21:10 EST
Not sure how this will be implemented but I have a questions here:
Will the content type be part of the file meta data or something else?

I am asking because in compare editor we are asking the diff provider to resolve the file name, type and content.
In our own diff provider implementation, I am just using the file extension as the type when I get file name from the meta data.
If I can't get the type from meta data, I may want some thing else but it has to be based on the file URI.

Content type will be very important post .4 when RTC team wants to use Orion compare widget. One of their interests is to use syntax highlighting in the compare editor for different types of files.
Comment 2 Mark Macdonald CLA 2011-12-05 16:44:20 EST
(In reply to comment #1)
The content type isn't actually part of the metadata, but it can be looked up based on the file metadata. If the diff provider has access to the metadata, it can do that lookup.

But as we just discussed offline, for highlighting purposes, the highlight-lookup code should be moved out of the setup.js glue and reused for the compare case. (see 364857)
Comment 3 Mark Macdonald CLA 2012-04-20 16:05:07 EDT
This was fixed by Susan's changes for bug 370903

*** This bug has been marked as a duplicate of bug 370903 ***