Search in sources :

Example 1 with PropertyCompareInput

use of org.tigris.subversion.subclipse.ui.compare.PropertyCompareInput in project subclipse by subclipse.

the class ComparePropertiesDialog method okPressed.

@Override
protected void okPressed() {
    try {
        if (fromWorkingCopyButton.getSelection()) {
            left = new PropertyCompareLocalResourceNode(fromLocalResource, recursiveButton.getSelection(), null);
        } else {
            SVNRevision revision = null;
            if (fromHeadButton.getSelection()) {
                revision = SVNRevision.HEAD;
            } else {
                revision = new SVNRevision.Number(Long.parseLong(fromRevisionText.getText()));
            }
            RemoteFolder remoteFolder = new RemoteFolder(repository, new SVNUrl(fromRepositoryText.getText().trim()), revision);
            left = new PropertyCompareRemoteResourceNode(remoteFolder, revision, recursiveButton.getSelection(), null);
        }
        if (toWorkingCopyButton.getSelection()) {
            right = new PropertyCompareLocalResourceNode(toLocalResource, recursiveButton.getSelection(), null);
        } else {
            SVNRevision revision = null;
            if (toHeadButton.getSelection()) {
                revision = SVNRevision.HEAD;
            } else {
                revision = new SVNRevision.Number(Long.parseLong(toRevisionText.getText()));
            }
            RemoteFolder remoteFolder = new RemoteFolder(repository, new SVNUrl(toRepositoryText.getText().trim()), revision);
            right = new PropertyCompareRemoteResourceNode(remoteFolder, revision, recursiveButton.getSelection(), null);
        }
        input = new PropertyCompareInput(left, right, recursiveButton.getSelection());
    } catch (Exception e) {
        MessageDialog.openError(getShell(), Policy.bind("ComparePropertiesDialog.1"), // $NON-NLS-1$
        e.getMessage());
        return;
    }
    super.okPressed();
}
Also used : PropertyCompareLocalResourceNode(org.tigris.subversion.subclipse.ui.compare.PropertyCompareLocalResourceNode) PropertyCompareInput(org.tigris.subversion.subclipse.ui.compare.PropertyCompareInput) RemoteFolder(org.tigris.subversion.subclipse.core.resources.RemoteFolder) SVNUrl(org.tigris.subversion.svnclientadapter.SVNUrl) PropertyCompareRemoteResourceNode(org.tigris.subversion.subclipse.ui.compare.PropertyCompareRemoteResourceNode) SVNRevision(org.tigris.subversion.svnclientadapter.SVNRevision)

Aggregations

RemoteFolder (org.tigris.subversion.subclipse.core.resources.RemoteFolder)1 PropertyCompareInput (org.tigris.subversion.subclipse.ui.compare.PropertyCompareInput)1 PropertyCompareLocalResourceNode (org.tigris.subversion.subclipse.ui.compare.PropertyCompareLocalResourceNode)1 PropertyCompareRemoteResourceNode (org.tigris.subversion.subclipse.ui.compare.PropertyCompareRemoteResourceNode)1 SVNRevision (org.tigris.subversion.svnclientadapter.SVNRevision)1 SVNUrl (org.tigris.subversion.svnclientadapter.SVNUrl)1