Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] resolve(URL) and asLocalURL()

A little sour grapes? The javadoc should definitely say what the resolve()
method does and not just leave it up in the air for some future change to
break existing plug-ins. It sounds like it now returns a standard Java URL,
e.g., http, file, jar, and the javadoc should say so.

Bob Foster


----- Original Message ----- 
From: "Jeff McAffer" <Jeff_McAffer@xxxxxxxxxx>
To: <eclipse-dev@xxxxxxxxxxx>
Sent: Monday, January 19, 2004 1:17 PM
Subject: Re: [eclipse-dev] resolve(URL) and asLocalURL()


> Minor point but want to be sure that people understand.  The goal of the
> API is to try and reduce the given URL to something more commonly known.
> Traditionally an input of a platform: URL would be converted.  All others
> were returned as is.  The new runtime has a couple of new URL types (the
> ones you were seeing being returned last night).  Since these fill a
> similar role to the platform:/plugin URL, we are updating the behaviour to
> be similar. Tom mentioned this.
>
> I would like to stress that Platform.resolve(URL) is/will not be spec'd to
> return any particular kind of URL.  In the future we want to be able to
> run with plugins in jars.  In this case the result would likely be a jar:
> url.  If the plugin was on a web server, it might be http:, etc etc.
>
> The purpose of Platform.asLocalURL() is to ensure that the resource
> indicated by the given URL is in fact available directly on the local file
> system (via a file: or jar: url)  resolve() is similar but does not
> actually fetch the URL.
>
> Users of these API should consider their usecases and choose which one
> makes the most sense for them.
>
> Jeff
>
>
>
>
> Thomas Watson <tjwatson@xxxxxxxxxx>
> Sent by: eclipse-dev-admin@xxxxxxxxxxx
> 01/19/2004 01:45 PM
> Please respond to
> eclipse-dev
>
>
> To
> eclipse-dev@xxxxxxxxxxx
> cc
>
> Subject
> Re: [eclipse-dev] resolve(URL) and asLocalURL()
>
>
>
>
>
>
>
> After some discussion it has been decided to revert back to the previous
> behavior for resolve(URL) to return a file or jar URL.
>
> The reason the change was done was to prepare for running plugins out of
> jars instead of running out directories.  The problem is the resource that
> a platform URL could reference might not be an actual file on the
> filesystem.  It may reference a zipentry in a zipped up plugin.  Or if you
> are trying to run plugins from a remote server then it may actually be an
> http URL.  The resolve API makes no gaurantee on the type of URL that it
> returns.  With that said it is a bit brutal to change the URL type to
> something other than a default java supplied protocol (file, jar, http
> etc).  So the behavior of resolve(URL) will be to return a URL that uses
> one of the java supplied protocols.  For plugins running out of
> directories this will continue to be a file URL.  But for plugins that run
> out of jars this will be a jar URL.  This should allow our current
> usecases of resolve(URL) to work because eclipse currently runs out of
> directories so a file URL will always be returned.  But please note that
> if eclipse is to ever run out of jars and you have code that requires a
> file URL then you must use the asLocalURL() since this will force a cache
> of the resource the platform URL references so that a proper file URL can
> be created.
>
> Thomas Watson
> Pervasive Development
> Phone: 512-838-4533 Tie: 678-4533
> tjwatson@xxxxxxxxxx
>
>
>
>
> Dejan Glozic <dejan@xxxxxxxxxx>
> Sent by: eclipse-dev-admin@xxxxxxxxxxx
> 01/19/2004 10:46 AM
> Please respond to eclipse-dev
>
>         To:        eclipse-dev@xxxxxxxxxxx
>         cc:
>         Subject:        [eclipse-dev] resolve(URL) and asLocalURL()
>
>
>
>
>
>
>
> This change is causing a lot of breakage. Can you describe the benefit of
> this breaking change that justifies the pain?
>
> Regards,
>
> Dejan Glozic, Ph.D.
> Manager, Eclipse Development 1A
> D2/R0Q/8200/MKM
> IBM Canada Ltd.
> Tel. 905 413-2745  T/L 969-2745
> Fax. 905 413-4854
>
> _______________________________________________
> eclipse-dev mailing list
> eclipse-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> http://dev.eclipse.org/mailman/listinfo/eclipse-dev
>
>



Back to the top