Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2004-05-12 20:36:19 +0000
committerJean Michel-Lemieux2004-05-12 20:36:19 +0000
commitbc50ca8bbcba6e64ec46ba07630612f5f4bbe167 (patch)
treea3dc299794eecd0a34739cb18cfd7d08091aa436
parenteac2cb49efc11273981ee7332bf6f350d9940a7d (diff)
downloadeclipse.platform.team-bc50ca8bbcba6e64ec46ba07630612f5f4bbe167.tar.gz
eclipse.platform.team-bc50ca8bbcba6e64ec46ba07630612f5f4bbe167.tar.xz
eclipse.platform.team-bc50ca8bbcba6e64ec46ba07630612f5f4bbe167.zip
Compare with revision is now shown in an editor by default. There is an option to show in a dialog.
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java10
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java23
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties2
5 files changed, 21 insertions, 18 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java
index 0ccfa8e39..1a1bf4b74 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java
@@ -60,7 +60,7 @@ public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPref
private Button determineVersionEnabled;
private Button confirmMoveTag;
private Button debugProtocol;
- private Button showCompareMergeInSyncView;
+ private Button showCompareRevisionInDialog;
private Button never;
private Button prompt;
@@ -174,7 +174,7 @@ public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPref
confirmMoveTag = createCheckBox(composite, Policy.bind("CVSPreferencePage.confirmMoveTag")); //$NON-NLS-1$
debugProtocol = createCheckBox(composite, Policy.bind("CVSPreferencePage.debugProtocol")); //$NON-NLS-1$
usePlatformLineend = createCheckBox(composite, Policy.bind("CVSPreferencePage.lineend")); //$NON-NLS-1$
- showCompareMergeInSyncView = createCheckBox(composite, Policy.bind("CVSPreferencePage.showCompareMergeInSync")); //$NON-NLS-1$
+ showCompareRevisionInDialog = createCheckBox(composite, Policy.bind("CVSPreferencePage.showCompareMergeInSync")); //$NON-NLS-1$
createLabel(composite, ""); createLabel(composite, ""); //$NON-NLS-1$ //$NON-NLS-2$
@@ -282,7 +282,7 @@ public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPref
private void initializeValues() {
IPreferenceStore store = getPreferenceStore();
pruneEmptyDirectoriesField.setSelection(store.getBoolean(ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES));
- showCompareMergeInSyncView.setSelection(store.getBoolean(ICVSUIConstants.PREF_SHOW_COMPARE_MERGE_IN_SYNCVIEW));
+ showCompareRevisionInDialog.setSelection(store.getBoolean(ICVSUIConstants.PREF_SHOW_COMPARE_REVISION_IN_DIALOG));
timeoutValue.setText(new Integer(store.getInt(ICVSUIConstants.PREF_TIMEOUT)).toString());
repositoriesAreBinary.setSelection(store.getBoolean(ICVSUIConstants.PREF_REPOSITORIES_ARE_BINARY));
quietnessCombo.add(Policy.bind("CVSPreferencePage.notquiet")); //$NON-NLS-1$
@@ -348,7 +348,7 @@ public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPref
store.setValue(ICVSUIConstants.PREF_DETERMINE_SERVER_VERSION, determineVersionEnabled.getSelection());
store.setValue(ICVSUIConstants.PREF_CONFIRM_MOVE_TAG, confirmMoveTag.getSelection());
store.setValue(ICVSUIConstants.PREF_DEBUG_PROTOCOL, debugProtocol.getSelection());
- store.setValue(ICVSUIConstants.PREF_SHOW_COMPARE_MERGE_IN_SYNCVIEW, showCompareMergeInSyncView.getSelection());
+ store.setValue(ICVSUIConstants.PREF_SHOW_COMPARE_REVISION_IN_DIALOG, showCompareRevisionInDialog.getSelection());
CVSProviderPlugin.getPlugin().setReplaceUnmanaged(
store.getBoolean(ICVSUIConstants.PREF_REPLACE_UNMANAGED));
@@ -400,7 +400,7 @@ public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPref
repositoriesAreBinary.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_REPOSITORIES_ARE_BINARY));
confirmMoveTag.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_CONFIRM_MOVE_TAG));
debugProtocol.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_DEBUG_PROTOCOL));
- showCompareMergeInSyncView.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_SHOW_COMPARE_MERGE_IN_SYNCVIEW));
+ showCompareRevisionInDialog.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_SHOW_COMPARE_REVISION_IN_DIALOG));
}
private void createSaveCombo(Composite composite) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
index 6044524b2..9a30d848e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
@@ -601,7 +601,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
store.setDefault(ICVSUIConstants.PREF_CONFIRM_MOVE_TAG, CVSProviderPlugin.DEFAULT_CONFIRM_MOVE_TAG);
store.setDefault(ICVSUIConstants.PREF_DEBUG_PROTOCOL, false);
store.setDefault(ICVSUIConstants.PREF_WARN_REMEMBERING_MERGES, true);
- store.setDefault(ICVSUIConstants.PREF_SHOW_COMPARE_MERGE_IN_SYNCVIEW, false);
+ store.setDefault(ICVSUIConstants.PREF_SHOW_COMPARE_REVISION_IN_DIALOG, false);
PreferenceConverter.setDefault(store, ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR, new RGB(0, 0, 0));
PreferenceConverter.setDefault(store, ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR, new RGB(0, 0, 255));
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
index 803a1c8bc..f38c9a7fc 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
@@ -86,7 +86,7 @@ public interface ICVSUIConstants {
public final String PREF_WARN_REMEMBERING_MERGES = "pref_remember_merges"; //$NON-NLS-1$
public final String PREF_FIRST_STARTUP = "pref_first_startup"; //$NON-NLS-1$
public final String PREF_EXT_CONNECTION_METHOD_PROXY = "pref_ext_connection_method_proxy"; //$NON-NLS-1$
- public final String PREF_SHOW_COMPARE_MERGE_IN_SYNCVIEW = "pref_show_compare_merge_in_syncview"; //$NON-NLS-1$
+ public final String PREF_SHOW_COMPARE_REVISION_IN_DIALOG = "pref_show_compare_revision_in_dialog"; //$NON-NLS-1$
// console preferences
public final String PREF_CONSOLE_COMMAND_COLOR = "pref_console_command_color"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
index 45876e135..7c49bffe6 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
@@ -11,6 +11,8 @@
package org.eclipse.team.internal.ccvs.ui.actions;
import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.compare.CompareUI;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -22,6 +24,7 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
+import org.eclipse.team.internal.ccvs.ui.*;
import org.eclipse.team.internal.ccvs.ui.CVSCompareRevisionsInput;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.team.ui.SaveablePartDialog;
@@ -88,16 +91,16 @@ public class CompareWithRevisionAction extends WorkspaceAction {
// Show the compare viewer
run(new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- CVSCompareRevisionsInput input = new CVSCompareRevisionsInput((IFile)getSelectedResources()[0], entries[0]) {
- public String getTitle() {
- return CompareWithRevisionAction.this.getActionTitle();
- }
- };
- // running with a null progress monitor is fine because we have already pre-fetched the log entries above.
- input.run(new NullProgressMonitor());
- SaveablePartDialog cd = createCompareDialog(getShell(), input);
- cd.setBlockOnOpen(true);
- cd.open();
+ CVSCompareRevisionsInput input = new CVSCompareRevisionsInput((IFile)getSelectedResources()[0], entries[0]);
+ if(CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_SHOW_COMPARE_REVISION_IN_DIALOG)) {
+ // running with a null progress monitor is fine because we have already pre-fetched the log entries above.
+ input.run(new NullProgressMonitor());
+ SaveablePartDialog cd = createCompareDialog(getShell(), input);
+ cd.setBlockOnOpen(true);
+ cd.open();
+ } else {
+ CompareUI.openCompareEditor(input);
+ }
}
}, false /* cancelable */, PROGRESS_BUSYCURSOR);
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
index 55c865d93..8d9da4e4a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
@@ -221,7 +221,7 @@ CVSPreferencePage.Auto-&save_4=&Auto-save
CVSPreferencePage.repositoriesAreBinary=&Treat all new files as binary
CVSPreferencePage.determineVersionEnabled=&Validate server version compatibility on first connection
CVSPreferencePage.confirmMoveTag=Confirm &move tag on tag operation
-CVSPreferencePage.showCompareMergeInSync=Display &compare and merge results in the Synchronize View
+CVSPreferencePage.showCompareMergeInSync=Show revision &comparisons in a dialog
CVSRemoteFilePropertySource.name=Name
CVSRemoteFilePropertySource.revision=Revision

Back to the top