&& adapterType == ResourceMapping.class)
return GitObjectMapping.create((GitModelObject) adaptableObject);
if (adaptableObject instanceof GitModelObject
&& adapterType == IResource.class) {
GitModelObject obj = (GitModelObject) adaptableObject;
if (obj instanceof GitModelBlob) {
IResource res = ResourceUtil.getFileForLocation(obj
.getLocation());
if (res == null)
res = root.getFile(obj.getLocation());
return res;
}
if (obj instanceof GitModelTree) {
IResource res = root.getContainerForLocation(obj.getLocation());
if (res == null)
res = root.getFolder(obj.getLocation());
return res;
}
}