protected DeploymentContext createChildDeploymentContext(DeploymentContext parent, ContextInfo child) throws Exception
{
if (parent instanceof VFSDeploymentContext)
{
VFSDeploymentContext vfsParent = (VFSDeploymentContext) parent;
String path = child.getPath();
try
{
VirtualFile parentFile = vfsParent.getRoot();
VirtualFile file = parentFile.getChild(path);
return new AbstractVFSDeploymentContext(applyModification(file.exists() ? file : null, child), path);
}
catch (RuntimeException t)
{
throw DeploymentException.rethrowAsDeploymentException("Unable to determine child " + path + " from parent " + vfsParent.getRoot().getName(), t);
}
}
return super.createChildDeploymentContext(parent, child);
}