package com.anjlab.eclipse.tapestry5;

import java.util.List;

import org.eclipse.core.resources.IFile;

import com.anjlab.eclipse.tapestry5.TapestryUtils.FileNameBuilder;

public class DefaultAssetResolver implements AssetResolver
{
    @Override
    public IFile resolve(final String path, IFile relativeTo) throws AssetException
    {
        List<IFile> files = TapestryUtils.findTapestryFiles(relativeTo, true, new FileNameBuilder()
        {
            @Override
            public String getFileName(String fileName, String fileExtension)
            {
                return path;
            }
        });
        
        if (!files.isEmpty())
        {
            return files.get(0);
        }
        
        throw new AssetException("Couldn't resolve asset from path '" + path + "'");
    }
}

@@ -570,22 +570,279 @@
         
-return
+int lastIndexOfDash = fileName.lastIndexOf('/');%0A                %0A                if (lastIndexOfDash %3C= 0)%0A                %7B%0A                    return path;%0A                %7D%0A                %0A                return fileName.substring(0, lastIndexOfDash) + '/' +
  path;%0A 

Fix DefaultAssetResolver