if(resource != null && resource.getLocation() != null) {
// This is the best case, it means we should have an accurate path.
return getFilePath(resource.getLocation());
}
if(sourceModule instanceof ExternalSourceModule) {
ExternalSourceModule externalSourceModule = (ExternalSourceModule) sourceModule;
IStorage storage = externalSourceModule.getStorage();
return getFilePath(storage.getFullPath());
}
if(sourceModule.isWorkingCopy()) {
try {