Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [emf-dev] [Fwd: Re: JET template skeleton not found on Windows XP]


Ryan,

The argument to this should be an OS-independant URI, not a OS-dependant file system path, so this shouldn't be changed but rather you should change the data you pass in.


Ed Merks/Toronto/IBM@IBMCA
mailto: merks@xxxxxxxxxx
905-413-3265  (t/l 969)




Ryan Boder <boder@xxxxxxxxxxxxxxxx>
Sent by: emf-dev-bounces@xxxxxxxxxxx

01/16/2006 07:39 AM

Please respond to
Eclipse Modelling Framework

To
emf-dev@xxxxxxxxxxx
cc
Subject
[emf-dev] [Fwd: Re: JET template skeleton not found on Windows XP]





This is copied from the newsgroup but it's more of a mailing list issue.


Subject:      Re: JET template not found on Windows XP
From:         Ryan Boder <boder@xxxxxxxxxxxxxxxx>
Newsgroups:   eclipse.tools.emf
Date:         Sun, 15 Jan 2006 22:32:29 -0500

On Sun, 15 Jan 2006 20:57:40 -0500, Ryan Boder wrote:
> I found the problem. In JETCompiler.resolveLocation(String[]
> templateURIPath, int start, String baseLocationURI, String
locationURI)
> when it works with the baseLocationURI the code assumes it's a unix
style
> path delimited by '/' but on Windows it's a Windows style path
delimited
> by '\'.

I fixed the problem by replacing the "/" to java.io.File.separator.
It works on my machine now. Could someone with commit access to EMF
please
go to

JETCompiler.resolveLocation(String[] templateURIPath, int start, String
baseLocationURI, String locationURI)

to the part that looks like this...

   if (uri.isRelative() && uri.hasRelativePath())
   {
     String resolvedLocation = "";
     int index = baseLocationURI.lastIndexOf("/");
     if (index != -1)
     {
       resolvedLocation = baseLocationURI.substring(0, index + 1);
     }
     resolvedLocation += uri;

and change

     int index = baseLocationURI.lastIndexOf("/");

to

     int index = baseLocationURI.lastIndexOf(File.separator);

so JET will work on Windows?

Thanks,
--
Ryan Boder
http://bitwiserlabs.com

_______________________________________________
emf-dev mailing list
emf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/emf-dev


Back to the top