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()



Remembering what we did in PDE, we never needed a file to just read/parse
the file (we could always request the input stream to get the contents).
The only places where we needed to obtain the file was when we wanted to
iterate over the directory content. For example, PDE picks up all the files
in the individual template directories and imports them into the workspace
in the process of generating template-based content. In the context of
running from JARs, we would need an alternative way of listing the content
of a directory that is somewhere else (i.e. inside the JAR instead of the
file system). That would allows us to not expect a file protocol.

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



                                                                           
             Thomas Watson                                                 
             <tjwatson@xxxxxx.                                             
             com>                                                       To 
             Sent by:                  eclipse-dev@xxxxxxxxxxx             
             eclipse-dev-admin                                          cc 
             @eclipse.org                                                  
                                                                   Subject 
                                       Re: [eclipse-dev] resolve(URL) and  
             01/19/2004 01:45          asLocalURL()                        
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
                eclipse-dev                                                
                                                                           
                                                                           





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>                   To:                               
    Sent by:                     eclipse-dev@xxxxxxxxxxx                   
    eclipse-dev-admin@xxxxxxxxxx         cc:                               
    g                                    Subject:        [eclipse-dev]     
                                 resolve(URL) and asLocalURL()             
                                                                           
    01/19/2004 10:46 AM                                                    
    Please respond to                                                      
    eclipse-dev                                                            
                                                                           









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