item.setImage(branchImage);
item.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
GitSynchronizeData data;
try {
data = new GitSynchronizeData(repo, HEAD, name, true);
if (!(selectedResource instanceof IProject)) {
HashSet<IResource> resources = new HashSet<IResource>();
resources.add(selectedResource);
data.setIncludedResources(resources);
}
GitModelSynchronize.launch(data, new IResource[] { selectedResource });
} catch (IOException e) {
Activator.logError(e.getMessage(), e);