String url = null; IStructuredSelection selection = getStructuredSelection(); if (selection.size() == 1) { ISynchronizeModelElement element = (ISynchronizeModelElement)selection.getFirstElement(); IResource resource = element.getResource(); ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource); try { url = svnResource.getStatus().getUrlString(); if ((url == null) || (resource.getType() == IResource.FILE)) url = Util.getParentUrl(svnResource); } catch (SVNException e) { e.printStackTrace(); } } return new CommitSynchronizeOperation(configuration, elements, url);
ArrayList selectedElements = new ArrayList(); IStructuredSelection selection = getStructuredSelection(); Iterator iter = selection.iterator(); while (iter.hasNext()) { ISynchronizeModelElement synchronizeModelElement = (ISynchronizeModelElement)iter.next(); IResource resource = synchronizeModelElement.getResource(); selectedElements.add(resource); } IResource[] resources = new IResource[selectedElements.size()]; selectedElements.toArray(resources); return new CommitSynchronizeOperation(configuration, elements, resources);
	protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {		String url = null;	    IStructuredSelection selection = getStructuredSelection();	    if (selection.size() == 1) {	        ISynchronizeModelElement element = (ISynchronizeModelElement)selection.getFirstElement();		    IResource resource = element.getResource();		    ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource);            try {                url = svnResource.getStatus().getUrlString();                if ((url == null) || (resource.getType() == IResource.FILE)) url = Util.getParentUrl(svnResource);            } catch (SVNException e) {                e.printStackTrace();            }	    	    }	    return new CommitSynchronizeOperation(configuration, elements, url);	}	