Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 204881 Details for
Bug 315747
'Consider file contents in comparison' option is completely broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix v01
bug315747.patch (text/plain), 7.23 KB, created by
Tomasz Zarna
on 2011-10-10 09:33:28 EDT
(
hide
)
Description:
Fix v01
Filename:
MIME Type:
Creator:
Tomasz Zarna
Created:
2011-10-10 09:33:28 EDT
Size:
7.23 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSSubscriberMergeContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSSubscriberMergeContext.java >index 6eb6941..39ba0b6 100644 >--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSSubscriberMergeContext.java >+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSSubscriberMergeContext.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2006, 2007 IBM Corporation and others. >+ * Copyright (c) 2006, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -29,6 +29,7 @@ import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer; > import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo; > import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin; > import org.eclipse.team.internal.ccvs.ui.Policy; >+import org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler; > > public abstract class CVSSubscriberMergeContext extends SubscriberMergeContext { > >@@ -245,4 +246,11 @@ public abstract class CVSSubscriberMergeContext extends SubscriberMergeContext { > return super.getAdapter(adapter); > } > >+ protected SubscriberDiffTreeEventHandler getHandler() { >+ Object o = getAdapter(SubscriberDiffTreeEventHandler.class); >+ if (o instanceof SubscriberDiffTreeEventHandler) { >+ return (SubscriberDiffTreeEventHandler) o; >+ } >+ return null; >+ } > } >diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java >index 20e1eab..f5a0631 100644 >--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java >+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2006 IBM Corporation and others. >+ * Copyright (c) 2006, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -10,17 +10,21 @@ > *******************************************************************************/ > package org.eclipse.team.internal.ccvs.ui.mappings; > >-import org.eclipse.core.runtime.CoreException; >-import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.*; >+import org.eclipse.core.runtime.Preferences.IPropertyChangeListener; >+import org.eclipse.core.runtime.Preferences.PropertyChangeEvent; > import org.eclipse.team.core.diff.DiffFilter; > import org.eclipse.team.core.diff.IDiff; > import org.eclipse.team.core.mapping.ISynchronizationScopeManager; > import org.eclipse.team.core.mapping.provider.SynchronizationContext; > import org.eclipse.team.core.subscribers.Subscriber; > 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.internal.core.subscribers.ContentComparisonDiffFilter; >+import org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler; > >-public class CompareSubscriberContext extends CVSSubscriberMergeContext { >+public class CompareSubscriberContext extends CVSSubscriberMergeContext implements IPropertyChangeListener { > > public static SynchronizationContext createContext(ISynchronizationScopeManager manager, CVSCompareSubscriber subscriber) { > CompareSubscriberContext mergeContext = new CompareSubscriberContext(subscriber, manager); >@@ -30,6 +34,15 @@ public class CompareSubscriberContext extends CVSSubscriberMergeContext { > > protected CompareSubscriberContext(Subscriber subscriber, ISynchronizationScopeManager manager) { > super(subscriber, manager); >+ CVSUIPlugin.getPlugin().getPluginPreferences().addPropertyChangeListener(this); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.team.core.subscribers.SubscriberMergeContext#dispose() >+ */ >+ public void dispose() { >+ super.dispose(); >+ CVSUIPlugin.getPlugin().getPluginPreferences().removePropertyChangeListener(this); > } > > /* (non-Javadoc) >@@ -44,13 +57,25 @@ public class CompareSubscriberContext extends CVSSubscriberMergeContext { > * @see org.eclipse.team.core.subscribers.SubscriberMergeContext#getDiffFilter() > */ > protected DiffFilter getDiffFilter() { >- // Return a filter that selects any diffs whose contents are not equal >- final DiffFilter contentsEqual = new ContentComparisonDiffFilter(false); >- return new DiffFilter() { >- public boolean select(IDiff diff, IProgressMonitor monitor) { >- return !contentsEqual.select(diff, monitor); >- } >- }; >+ if (CVSUIPlugin.getPlugin().getPluginPreferences().getBoolean(ICVSUIConstants.PREF_CONSIDER_CONTENTS)) { >+ // Return a filter that selects any diffs whose contents are not equal >+ final DiffFilter contentsEqual = new ContentComparisonDiffFilter(false); >+ return new DiffFilter() { >+ public boolean select(IDiff diff, IProgressMonitor monitor) { >+ return !contentsEqual.select(diff, monitor); >+ } >+ }; >+ } >+ return null; > } > >+ public void propertyChange(PropertyChangeEvent event) { >+ if (event.getProperty().equals(ICVSUIConstants.PREF_CONSIDER_CONTENTS)) { >+ SubscriberDiffTreeEventHandler handler = getHandler(); >+ if (handler != null) { >+ handler.setFilter(getDiffFilter()); >+ handler.reset(); >+ } >+ } >+ } > } >diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java >index 68d8817..e8f8e63 100644 >--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java >+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2006 IBM Corporation and others. >+ * Copyright (c) 2000, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -318,14 +318,6 @@ public class WorkspaceSubscriberContext extends CVSSubscriberMergeContext { > } > } > >- private SubscriberDiffTreeEventHandler getHandler() { >- Object o = getAdapter(SubscriberDiffTreeEventHandler.class); >- if (o instanceof SubscriberDiffTreeEventHandler) { >- return (SubscriberDiffTreeEventHandler) o; >- } >- return null; >- } >- > private GroupProgressMonitor getGroup(IProgressMonitor monitor) { > if (monitor instanceof GroupProgressMonitor) { > return (GroupProgressMonitor) monitor;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 315747
:
204881
|
204882