}
}
protected boolean handleResourcesActivity(IActivity activity) {
if (activity instanceof FileActivity) {
FileActivity fileActivity = ((FileActivity) activity);
IFile file = fileActivity.getPath().getFile();
if (file == null)
return false;
IProject project = file.getProject();
if (isCompletelyShared(project))
return true;
List<IResource> resources = getSharedResources(project);
switch (fileActivity.getType()) {
case Created:
if (!isShared(file))
return false;
if (file.exists()) {
if (resources != null && !resources.contains(file)) {
resources.add(file);
projectMapper.addResourceMapping(project, resources);
return true;
}
} else {
return false;
}
break;
case Removed:
if (!isShared(file))
return false;
if (resources != null && resources.contains(file)) {
resources.remove(file);
projectMapper.addResourceMapping(project, resources);
return true;
}
break;
case Moved:
IFile oldFile = fileActivity.getOldPath().getFile();
if (oldFile == null || !isShared(oldFile))
return false;
List<IResource> res = getSharedResources(oldFile.getProject());
if (res != null) {
if (res.contains(oldFile))