aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2018-07-25 18:57:34 -0400
committerThomas Wolf2018-08-06 15:53:27 -0400
commit9a2209c3b02a34e8fcd409ea897f9743905cc543 (patch)
tree582c8bd7d8dbc2fa423ae6893561d3fec7d758a6
parent6ee58057c2dc1ab8498651e1ab91955289f7e981 (diff)
downloadegit-9a2209c3b02a34e8fcd409ea897f9743905cc543.tar.gz
egit-9a2209c3b02a34e8fcd409ea897f9743905cc543.tar.xz
egit-9a2209c3b02a34e8fcd409ea897f9743905cc543.zip
Rename RepositoriesViewLabelProvider to RepositoryTreeNodeLabelProvider
It's not a label provider for the git repositories view; it is a label provider for RepositoryTreeNodes. (Which happen to be _also_ shown in the git repositories view, but they're also shown and labeled through this class elsewhere.) Change-Id: I5221ba06aaf475b3b577b8ccb2846b62a64331c8 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestUtils.java12
-rw-r--r--org.eclipse.egit.ui/plugin.xml2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectRepositoryPage.java4
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectWizardPage.java5
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranchSelectionDialog.java5
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushTagsPage.java5
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryTreeNodeLabelProvider.java (renamed from org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewLabelProvider.java)8
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/search/CommitSearchPage.java4
8 files changed, 21 insertions, 24 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestUtils.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestUtils.java
index fb19b945c..79df4a474 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestUtils.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestUtils.java
@@ -15,7 +15,7 @@ package org.eclipse.egit.ui.view.repositories;
import java.io.File;
import java.util.concurrent.atomic.AtomicReference;
-import org.eclipse.egit.ui.internal.repository.RepositoriesViewLabelProvider;
+import org.eclipse.egit.ui.internal.repository.RepositoryTreeNodeLabelProvider;
import org.eclipse.egit.ui.internal.repository.tree.AdditionalRefsNode;
import org.eclipse.egit.ui.internal.repository.tree.BranchesNode;
import org.eclipse.egit.ui.internal.repository.tree.LocalNode;
@@ -33,17 +33,17 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
public class GitRepositoriesViewTestUtils {
/**
- * Create a new instance of {@link RepositoriesViewLabelProvider}
+ * Create a new instance of {@link RepositoryTreeNodeLabelProvider}
*
* @return label provider
*/
- public static RepositoriesViewLabelProvider createLabelProvider() {
- final AtomicReference<RepositoriesViewLabelProvider> providerRef = new AtomicReference<>();
+ public static RepositoryTreeNodeLabelProvider createLabelProvider() {
+ final AtomicReference<RepositoryTreeNodeLabelProvider> providerRef = new AtomicReference<>();
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
- providerRef.set(new RepositoriesViewLabelProvider());
+ providerRef.set(new RepositoryTreeNodeLabelProvider());
}
});
@@ -52,7 +52,7 @@ public class GitRepositoriesViewTestUtils {
protected static final TestUtil myUtil = new TestUtil();
- private final RepositoriesViewLabelProvider labelProvider;
+ private final RepositoryTreeNodeLabelProvider labelProvider;
/**
* Create repositories view test utilities
diff --git a/org.eclipse.egit.ui/plugin.xml b/org.eclipse.egit.ui/plugin.xml
index 9b930e20c..351a1187e 100644
--- a/org.eclipse.egit.ui/plugin.xml
+++ b/org.eclipse.egit.ui/plugin.xml
@@ -3157,7 +3157,7 @@
contentProvider="org.eclipse.egit.ui.internal.repository.RepositoriesViewExtensionFactory:org.eclipse.egit.ui.internal.repository.RepositoriesViewContentProvider"
icon="icons/obj16/repository_rep.png"
id="org.eclipse.egit.ui.RepositoriesViewContent"
- labelProvider="org.eclipse.egit.ui.internal.repository.RepositoriesViewLabelProvider"
+ labelProvider="org.eclipse.egit.ui.internal.repository.RepositoryTreeNodeLabelProvider"
name="%GitRepositoriesContentName">
<enablement>
<or>
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectRepositoryPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectRepositoryPage.java
index 1c5d86c90..13292ec40 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectRepositoryPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectRepositoryPage.java
@@ -29,7 +29,7 @@ import org.eclipse.egit.core.internal.gerrit.GerritUtil;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.internal.UIText;
import org.eclipse.egit.ui.internal.repository.RepositoriesViewContentProvider;
-import org.eclipse.egit.ui.internal.repository.RepositoriesViewLabelProvider;
+import org.eclipse.egit.ui.internal.repository.RepositoryTreeNodeLabelProvider;
import org.eclipse.egit.ui.internal.repository.RepositorySearchWizard;
import org.eclipse.egit.ui.internal.repository.tree.RepositoryNode;
import org.eclipse.egit.ui.internal.repository.tree.RepositoryTreeNode;
@@ -161,7 +161,7 @@ public class GitSelectRepositoryPage extends WizardPage {
return false;
}
});
- tv.setLabelProvider(new RepositoriesViewLabelProvider());
+ tv.setLabelProvider(new RepositoryTreeNodeLabelProvider());
Composite tb = new Composite(main, SWT.NONE);
GridLayoutFactory.fillDefaults().numColumns(1).applyTo(tb);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectWizardPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectWizardPage.java
index cedc7f793..fce34ef52 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectWizardPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectWizardPage.java
@@ -23,7 +23,7 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.internal.UIText;
import org.eclipse.egit.ui.internal.repository.RepositoriesViewContentProvider;
-import org.eclipse.egit.ui.internal.repository.RepositoriesViewLabelProvider;
+import org.eclipse.egit.ui.internal.repository.RepositoryTreeNodeLabelProvider;
import org.eclipse.egit.ui.internal.repository.tree.FolderNode;
import org.eclipse.egit.ui.internal.repository.tree.RepositoryTreeNode;
import org.eclipse.egit.ui.internal.repository.tree.RepositoryTreeNodeType;
@@ -200,8 +200,7 @@ public class GitSelectWizardPage extends WizardPage {
tv.setContentProvider(cp);
GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 200)
.applyTo(tv.getTree());
- tv.setLabelProvider(new RepositoriesViewLabelProvider());
-
+ tv.setLabelProvider(new RepositoryTreeNodeLabelProvider());
tv.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranchSelectionDialog.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranchSelectionDialog.java
index e13b607ef..3c67ee8c4 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranchSelectionDialog.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranchSelectionDialog.java
@@ -27,7 +27,7 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.UIUtils;
import org.eclipse.egit.ui.internal.repository.RepositoriesViewContentProvider;
-import org.eclipse.egit.ui.internal.repository.RepositoriesViewLabelProvider;
+import org.eclipse.egit.ui.internal.repository.RepositoryTreeNodeLabelProvider;
import org.eclipse.egit.ui.internal.repository.tree.AdditionalRefNode;
import org.eclipse.egit.ui.internal.repository.tree.AdditionalRefsNode;
import org.eclipse.egit.ui.internal.repository.tree.BranchHierarchyNode;
@@ -278,8 +278,7 @@ public abstract class AbstractBranchSelectionDialog extends TitleAreaDialog {
selectionModel | SWT.BORDER, filter, true);
branchTree = tree.getViewer();
branchTree.setUseHashlookup(true);
- branchTree
- .setLabelProvider(new RepositoriesViewLabelProvider());
+ branchTree.setLabelProvider(new RepositoryTreeNodeLabelProvider());
branchTree.setContentProvider(new RepositoriesViewContentProvider());
ColumnViewerToolTipSupport.enableFor(branchTree);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushTagsPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushTagsPage.java
index 1c2390c39..4bd444db2 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushTagsPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushTagsPage.java
@@ -24,7 +24,7 @@ import org.eclipse.egit.ui.internal.components.FilteredCheckboxTree;
import org.eclipse.egit.ui.internal.components.RemoteSelectionCombo;
import org.eclipse.egit.ui.internal.components.RemoteSelectionCombo.SelectionType;
import org.eclipse.egit.ui.internal.repository.RepositoriesViewContentProvider;
-import org.eclipse.egit.ui.internal.repository.RepositoriesViewLabelProvider;
+import org.eclipse.egit.ui.internal.repository.RepositoryTreeNodeLabelProvider;
import org.eclipse.egit.ui.internal.repository.tree.TagNode;
import org.eclipse.egit.ui.internal.repository.tree.TagsNode;
import org.eclipse.jface.layout.GridDataFactory;
@@ -134,8 +134,7 @@ public class PushTagsPage extends WizardPage {
TagsNode tagsNode = new TagsNode(null, repository);
ContentProvider contentProvider = new ContentProvider(tagsNode);
treeViewer.setContentProvider(contentProvider);
- treeViewer
- .setLabelProvider(new RepositoriesViewLabelProvider());
+ treeViewer.setLabelProvider(new RepositoryTreeNodeLabelProvider());
treeViewer.setComparator(new ViewerComparator(
CommonUtils.STRING_ASCENDING_COMPARATOR));
treeViewer.setInput(tagsNode);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewLabelProvider.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryTreeNodeLabelProvider.java
index 7fb6ee295..ebee104fb 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewLabelProvider.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryTreeNodeLabelProvider.java
@@ -32,7 +32,7 @@ import org.eclipse.ui.model.WorkbenchLabelProvider;
/**
* A decorating label provider for repository tree nodes.
*/
-public class RepositoriesViewLabelProvider
+public class RepositoryTreeNodeLabelProvider
extends DecoratingStyledCellLabelProvider
implements ILabelProvider, IStyledLabelProvider {
@@ -41,13 +41,13 @@ public class RepositoriesViewLabelProvider
private final WeakHashMap<Object, StyledString> previousDecoratedLabels = new WeakHashMap<>();
/**
- * Creates a new {@link RepositoriesViewLabelProvider}.
+ * Creates a new {@link RepositoryTreeNodeLabelProvider}.
*/
- public RepositoriesViewLabelProvider() {
+ public RepositoryTreeNodeLabelProvider() {
this(new WorkbenchLabelProvider());
}
- private RepositoriesViewLabelProvider(
+ private RepositoryTreeNodeLabelProvider(
WorkbenchLabelProvider labelProvider) {
super(labelProvider, PlatformUI.getWorkbench()
.getDecoratorManager().getLabelDecorator(), null);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/search/CommitSearchPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/search/CommitSearchPage.java
index 82c3f1c02..35e6a6e18 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/search/CommitSearchPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/search/CommitSearchPage.java
@@ -28,7 +28,7 @@ import org.eclipse.egit.ui.UIUtils;
import org.eclipse.egit.ui.internal.UIIcons;
import org.eclipse.egit.ui.internal.UIText;
import org.eclipse.egit.ui.internal.repository.RepositoriesViewContentProvider;
-import org.eclipse.egit.ui.internal.repository.RepositoriesViewLabelProvider;
+import org.eclipse.egit.ui.internal.repository.RepositoryTreeNodeLabelProvider;
import org.eclipse.egit.ui.internal.repository.tree.RepositoryNode;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.DialogPage;
@@ -312,7 +312,7 @@ public class CommitSearchPage extends DialogPage implements ISearchPage {
repositoryGroup, SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL
| SWT.BORDER);
this.repositoryViewer
- .setLabelProvider(new RepositoriesViewLabelProvider());
+ .setLabelProvider(new RepositoryTreeNodeLabelProvider());
this.repositoryViewer
.setContentProvider(new RepositoriesViewContentProvider());
this.repositoryViewer