Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-04-30 13:12:31 +0000
committerJean Michel-Lemieux2002-04-30 13:12:31 +0000
commit240305b1bfd6a0f1336f36a444ce307a5a20d4f4 (patch)
tree650f5f059fdf5360444ce3b12db8e9eaf79ed0e6
parent71e0138874ab464f696f6ab3bb7abd987580732b (diff)
downloadeclipse.platform.team-240305b1bfd6a0f1336f36a444ce307a5a20d4f4.tar.gz
eclipse.platform.team-240305b1bfd6a0f1336f36a444ce307a5a20d4f4.tar.xz
eclipse.platform.team-240305b1bfd6a0f1336f36a444ce307a5a20d4f4.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java16
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithBaseAction.java62
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java121
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java55
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java14
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/CatchupReleaseViewer.java17
8 files changed, 103 insertions, 191 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java
index 82777de59..b560d36b3 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java
@@ -20,11 +20,16 @@ import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
import org.eclipse.team.ui.sync.SyncView;
public class CVSLocalCompareEditorInput extends CVSSyncCompareInput {
- CVSTag tag;
+ CVSTag[] tags;
+
+ public CVSLocalCompareEditorInput(IResource[] resources, CVSTag[] tags) {
+ super(resources);
+ this.tags = tags;
+ }
public CVSLocalCompareEditorInput(IResource[] resources, CVSTag tag) {
super(resources);
- this.tag = tag;
+ this.tags = new CVSTag[] {tag};
}
public Viewer createDiffViewer(Composite parent) {
@@ -41,6 +46,7 @@ public class CVSLocalCompareEditorInput extends CVSSyncCompareInput {
try {
for (int i = 0; i < trees.length; i++) {
IResource resource = resources[i];
+ CVSTag tag = i > tags.length ? tags[0] : tags[i];
IRemoteResource remote = CVSWorkspaceRoot.getRemoteTree(resource, tag, Policy.subMonitorFor(monitor, 50));
trees[i] = new CVSCompareSyncElement(resource, remote);
}
@@ -51,12 +57,8 @@ public class CVSLocalCompareEditorInput extends CVSSyncCompareInput {
return trees;
}
- public CVSTag getTag() {
- return tag;
- }
-
public String getTitle() {
- return "CVS Compare [" + tag.getName() +"]";
+ return "CVS Compare [" + tags[0].getName() +"]";
}
public boolean isSaveNeeded() {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java
index 55631f8f5..ff3af4653 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java
@@ -21,8 +21,8 @@ import org.eclipse.team.internal.ccvs.ui.ResourceEditionNode;
import org.eclipse.team.ui.actions.TeamAction;
/**
- * This action is used for comparing two arbitrary resource
- * editions.
+ * This action is used for comparing two arbitrary remote resources. This is
+ * enabled in the repository explorer.
*/
public class CompareRemoteResourcesAction extends TeamAction {
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithBaseAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithBaseAction.java
index 404f6b5a5..5fb96a4e7 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithBaseAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithBaseAction.java
@@ -5,80 +5,24 @@ package org.eclipse.team.internal.ccvs.ui.actions;
* All Rights Reserved.
*/
-import java.lang.reflect.InvocationTargetException;
-
import org.eclipse.compare.CompareUI;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.internal.ccvs.core.CVSTag;
import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSCompareEditorInput;
-import org.eclipse.team.internal.ccvs.ui.CVSResourceNode;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.ResourceEditionNode;
+import org.eclipse.team.internal.ccvs.ui.CVSLocalCompareEditorInput;
import org.eclipse.team.ui.actions.TeamAction;
/**
* Action for container compare with base.
*/
-public class CompareWithBaseAction extends TeamAction {
+public class CompareWithBaseAction extends CompareWithTagAction {
/*
* Method declared on IActionDelegate.
*/
public void run(IAction action) {
-
- // Setup the holders
- final IResource[] resource = new IResource[] {null};
- final ICVSRemoteResource[] remoteResource = new ICVSRemoteResource[] { null };
-
- // Fetch the remote tree
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- IResource[] resources = getSelectedResources();
- if (resources.length != 1) return;
- resource[0] = resources[0];
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource[0]);
-
- monitor.beginTask(Policy.bind("CompareWithRemoteAction.fetching"), 100); //$NON-NLS-1$
- remoteResource[0] = CVSWorkspaceRoot.getRemoteTree(resource[0], CVSTag.BASE, Policy.subMonitorFor(monitor, 100));
- monitor.done();
-
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- }, Policy.bind("CompareWithRemoteAction.compare"), PROGRESS_DIALOG); //$NON-NLS-1$
-
- // Just to be safe...
- if (remoteResource[0] == null) {
- MessageDialog.openInformation(getShell(), Policy.bind("CompareWithRemoteAction.noRemote"), Policy.bind("CompareWithRemoteAction.noRemoteLong")); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
-
- // Open the compare view
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- CompareUI.openCompareEditor(new CVSCompareEditorInput(new CVSResourceNode(resource[0]), new ResourceEditionNode(remoteResource[0])));
- }
- }, Policy.bind("CompareWithRemoteAction.compare"), PROGRESS_BUSYCURSOR); //$NON-NLS-1$
-
- }
-
- protected boolean isEnabled() {
- IResource[] resources = getSelectedResources();
- if (resources.length != 1) return false;
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(resources[0].getProject(), CVSProviderPlugin.getTypeId());
- if(provider==null) return false;
- return provider.hasRemote(resources[0]);
+ CompareUI.openCompareEditor(new CVSLocalCompareEditorInput(getSelectedResources(), CVSTag.BASE));
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java
index 7429b7682..a894c1bd3 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java
@@ -11,10 +11,12 @@ import org.eclipse.compare.CompareUI;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.core.TeamException;
+import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.internal.ccvs.core.CVSTag;
import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
@@ -25,83 +27,70 @@ import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
import org.eclipse.team.internal.ccvs.ui.CVSCompareEditorInput;
+import org.eclipse.team.internal.ccvs.ui.CVSLocalCompareEditorInput;
import org.eclipse.team.internal.ccvs.ui.CVSResourceNode;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.team.internal.ccvs.ui.ResourceEditionNode;
import org.eclipse.team.ui.actions.TeamAction;
-/**
- * Action for container compare with stream.
- */
-public class CompareWithRemoteAction extends TeamAction {
- /*
- * Method declared on IActionDelegate.
- */
+public class CompareWithRemoteAction extends CompareWithTagAction {
+
public void run(IAction action) {
-
- // Setup the holders
- final IResource[] resource = new IResource[] {null};
- final CVSTag[] tag = new CVSTag[] {null};
- final ICVSRemoteResource[] remoteResource = new ICVSRemoteResource[] { null };
-
- // Fetch the remote tree
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- IResource[] resources = getSelectedResources();
- if (resources.length != 1) return;
- resource[0] = resources[0];
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource[0]);
- if (cvsResource.isFolder()) {
- FolderSyncInfo folderInfo = ((ICVSFolder)cvsResource).getFolderSyncInfo();
- if (folderInfo!=null) {
- tag[0] = folderInfo.getTag();
- }
- } else {
- ResourceSyncInfo info = cvsResource.getSyncInfo();
- if (info!=null) {
- tag[0] = info.getTag();
- }
- }
- if (tag[0]==null) {
- if (cvsResource.getParent().isCVSFolder()) {
- tag[0] = cvsResource.getParent().getFolderSyncInfo().getTag();
- } else {
- // XXX: this is wrong :> should return an error
- tag[0] = CVSTag.DEFAULT;
- }
- }
-
- monitor.beginTask(Policy.bind("CompareWithRemoteAction.fetching"), 100); //$NON-NLS-1$
- remoteResource[0] = CVSWorkspaceRoot.getRemoteTree(resource[0], tag[0], Policy.subMonitorFor(monitor, 100));
- monitor.done();
-
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
+ IResource[] resources;
+ resources = getSelectedResources();
+ CVSTag[] tags = new CVSTag[resources.length];
+ try {
+ for (int i = 0; i < resources.length; i++) {
+ tags[i] = getTag(resources[i]);
+ }
+ CompareUI.openCompareEditor(new CVSLocalCompareEditorInput(resources, tags));
+ } catch(CVSException e) {
+ ErrorDialog.openError(getShell(), Policy.bind("CompareWithRemoteAction.compare"),
+ Policy.bind("CompareWithRemoteAction.noRemoteLong"), e.getStatus());
+ }
+ }
+
+ protected CVSTag getTag(IResource resource) throws CVSException {
+ ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
+ CVSTag tag = null;
+ if (cvsResource.isFolder()) {
+ FolderSyncInfo folderInfo = ((ICVSFolder)cvsResource).getFolderSyncInfo();
+ if (folderInfo!=null) {
+ tag = folderInfo.getTag();
+ }
+ } else {
+ ResourceSyncInfo info = cvsResource.getSyncInfo();
+ if (info!=null) {
+ tag = info.getTag();
}
- }, Policy.bind("CompareWithRemoteAction.compare"), PROGRESS_DIALOG); //$NON-NLS-1$
-
- // Just to be safe...
- if (remoteResource[0] == null) {
- MessageDialog.openInformation(getShell(), Policy.bind("CompareWithRemoteAction.noRemote"), Policy.bind("CompareWithRemoteAction.noRemoteLong")); //$NON-NLS-1$ //$NON-NLS-2$
- return;
}
-
- // Open the compare view
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- CompareUI.openCompareEditor(new CVSCompareEditorInput(new CVSResourceNode(resource[0]), new ResourceEditionNode(remoteResource[0])));
+ if (tag==null) {
+ if (cvsResource.getParent().isCVSFolder()) {
+ tag = cvsResource.getParent().getFolderSyncInfo().getTag();
}
- }, Policy.bind("CompareWithRemoteAction.compare"), PROGRESS_BUSYCURSOR); //$NON-NLS-1$
-
+ }
+ return tag;
}
protected boolean isEnabled() {
IResource[] resources = getSelectedResources();
- if (resources.length != 1) return false;
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(resources[0].getProject(), CVSProviderPlugin.getTypeId());
- if(provider==null) return false;
- return provider.hasRemote(resources[0]);
+ // allow operation for homegeneous multiple selections
+ if(resources.length>0) {
+ for (int i = 0; i < resources.length; i++) {
+ IResource resource = resources[i];
+ if(RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId()) == null) {
+ return false;
+ }
+ try {
+ if(getTag(resource) == null) {
+ return false;
+ }
+ } finally {
+ return false;
+ }
+ }
+ return true;
+ }
+ return false;
}
-}
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java
index 5d685f739..b1a169731 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java
@@ -5,65 +5,40 @@ package org.eclipse.team.internal.ccvs.ui.actions;
* All Rights Reserved.
*/
-import java.lang.reflect.InvocationTargetException;
-
import org.eclipse.compare.CompareUI;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.internal.ccvs.core.CVSTag;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSCompareEditorInput;
import org.eclipse.team.internal.ccvs.ui.CVSLocalCompareEditorInput;
-import org.eclipse.team.internal.ccvs.ui.CVSResourceNode;
import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.ResourceEditionNode;
import org.eclipse.team.internal.ccvs.ui.TagSelectionDialog;
import org.eclipse.team.ui.actions.TeamAction;
-/**
- * Action for compare with tag.
- */
public class CompareWithTagAction extends TeamAction {
- /*
- * Method declared on IActionDelegate.
- */
+
public void run(IAction action) {
-
- // Setup the holders
- final CVSTag[] tag = new CVSTag[] {null};
+ final CVSTag tag;
final ICVSRemoteResource[] remoteResource = new ICVSRemoteResource[] { null };
final IResource[] resources = getSelectedResources();
-
-
- // Show a busy curesor while popping up the Tag selection dialog
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- IProject[] projects = new IProject[resources.length];
- for (int i = 0; i < resources.length; i++) {
- projects[i] = resources[i].getProject();
- }
- TagSelectionDialog dialog = new TagSelectionDialog(getShell(), projects, Policy.bind("CompareWithTagAction.message")); //$NON-NLS-1$
- dialog.setBlockOnOpen(true);
- int result = dialog.open();
- if (result == Dialog.CANCEL || dialog.getResult() == null) {
- return;
- }
- tag[0] = dialog.getResult();
- }
- }, Policy.bind("CompareWithTagAction.compare"), PROGRESS_BUSYCURSOR); //$NON-NLS-1$
- if (tag[0] == null) return;
-
- CompareUI.openCompareEditor(new CVSLocalCompareEditorInput(resources, tag[0]));
+ IProject[] projects = new IProject[resources.length];
+ for (int i = 0; i < resources.length; i++) {
+ projects[i] = resources[i].getProject();
+ }
+ TagSelectionDialog dialog = new TagSelectionDialog(getShell(), projects, Policy.bind("CompareWithTagAction.message")); //$NON-NLS-1$
+ dialog.setBlockOnOpen(true);
+ int result = dialog.open();
+ if (result == Dialog.CANCEL || dialog.getResult() == null) {
+ return;
+ }
+ tag = dialog.getResult();
+ if (tag == null) return;
+ CompareUI.openCompareEditor(new CVSLocalCompareEditorInput(resources, tag));
}
protected boolean isEnabled() {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
index 6ded94d76..4be08cb33 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
@@ -300,10 +300,14 @@ public class CVSCatchupReleaseViewer extends CatchupReleaseViewer {
mergeRecursive((IDiffElement)element, needsMerge);
}
}
- IRemoteSyncElement[] files = (IRemoteSyncElement[]) needsMerge.toArray(new IRemoteSyncElement[needsMerge.size()]);
+ TeamFile[] files = (TeamFile[]) needsMerge.toArray(new TeamFile[needsMerge.size()]);
if(files.length != 0) {
try {
- CVSUIPlugin.getPlugin().getRepositoryManager().merged(files);
+ for (int i = 0; i < files.length; i++) {
+ TeamFile teamFile = (TeamFile)files[i];
+ CVSUIPlugin.getPlugin().getRepositoryManager().merged(new IRemoteSyncElement[] {teamFile.getMergeResource().getSyncElement()});
+ teamFile.merged();
+ }
} catch(TeamException e) {
ErrorDialog.openError(getControl().getShell(), null, null, e.getStatus());
}
@@ -345,11 +349,7 @@ public class CVSCatchupReleaseViewer extends CatchupReleaseViewer {
}
} else if(element instanceof TeamFile) {
TeamFile file = (TeamFile)element;
- file.merged();
- needsMerge.add(file.getMergeResource().getSyncElement());
- ISelection s = getSelection();
- setSelection(new StructuredSelection(element.getParent()));
- setSelection(s);
+ needsMerge.add(file);
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java
index 9b923d3dd..ebb1cb295 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java
@@ -146,7 +146,10 @@ public class CVSSyncCompareInput extends SyncCompareInput {
updateView();
// prompt user with warning
- promptForConfirmMerge(getShell());
+ Shell shell = getShell();
+ if(shell != null) {
+ promptForConfirmMerge(getShell());
+ }
}
/*
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/CatchupReleaseViewer.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/CatchupReleaseViewer.java
index f80d4acfd..1cb22535d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/CatchupReleaseViewer.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/CatchupReleaseViewer.java
@@ -404,15 +404,14 @@ public abstract class CatchupReleaseViewer extends DiffTreeViewer implements ISe
if(file.getKind() != IRemoteSyncElement.IN_SYNC) {
if(file.getRight() == null || file.getLeft() == null) {
file.copy(false /* right to left */);
- } else {
- ITypedElement te = file.getLeft();
- ITypedElement rte = file.getRight();
- if(te instanceof IEditableContent) {
- IEditableContent editable = (IEditableContent)te;
- if(editable.isEditable()) {
- if(rte instanceof BufferedContent) {
- editable.setContent(((BufferedContent)rte).getContent());
- }
+ }
+ ITypedElement te = file.getLeft();
+ ITypedElement rte = file.getRight();
+ if(te instanceof IEditableContent) {
+ IEditableContent editable = (IEditableContent)te;
+ if(editable.isEditable()) {
+ if(rte instanceof BufferedContent) {
+ editable.setContent(((BufferedContent)rte).getContent());
}
}
}

Back to the top