Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Runtimes » How to associate one or more content types based on something other than filename (URL protocol++)
How to associate one or more content types based on something other than filename (URL protocol++) [message #468614] Thu, 17 April 2008 20:41
Randy Hudson is currently offline Randy HudsonFriend
Messages: 123
Registered: July 2009
Senior Member
Imagine I have a WebDAV server or something and a "file" I'd like to open
at:

webdav://server.com/path1/path2/foo

The "foo" filename is completely meaningless and doesn't tell me its content
type, but a HEAD call to the server would return the mime-type, which could
be converted to a content-type easily.

How do I hook into:
Platform.getContentTypeManager().findContentTypeFor(String) //(In this
case, string is a URL)
....so that when the String begins with "webdav:" I can provide some helper
that connects to the server and discovers the content type the right way and
returns it to the ContentTypeManager? The only hack/workaround I see is to
provide *lots* of content describers, all of which have to start parsing the
file contents because the filename/URL isn't even available to the
describer.
Previous Topic:How to associate one or more content types based on something other than filename (URL protocol++)
Next Topic:Extend the runtime project scope
Goto Forum:
  


Current Time: Tue Mar 19 03:10:05 GMT 2024

Powered by FUDForum. Page generated in 0.02529 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top