Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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



Back to the top