Search in sources :

Example 1 with EditConflictsAction

use of org.tigris.subversion.subclipse.ui.actions.EditConflictsAction in project subclipse by subclipse.

the class MergeResultsView method editConflicts.

private void editConflicts(MergeResult mergeResult) {
    IFile resource = (IFile) mergeResult.getResource();
    ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource);
    try {
        File conflictNewFile = svnResource.getStatus().getConflictNew();
        File conflictOldFile = svnResource.getStatus().getConflictOld();
        File conflictWorkingFile = svnResource.getStatus().getConflictWorking();
        File mergedFile = new File(resource.getLocation().toString());
        if (conflictWorkingFile == null) {
            EditConflictsAction editConflictsAction = new EditConflictsAction(resource);
            editConflictsAction.run(null);
        } else {
            MergeEditConflictsAction editConflictsAction = new MergeEditConflictsAction(conflictNewFile, conflictOldFile, conflictWorkingFile, mergedFile, resource.getName(), null);
            editConflictsAction.setMergeResult(mergeResult);
            editConflictsAction.run(null);
        }
    } catch (Exception e) {
    }
}
Also used : IFile(org.eclipse.core.resources.IFile) MergeEditConflictsAction(com.collabnet.subversion.merge.actions.MergeEditConflictsAction) EditConflictsAction(org.tigris.subversion.subclipse.ui.actions.EditConflictsAction) MergeEditConflictsAction(com.collabnet.subversion.merge.actions.MergeEditConflictsAction) ISVNLocalResource(org.tigris.subversion.subclipse.core.ISVNLocalResource) RemoteFile(org.tigris.subversion.subclipse.core.resources.RemoteFile) ISVNRemoteFile(org.tigris.subversion.subclipse.core.ISVNRemoteFile) IFile(org.eclipse.core.resources.IFile) File(java.io.File) SVNException(org.tigris.subversion.subclipse.core.SVNException) SVNClientException(org.tigris.subversion.svnclientadapter.SVNClientException)

Aggregations

MergeEditConflictsAction (com.collabnet.subversion.merge.actions.MergeEditConflictsAction)1 File (java.io.File)1 IFile (org.eclipse.core.resources.IFile)1 ISVNLocalResource (org.tigris.subversion.subclipse.core.ISVNLocalResource)1 ISVNRemoteFile (org.tigris.subversion.subclipse.core.ISVNRemoteFile)1 SVNException (org.tigris.subversion.subclipse.core.SVNException)1 RemoteFile (org.tigris.subversion.subclipse.core.resources.RemoteFile)1 EditConflictsAction (org.tigris.subversion.subclipse.ui.actions.EditConflictsAction)1 SVNClientException (org.tigris.subversion.svnclientadapter.SVNClientException)1