Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-05-01 02:20:51 +0000
committerMichael Valenta2004-05-01 02:20:51 +0000
commit1b6335d4e5dfa9df57a829e44320646b58e92c80 (patch)
tree1c874b55ef664b7684c449e928a0836e434bbef1
parent8a220791a63270021e7c6eaaac9237b2d810c0ad (diff)
downloadeclipse.platform.team-1b6335d4e5dfa9df57a829e44320646b58e92c80.tar.gz
eclipse.platform.team-1b6335d4e5dfa9df57a829e44320646b58e92c80.tar.xz
eclipse.platform.team-1b6335d4e5dfa9df57a829e44320646b58e92c80.zip
33545: File content comparison preference
-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/subscriber/CompareParticipant.java36
2 files changed, 34 insertions, 4 deletions
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 955b0acbb..3d982044e 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
@@ -585,7 +585,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
store.setDefault(ICVSUIConstants.PREF_HISTORY_VIEW_EDITOR_LINKING, false);
store.setDefault(ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES, CVSProviderPlugin.DEFAULT_PRUNE);
store.setDefault(ICVSUIConstants.PREF_TIMEOUT, CVSProviderPlugin.DEFAULT_TIMEOUT);
- store.setDefault(ICVSUIConstants.PREF_CONSIDER_CONTENTS, false);
+ store.setDefault(ICVSUIConstants.PREF_CONSIDER_CONTENTS, true);
store.setDefault(ICVSUIConstants.PREF_COMPRESSION_LEVEL, CVSProviderPlugin.DEFAULT_COMPRESSION_LEVEL);
store.setDefault(ICVSUIConstants.PREF_TEXT_KSUBST, CVSProviderPlugin.DEFAULT_TEXT_KSUBST_OPTION.toMode());
store.setDefault(ICVSUIConstants.PREF_USE_PLATFORM_LINEEND, true);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
index 12a4dd3b4..bc329caf1 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
@@ -12,15 +12,20 @@ package org.eclipse.team.internal.ccvs.ui.subscriber;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
+import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
import org.eclipse.team.core.subscribers.Subscriber;
+import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.SyncInfoFilter;
import org.eclipse.team.internal.ccvs.core.CVSCompareSubscriber;
import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
+import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
+import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
+import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor;
-public class CompareParticipant extends CVSParticipant {
+public class CompareParticipant extends CVSParticipant implements IPropertyChangeListener {
private SyncInfoFilter contentComparison = new SyncInfoFilter() {
private SyncInfoFilter contentCompare = new SyncInfoFilter.ContentComparisonSyncInfoFilter();
@@ -39,7 +44,10 @@ public class CompareParticipant extends CVSParticipant {
*/
protected void setSubscriber(Subscriber subscriber) {
super.setSubscriber(subscriber);
- setSyncInfoFilter(contentComparison);
+ if (CVSUIPlugin.getPlugin().getPluginPreferences().getBoolean(ICVSUIConstants.PREF_CONSIDER_CONTENTS)) {
+ setSyncInfoFilter(contentComparison);
+ }
+ CVSUIPlugin.getPlugin().getPluginPreferences().addPropertyChangeListener(this);
try {
ISynchronizeParticipantDescriptor descriptor = TeamUI.getSynchronizeManager().getParticipantDescriptor(CVSCompareSubscriber.ID);
setInitializationData(descriptor);
@@ -71,4 +79,26 @@ public class CompareParticipant extends CVSParticipant {
super.initializeConfiguration(configuration);
configuration.addMenuGroup(ISynchronizePageConfiguration.P_TOOLBAR_MENU, ISynchronizePageConfiguration.REMOVE_PARTICPANT_GROUP);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.SubscriberParticipant#dispose()
+ */
+ public void dispose() {
+ super.dispose();
+ CVSUIPlugin.getPlugin().getPluginPreferences().removePropertyChangeListener(this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.Preferences.IPropertyChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent)
+ */
+ public void propertyChange(PropertyChangeEvent event) {
+ if (event.getProperty().equals(ICVSUIConstants.PREF_CONSIDER_CONTENTS)) {
+ if (CVSUIPlugin.getPlugin().getPluginPreferences().getBoolean(ICVSUIConstants.PREF_CONSIDER_CONTENTS)) {
+ setSyncInfoFilter(contentComparison);
+ } else {
+ setSyncInfoFilter(new FastSyncInfoFilter());
+ }
+ }
+
+ }
}

Back to the top