aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDariusz Luksza2010-08-18 19:32:14 (EDT)
committerDariusz Luksza2010-08-18 19:32:14 (EDT)
commit2de643fbdda2f114ff0372699421583c0fc4d6ac (patch)
tree6fe7ff18d0263835c861743a73be06dc5076688c
parent633df748b847637b40e482deba03d32b4062a108 (diff)
downloadegit-2de643fbdda2f114ff0372699421583c0fc4d6ac.zip
egit-2de643fbdda2f114ff0372699421583c0fc4d6ac.tar.gz
egit-2de643fbdda2f114ff0372699421583c0fc4d6ac.tar.bz2
Don't show expand indicator for files in ChangeSetrefs/changes/29/1329/1
Method hasChildren() from SynchronizationContentProvider was returning true for GitBlobMapping files becouse they contains TresourceTraversal instance. This cannot be changed because when empty traversal array is returned then none of files are shown in synchronize view. Therefore I've decided to overwrite hasChildren() method in GitChangeSetContentProvider. Bug: 322919 Change-Id: I98530a24ee8a433b28b48a8c0f1d89ef34ed9448 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/mapping/GitChangeSetContentProvider.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/mapping/GitChangeSetContentProvider.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/mapping/GitChangeSetContentProvider.java
index db1119a..a800def 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/mapping/GitChangeSetContentProvider.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/mapping/GitChangeSetContentProvider.java
@@ -18,6 +18,7 @@ import org.eclipse.egit.core.Activator;
import org.eclipse.egit.core.synchronize.GitSubscriberMergeContext;
import org.eclipse.egit.core.synchronize.GitSubscriberResourceMappingContext;
import org.eclipse.egit.ui.internal.synchronize.GitChangeSetModelProvider;
+import org.eclipse.egit.ui.internal.synchronize.model.GitModelBlob;
import org.eclipse.egit.ui.internal.synchronize.model.GitModelRoot;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.team.core.mapping.ISynchronizationContext;
@@ -35,6 +36,14 @@ public class GitChangeSetContentProvider extends SynchronizationContentProvider
private GitModelRoot modelRoot;
@Override
+ public boolean hasChildren(Object element) {
+ if (element instanceof GitModelBlob)
+ return false;
+
+ return super.hasChildren(element);
+ }
+
+ @Override
protected ITreeContentProvider getDelegateContentProvider() {
if (provider == null)
provider = new WorkbenchContentProvider();