aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Vosburgh2013-06-11 15:11:18 (EDT)
committerGerrit Code Review @ Eclipse.org2013-06-21 15:48:14 (EDT)
commitd5f4e3d2d6eabbfa9bf71d25c3b3f41366d1ef6d (patch)
tree6c76c44b519c316ad5ea17d925bc428589869362
parent94fa45abcc62c6cb4ae4cf3f0bd6fc127328da1d (diff)
downloadeclipse.platform.ui-d5f4e3d2d6eabbfa9bf71d25c3b3f41366d1ef6d.zip
eclipse.platform.ui-d5f4e3d2d6eabbfa9bf71d25c3b3f41366d1ef6d.tar.gz
eclipse.platform.ui-d5f4e3d2d6eabbfa9bf71d25c3b3f41366d1ef6d.tar.bz2
Bug 410528 - Change ProjectExplorer to use its viewer's label providerrefs/changes/58/13758/2
to build its content description
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java
index 178b5b5..20584d0 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java
@@ -28,6 +28,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.ui.IAggregateWorkingSet;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IWorkbench;
@@ -110,6 +111,11 @@ public final class ProjectExplorer extends CommonNavigator {
}
if (!(input instanceof IResource)) {
+ String label = ((ILabelProvider) getCommonViewer().getLabelProvider()).getText(input);
+ if (label != null) {
+ setContentDescription(label);
+ return;
+ }
if (input instanceof IAdaptable) {
IWorkbenchAdapter wbadapter = (IWorkbenchAdapter) ((IAdaptable) input)
.getAdapter(IWorkbenchAdapter.class);