Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » 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 #327407] Thu, 17 April 2008 20:41
Eclipse UserFriend
Originally posted by: none.ibm.com

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:Activate plugin during startup
Next Topic:Problems when open a preference dialog in an own defined perspective
Goto Forum:
  


Current Time: Thu Dec 26 21:05:41 GMT 2024

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

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

Back to the top