Index: org.jboss.tools.jmx.core/META-INF/MANIFEST.MF =================================================================== --- org.jboss.tools.jmx.core/META-INF/MANIFEST.MF (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/META-INF/MANIFEST.MF (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -5,8 +5,8 @@ Bundle-Version: 1.2.0.qualifier Bundle-Activator: org.jboss.tools.jmx.core.JMXActivator Bundle-Vendor: %BundleProvider -Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,3.7.0)", - org.jboss.tools.usage;bundle-version="1.0.0";resolution:=optional +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0", + org.jboss.tools.usage;bundle-version="1.0.0";resolution:=optional;x-installation:=greedy Export-Package: org.jboss.tools.jmx.core, org.jboss.tools.jmx.core.providers; x-friends:="org.jboss.tools.jmx.core, Index: org.jboss.tools.jmx.core/.gitignore =================================================================== --- org.jboss.tools.jmx.core/.gitignore (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/.gitignore (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -1,2 +1 @@ bin -target Index: org.jboss.tools.jmx.core/about.properties =================================================================== --- org.jboss.tools.jmx.core/about.properties (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/about.properties (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -2,5 +2,5 @@ \n\ Version: {featureVersion}\n\ \n\ -Copyright (c) 2006-2010 JBoss by Redhat, and others. Initial contribution by Jeff Mesnil, http://jmesnil.net +Copyright (c) 2006-2012 JBoss by Redhat, and others. Initial contribution by Jeff Mesnil, http://jmesnil.net Index: org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/IConnectionWrapper.java =================================================================== --- org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/IConnectionWrapper.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/IConnectionWrapper.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -11,6 +11,7 @@ package org.jboss.tools.jmx.core; import java.io.IOException; +import java.util.HashMap; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; @@ -38,5 +39,22 @@ * @return */ public Root getRoot(); + + /** + * Run this runnable + * @param runnable + * @throws JMXException + */ public void run(IJMXRunnable runnable) throws JMXException; + + /** + * Run this runnable, but pass in a map full of preferences + * that may contribute to the setup + * + * @param runnable + * @param prefs + * @throws JMXException + */ + public void run(IJMXRunnable runnable, HashMap prefs) throws JMXException; + } Index: org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/DeleteConnectionJob.java =================================================================== --- org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/DeleteConnectionJob.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/DeleteConnectionJob.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2006 Jeff Mesnil + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * "Rob Stryker" - Initial implementation + *******************************************************************************/ package org.jboss.tools.jmx.core; import org.eclipse.core.runtime.IProgressMonitor; Index: org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/JMXException.java =================================================================== --- org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/JMXException.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/JMXException.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2006 Jeff Mesnil + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * "Rob Stryker" - Initial implementation + *******************************************************************************/ package org.jboss.tools.jmx.core; import org.eclipse.core.runtime.CoreException; Index: org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/NodeUtils.java =================================================================== --- org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/NodeUtils.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/NodeUtils.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -59,7 +59,7 @@ Iterator iter = beanInfo.iterator(); while (iter.hasNext()) { ObjectName on = (ObjectName) iter.next(); - NodeBuilder.addToTree(_root[0], on); + NodeBuilder.addToTree(_root[0], on, connection); subMon.worked(100); } subMon.done(); Index: org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/NodeBuilder.java =================================================================== --- org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/NodeBuilder.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/NodeBuilder.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -7,6 +7,7 @@ *******************************************************************************/ package org.jboss.tools.jmx.core.tree; +import javax.management.MBeanServerConnection; import javax.management.ObjectName; import org.jboss.tools.jmx.core.IConnectionWrapper; @@ -20,6 +21,10 @@ } public static void addToTree(Node root, ObjectName on) { + addToTree(root, on, null); + } + + public static void addToTree(Node root, ObjectName on, MBeanServerConnection mbsc) { Node node = buildDomainNode(root, on.getDomain()); String keyPropertyListString = on.getKeyPropertyListString(); String[] properties = keyPropertyListString.split(","); //$NON-NLS-1$ @@ -29,7 +34,7 @@ String value = property.substring(property.indexOf('=') + 1, property.length()); if (i == properties.length - 1) { - node = buildObjectNameNode(node, key, value, on); + node = buildObjectNameNode(node, key, value, on, mbsc); } else { node = buildPropertyNode(node, key, value); } @@ -58,7 +63,12 @@ static Node buildObjectNameNode(Node parent, String key, String value, ObjectName on) { - Node n = new ObjectNameNode(parent, key, value, on); + return buildObjectNameNode(parent, key, value, on, null); + } + + static Node buildObjectNameNode(Node parent, String key, String value, + ObjectName on, MBeanServerConnection mbsc) { + Node n = new ObjectNameNode(parent, key, value, on, mbsc); if (parent != null) { return parent.addChildren(n); } Index: org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/ObjectNameNode.java =================================================================== --- org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/ObjectNameNode.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/ObjectNameNode.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -12,7 +12,6 @@ import org.jboss.tools.jmx.core.IConnectionWrapper; import org.jboss.tools.jmx.core.IJMXRunnable; -import org.jboss.tools.jmx.core.JMXException; import org.jboss.tools.jmx.core.MBeanInfoWrapper; public class ObjectNameNode extends PropertyNode { @@ -22,6 +21,10 @@ private MBeanInfoWrapper wrapper; public ObjectNameNode(Node parent, String key, String value, ObjectName on) { + this(parent, key, value, on, null); + } + + public ObjectNameNode(Node parent, String key, String value, ObjectName on, MBeanServerConnection mbsc) { super(parent, key, value); Root root = getRoot(parent); IConnectionWrapper connectionWrapper = root.getConnection(); @@ -29,17 +32,22 @@ final MBeanInfoWrapper[] array = new MBeanInfoWrapper[1]; final ObjectName on2 = on; try { - connectionWrapper.run(new IJMXRunnable() { - public void run(MBeanServerConnection mbsc) throws Exception { - array[0] = new MBeanInfoWrapper(on2, mbsc.getMBeanInfo(on2), mbsc, ObjectNameNode.this); - } - }); - } catch( JMXException ce ) { - // TODO LOG + if( mbsc != null ) + array[0] = new MBeanInfoWrapper(on2, mbsc.getMBeanInfo(on2), mbsc, ObjectNameNode.this); + else { + connectionWrapper.run(new IJMXRunnable() { + public void run(MBeanServerConnection mbsc) throws Exception { + array[0] = new MBeanInfoWrapper(on2, mbsc.getMBeanInfo(on2), mbsc, ObjectNameNode.this); + } + }); + } + } catch( Exception e ) { + // TODO FIX THIS } wrapper = array[0]; } + public ObjectName getObjectName() { return on; } Index: org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/providers/DefaultConnectionWrapper.java =================================================================== --- org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/providers/DefaultConnectionWrapper.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/providers/DefaultConnectionWrapper.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -120,4 +120,9 @@ throw new JMXException(s); } } + + public void run(IJMXRunnable runnable, HashMap prefs) + throws JMXException { + run(runnable); + } } Index: org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/util/EqualsUtil.java =================================================================== --- org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/util/EqualsUtil.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/util/EqualsUtil.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2006 Jeff Mesnil + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * "Rob Stryker" - Initial implementation + *******************************************************************************/ package org.jboss.tools.jmx.core.util; import javax.management.MBeanInfo; Index: org.jboss.tools.jmx.core/build.properties =================================================================== --- org.jboss.tools.jmx.core/build.properties (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/build.properties (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -1,13 +1,9 @@ source.. = src/ output.. = bin/ -bin.includes = META-INF/,\ - .,\ +bin.includes = about.*,\ plugin.*,\ schema/,\ - about.*,\ - about.html -src.includes = about.*,\ - build.*,\ - plugin.*,\ - schema/,\ - src/ + META-INF/,\ + . +src.includes = * +src.excludes = src Index: org.jboss.tools.jmx.core/pom.xml =================================================================== --- org.jboss.tools.jmx.core/pom.xml (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.core/pom.xml (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -1,13 +1,13 @@ - + + 4.0.0 - org.jboss.tools - org.jboss.tools.parent.pom - 0.0.1-SNAPSHOT + org.jboss.tools.jmx + plugins + 1.2.0-SNAPSHOT - org.jboss.tools.jmx + org.jboss.tools.jmx.plugins org.jboss.tools.jmx.core - 1.2.0-SNAPSHOT + eclipse-plugin Index: pom.xml =================================================================== --- pom.xml (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ pom.xml (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -1,10 +1,16 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 + + org.jboss.tools + jmx + 1.2.0-SNAPSHOT + org.jboss.tools.jmx - org.jboss.tools.jmx.plugins - 0.0.1-SNAPSHOT - org.jboss.tools.jmx.plugins + plugins + 1.2.0-SNAPSHOT + jmx.plugins pom org.jboss.tools.jmx.core Index: org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.properties =================================================================== --- org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.properties (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.properties (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -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,7 @@ TypeInAFilter=Type in a filter LoadingJMXNodes=Loading JMX Nodes Loading=Loading... -UpdatingSelectionJob=Updating selection job \ No newline at end of file +ErrorLoading=Error loading JMX Nodes +UpdatingSelectionJob=Updating selection job + +JMXUIImageDescriptorNotFound=Unable to load image {0} from plugin {1} \ No newline at end of file Index: org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/UIExtensionManager.java =================================================================== --- org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/UIExtensionManager.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/UIExtensionManager.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -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; Index: org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.java =================================================================== --- org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -87,8 +87,11 @@ public static String TypeInAFilter; public static String LoadingJMXNodes; public static String Loading; + public static String ErrorLoading; public static String UpdatingSelectionJob; + public static String JMXUIImageDescriptorNotFound; + static { NLS.initializeMessages("org.jboss.tools.jmx.ui.Messages", //$NON-NLS-1$ Messages.class); Index: org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/MBeanUtils.java =================================================================== --- org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/MBeanUtils.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/MBeanUtils.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -52,6 +52,8 @@ ret[i] = new Character(texti.charAt(0)); } else if (param.getType().equals("boolean")) {//$NON-NLS-1$ ret[i] = new Boolean(texti); + } else if (param.getType().equals("java.lang.Boolean")) {//$NON-NLS-1$ + ret[i] = new Boolean(texti); } else if (MBeanUtils.class .getClassLoader() .loadClass("java.lang.Number").isAssignableFrom(MBeanUtils.class.getClassLoader().loadClass(param.getType()))) {//$NON-NLS-1$ @@ -94,6 +96,8 @@ return new Character(valueStr.charAt(0)); if (type.equals("boolean")) //$NON-NLS-1$ return new Boolean(valueStr); + if (type.equals("java.lang.Boolean")) //$NON-NLS-1$ + return new Boolean(valueStr); if (MBeanUtils.class.getClassLoader().loadClass("java.lang.Number") //$NON-NLS-1$ .isAssignableFrom( MBeanUtils.class.getClassLoader().loadClass(type))) Index: org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/controls/AttributeControlFactory.java =================================================================== --- org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/controls/AttributeControlFactory.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/controls/AttributeControlFactory.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -94,6 +94,8 @@ } public static Control createControl(final Composite parent, final Object value) { + if( value == null ) + return null; return createControl(parent, value, value.getClass().getSimpleName(), null, null, false, null, null); } Index: org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/editors/EditorConnectionMapping.java =================================================================== --- org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/editors/EditorConnectionMapping.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/editors/EditorConnectionMapping.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2006 Jeff Mesnil + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * "Rob Stryker" - Initial implementation + *******************************************************************************/ package org.jboss.tools.jmx.ui.internal.editors; import java.util.ArrayList; Index: org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerContentProvider.java =================================================================== --- org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerContentProvider.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerContentProvider.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -27,6 +27,7 @@ import org.jboss.tools.jmx.core.IConnectionProviderListener; import org.jboss.tools.jmx.core.IConnectionWrapper; import org.jboss.tools.jmx.core.MBeanFeatureInfoWrapper; +import org.jboss.tools.jmx.core.tree.ErrorRoot; import org.jboss.tools.jmx.core.tree.Node; import org.jboss.tools.jmx.core.tree.ObjectNameNode; import org.jboss.tools.jmx.core.tree.Root; @@ -86,6 +87,9 @@ ObjectNameNode node = (ObjectNameNode) parent; return node.getMbeanInfoWrapper().getMBeanFeatureInfos(); } + if( parent instanceof ErrorRoot ) { + return new Object[0]; + } if (parent instanceof Node) { Node node = (Node) parent; return node.getChildren(); Index: org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/EmbedableLabelProvider.java =================================================================== --- org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/EmbedableLabelProvider.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/EmbedableLabelProvider.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2006 Jeff Mesnil + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * "Rob Stryker" - Initial implementation + *******************************************************************************/ package org.jboss.tools.jmx.ui.internal.views.navigator; import org.eclipse.jface.viewers.LabelProvider; Index: org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerLabelProvider.java =================================================================== --- org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerLabelProvider.java (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerLabelProvider.java (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -26,6 +26,7 @@ import org.jboss.tools.jmx.core.MBeanInfoWrapper; import org.jboss.tools.jmx.core.MBeanOperationInfoWrapper; import org.jboss.tools.jmx.core.tree.DomainNode; +import org.jboss.tools.jmx.core.tree.ErrorRoot; import org.jboss.tools.jmx.core.tree.ObjectNameNode; import org.jboss.tools.jmx.core.tree.PropertyNode; import org.jboss.tools.jmx.ui.Messages; @@ -52,8 +53,12 @@ public void dispose() { instances.remove(this); if( instances.isEmpty()) { - for( Iterator i = images.values().iterator(); i.hasNext(); ) - i.next().dispose(); + Iterator i = images.values().iterator(); + while(i.hasNext()) { + Image o = i.next(); + if( o != null ) + o.dispose(); + } } super.dispose(); } @@ -71,6 +76,9 @@ if( obj instanceof DelayProxy ) { return Messages.Loading; } + if( obj instanceof ErrorRoot ) { + return Messages.ErrorLoading; + } if (obj instanceof DomainNode) { DomainNode node = (DomainNode) obj; @@ -104,17 +112,24 @@ if( obj instanceof IConnectionWrapper ) { 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( ui != null && ui.getId() != null ) { + if(images.get(ui.getId()) == null || 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()); } } if( obj instanceof DelayProxy ) { return null; } - + if( obj instanceof ErrorRoot ) { + return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK); + } + if (obj instanceof DomainNode) { return JMXImages.get(JMXImages.IMG_OBJS_LIBRARY); } Index: org.jboss.tools.jmx.ui/pom.xml =================================================================== --- org.jboss.tools.jmx.ui/pom.xml (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/pom.xml (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -1,13 +1,13 @@ - + + 4.0.0 - org.jboss.tools - org.jboss.tools.parent.pom - 0.0.1-SNAPSHOT + org.jboss.tools.jmx + plugins + 1.2.0-SNAPSHOT - org.jboss.tools.jmx + org.jboss.tools.jmx.plugins org.jboss.tools.jmx.ui - 1.2.0-SNAPSHOT + eclipse-plugin Index: org.jboss.tools.jmx.ui/build.properties =================================================================== --- org.jboss.tools.jmx.ui/build.properties (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/build.properties (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -1,13 +1,12 @@ source.. = src/ output.. = bin/ -bin.includes = plugin.xml,\ +src.includes = * +src.excludes = src +bin.includes = about.*,\ + plugin.*,\ + schema/,\ META-INF/,\ .,\ icons/,\ - plugin.properties,\ - about.html,\ - about.ini,\ - about.mappings,\ - about.properties,\ - jboss_about.png,\ - schema/ + jboss_about.png + Index: org.jboss.tools.jmx.ui/schema/providerUI.exsd =================================================================== --- org.jboss.tools.jmx.ui/schema/providerUI.exsd (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/schema/providerUI.exsd (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -49,7 +49,7 @@ - + Index: org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF =================================================================== --- org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -5,11 +5,11 @@ Bundle-Version: 1.2.0.qualifier Bundle-Activator: org.jboss.tools.jmx.ui.JMXUIActivator Bundle-Vendor: %BundleProvider -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.ui.views, - org.eclipse.ui.forms;bundle-version="[3.2.0,4.0.0)", - org.eclipse.ui.navigator;bundle-version="3.3.100", +Require-Bundle: org.eclipse.ui;bundle-version="3.7.0", + org.eclipse.core.runtime;bundle-version="3.7.0", + org.eclipse.ui.views;bundle-version="3.6.0", + org.eclipse.ui.forms;bundle-version="3.5.100", + org.eclipse.ui.navigator;bundle-version="3.5.0", org.jboss.tools.jmx.core;bundle-version="[1.0.0,2.0.0)" Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: J2SE-1.5 Index: org.jboss.tools.jmx.ui/.gitignore =================================================================== --- org.jboss.tools.jmx.ui/.gitignore (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/.gitignore (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -1,2 +1 @@ bin -target Index: org.jboss.tools.jmx.ui/about.properties =================================================================== --- org.jboss.tools.jmx.ui/about.properties (.../jbosstools-3.2.x/jmx/plugins) (revision 42168) +++ org.jboss.tools.jmx.ui/about.properties (.../jbosstools-3.3.x/jmx/plugins) (revision 42168) @@ -2,5 +2,5 @@ \n\ Version: {featureVersion}\n\ \n\ -Copyright (c) 2006-2010 JBoss by Redhat, and others. Initial contribution by Jeff Mesnil, http://jmesnil.net +Copyright (c) 2006-2012 JBoss by Redhat, and others. Initial contribution by Jeff Mesnil, http://jmesnil.net