roots = prj.getPackageFragmentRoots();
for (IPackageFragmentRoot root : roots) {
if (!root.isArchive()) {
String src = root.getElementName();
src = "/" + src + p; //$NON-NLS-1$
resource = project.findMember(new Path(src));
if (resource != null) {
String ext = resource.getFileExtension();
if (ext.equals("gif") || ext.equals("png") || ext.equals("jpg")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
IPath fullPath = project.getWorkspace().getRoot().getRawLocation().append(resource.getFullPath());
String fullpath = fullPath.toString();