[jbosstools-commits] JBoss Tools SVN: r43643 - in trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central: editors and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Sep 13 07:00:57 EDT 2012


Author: fbricon
Date: 2012-09-13 07:00:56 -0400 (Thu, 13 Sep 2012)
New Revision: 43643

Modified:
   trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
   trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-12605 : prevent bad icon paths from breaking the Project Example section in JBoss Central


Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java	2012-09-13 10:51:06 UTC (rev 43642)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java	2012-09-13 11:00:56 UTC (rev 43643)
@@ -339,6 +339,10 @@
 			return image;
 		}
 		ImageDescriptor imageDescriptor = getImageDescriptor(imagePath);
+		if (imageDescriptor == null) {
+			logWarning(imagePath + " can not be found!");
+			return null;
+		}
 		image = imageDescriptor.createImage();
 		registry.put(imagePath, image);
 		return image;

Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java	2012-09-13 10:51:06 UTC (rev 43642)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java	2012-09-13 11:00:56 UTC (rev 43643)
@@ -970,7 +970,7 @@
 		
 		String iconPath = tutorial.getIconPath();
 		if (iconPath != null) {
-		  Image image = JBossCentralActivator.getDefault().getImage(tutorial.getIconPath());
+		  Image image = JBossCentralActivator.getDefault().getImage(iconPath);
 		  if (image != null) {
 		    tutorialText.setImage("image", image);
 		  }



More information about the jbosstools-commits mailing list