adobe/brackets — pull request #6172 by couzteau (2013-12-04 02:48:10+00:00)
Title: provide customViewerRegistry to enable extension developers to add CustomViewers

This change adds a public API to EditorManager that enables extension developers to add custom viewers to Brackets following the same pattern as implemented by ImageViewer: When a file is opened EditorManager is consulted for available CustomViewers for the given file type. If available the custom viewer is used by EditorManager to display the file.

A custom viewer would have to implement the following:
- render(fullPath, $editorHolder)
@param {!string} fullPath Path to the image file
@param {!jQueryObject} $editorHolder The DOM element to append the view to.
- onRemove()
signs off listeners and performs any required clean up when editor manager closes
the custom viewer

To register with EditorManager registerCustomViewerProvider(langId, provider) needs to be called where
@param {!String} languageId, i.e. image, audio, ... to identify a language known to LanguageManager
@param {!Object} provider Custom view provider instance

This API will com in handy when it comes to integrating services such as Parfait to view for instance Photoshop files