Author: rob.stryker(a)jboss.com
Date: 2012-04-05 02:34:35 -0400 (Thu, 05 Apr 2012)
New Revision: 40050
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.java
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.properties
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/UIExtensionManager.java
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerLabelProvider.java
Log:
/JBIDE-11452 - damage control
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.java
===================================================================
---
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.java 2012-04-05
06:18:15 UTC (rev 40049)
+++
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.java 2012-04-05
06:34:35 UTC (rev 40050)
@@ -89,6 +89,8 @@
public static String Loading;
public static String UpdatingSelectionJob;
+ public static String JMXUIImageDescriptorNotFound;
+
static {
NLS.initializeMessages("org.jboss.tools.jmx.ui.Messages", //$NON-NLS-1$
Messages.class);
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.properties
===================================================================
---
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.properties 2012-04-05
06:18:15 UTC (rev 40049)
+++
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.properties 2012-04-05
06:34:35 UTC (rev 40050)
@@ -36,9 +36,7 @@
MBeanServerConnectAction_text=Connect...
MBeanServerDisconnectAction_text=Disconnect
MBeanServerDisconnectAction_dialogTitle=JMX Disconnection
-MBeanServerDisconnectAction_dialogText=You are managing MBeans from this server.\n\
-If you disconnect, you will no longer be able to manage them.\n\n\
-Are you sure you want to disconnect?
+MBeanServerDisconnectAction_dialogText=You are managing MBeans from this server.\nIf you
disconnect, you will no longer be able to manage them.\n\nAre you sure you want to
disconnect?
name=Name
NotificationsPage_clearActionToolTip=Clear received notifications
NotificationsPage_message=Message
@@ -77,4 +75,6 @@
TypeInAFilter=Type in a filter
LoadingJMXNodes=Loading JMX Nodes
Loading=Loading...
-UpdatingSelectionJob=Updating selection job
\ No newline at end of file
+UpdatingSelectionJob=Updating selection job
+
+JMXUIImageDescriptorNotFound=Unable to load image {0} from plugin {1}
\ No newline at end of file
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/UIExtensionManager.java
===================================================================
---
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/UIExtensionManager.java 2012-04-05
06:18:15 UTC (rev 40049)
+++
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/UIExtensionManager.java 2012-04-05
06:34:35 UTC (rev 40050)
@@ -18,10 +18,13 @@
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.InvalidRegistryObjectException;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
@@ -48,6 +51,11 @@
wizardPages = element.getChildren();
String pluginName = element.getDeclaringExtension().getContributor().getName();
imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(pluginName, icon);
+ if( imageDescriptor == null ) {
+ IStatus s = new Status(IStatus.WARNING, JMXUIActivator.PLUGIN_ID,
+ NLS.bind(Messages.JMXUIImageDescriptorNotFound, icon, pluginName));
+ JMXUIActivator.getDefault().log(s);
+ }
}
public String getId() {
return id;
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerLabelProvider.java
===================================================================
---
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerLabelProvider.java 2012-04-05
06:18:15 UTC (rev 40049)
+++
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerLabelProvider.java 2012-04-05
06:34:35 UTC (rev 40050)
@@ -105,9 +105,13 @@
IConnectionProvider provider = ((IConnectionWrapper)obj).getProvider();
ConnectionProviderUI ui =
UIExtensionManager.getConnectionProviderUI(provider.getId());
if( ui != null ) {
- if(!images.containsKey(ui.getId()) || images.get(ui.getId()).isDisposed())
- images.put(ui.getId(),
- ui.getImageDescriptor().createImage());
+ if(!images.containsKey(ui.getId()) || images.get(ui.getId()).isDisposed()) {
+ Image i = null;
+ if( ui.getImageDescriptor() != null ) {
+ i = ui.getImageDescriptor().createImage();
+ }
+ images.put(ui.getId(), i);
+ }
return images.get(ui.getId());
}
}
Show replies by date