Author: vyemialyanchyk
Date: 2008-08-04 10:13:23 -0400 (Mon, 04 Aug 2008)
New Revision: 9495
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl/AnyAdaptableLabelProvider.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2592
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl/AnyAdaptableLabelProvider.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl/AnyAdaptableLabelProvider.java 2008-08-04
14:12:29 UTC (rev 9494)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl/AnyAdaptableLabelProvider.java 2008-08-04
14:13:23 UTC (rev 9495)
@@ -36,7 +36,9 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.eclipse.ui.model.IWorkbenchAdapter2;
+import org.hibernate.console.ImageConstants;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.console.utils.EclipseImages;
/**
* LabelProvider based on WorkBenchLabelProvider that is not limited to WorkBench
elements.
@@ -161,10 +163,13 @@
public final Image getImage(Object element) {
//obtain the base image by querying the element
IWorkbenchAdapter adapter = getAdapter(element);
+ ImageDescriptor descriptor = null;
if (adapter == null) {
- return null;
+ descriptor = EclipseImages.getImageDescriptor(ImageConstants.ERROR);
}
- ImageDescriptor descriptor = adapter.getImageDescriptor(element);
+ else {
+ descriptor = adapter.getImageDescriptor(element);
+ }
if (descriptor == null) {
return null;
}