Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2004-03-15 19:25:21 +0000
committerJean Michel-Lemieux2004-03-15 19:25:21 +0000
commit07914a7a99185a1693fd6d094860febc27f4a43f (patch)
treef3c12ce238c8a5d751fcaab0d94a2ca18db15271
parentf431111dff9f43819e100c99754a85f22b75ea88 (diff)
downloadeclipse.platform.team-07914a7a99185a1693fd6d094860febc27f4a43f.tar.gz
eclipse.platform.team-07914a7a99185a1693fd6d094860febc27f4a43f.tar.xz
eclipse.platform.team-07914a7a99185a1693fd6d094860febc27f4a43f.zip
Bug 54854 Replace with revision
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeDialog.java37
3 files changed, 32 insertions, 13 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
index 1dbaef57a..925a69048 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
@@ -317,6 +317,6 @@ public class CVSCompareRevisionsInput extends CompareEditorInput {
*/
public String getTitle() {
String resourceName = resource.getName();
- return Policy.bind("CVSCompareRevisionsInput.compareResourceAndVersions", new Object[] {resourceName}); //$NON-NLS-1$
+ return Policy.bind("CVSCompareRevisionsInput.compareResourceAndVersions", new Object[] {resource.getFullPath().toString()}); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java
index b5f4141df..10c68f249 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java
@@ -35,6 +35,10 @@ public class ReplaceWithRevisionAction extends CompareWithRevisionAction {
public ReplaceCompareDialog(Shell shell, String title, CVSCompareRevisionsInput input) {
super(shell, title, input);
+
+ // Don't allow editing of the merge viewers in the replace
+ input.getCompareConfiguration().setLeftEditable(false);
+ input.getCompareConfiguration().setRightEditable(false);
}
/**
@@ -51,7 +55,7 @@ public class ReplaceWithRevisionAction extends CompareWithRevisionAction {
}
}
);
- super.createButtonsForButtonBar(parent);
+ // Don't call super because we don't want the OK button to appear
}
/**
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeDialog.java
index d43bc3429..b9275f3ce 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeDialog.java
@@ -112,22 +112,20 @@ public class SynchronizeDialog extends ResizableDialog implements IPropertyChang
* @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
*/
protected void buttonPressed(int buttonId) {
- if (fCompareEditorInput.isSaveNeeded() && MessageDialog.openConfirm(getShell(), Policy.bind("ParticipantCompareDialog.2"), Policy.bind("ParticipantCompareDialog.3"))) { //$NON-NLS-1$ //$NON-NLS-2$
- BusyIndicator.showWhile(null, new Runnable() {
- public void run() {
- try {
- fCompareEditorInput.saveChanges(new NullProgressMonitor());
- } catch (CoreException e) {
- Utils.handle(e);
- }
- }
- });
- }
+ saveChanges();
if(buttonId == IDialogConstants.OK_ID && isRememberParticipant()) {
rememberParticipant();
}
super.buttonPressed(buttonId);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.compare.internal.ResizableDialog#close()
+ */
+ public boolean close() {
+ saveChanges();
+ return super.close();
+ }
protected boolean isRememberParticipant() {
return getParticipant() != null && rememberParticipantButton != null && rememberParticipantButton.getSelection();
@@ -155,6 +153,23 @@ public class SynchronizeDialog extends ResizableDialog implements IPropertyChang
}
}
+ /**
+ * Save any changes to the compare editor.
+ */
+ private void saveChanges() {
+ if (fCompareEditorInput.isSaveNeeded() && MessageDialog.openConfirm(getShell(), Policy.bind("ParticipantCompareDialog.2"), Policy.bind("ParticipantCompareDialog.3"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ BusyIndicator.showWhile(null, new Runnable() {
+ public void run() {
+ try {
+ fCompareEditorInput.saveChanges(new NullProgressMonitor());
+ } catch (CoreException e) {
+ Utils.handle(e);
+ }
+ }
+ });
+ }
+ }
+
protected Object getParticipant() {
return participant;
}

Back to the top