Author: rob.stryker(a)jboss.com
Date: 2009-04-17 02:42:42 -0400 (Fri, 17 Apr 2009)
New Revision: 14784
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerContentProvider.java
Log:
JBIDE-4182
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerContentProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerContentProvider.java 2009-04-17
06:33:38 UTC (rev 14783)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerContentProvider.java 2009-04-17
06:42:42 UTC (rev 14784)
@@ -94,18 +94,22 @@
}
return ms2;
} catch (Exception e) {
- return null;
+ return new Object[]{};
}
}
- IServer server = (IServer) element;
- IModule[] modules = server.getModules();
- int size = modules.length;
- ModuleServer[] ms = new ModuleServer[size];
- for (int i = 0; i < size; i++) {
- ms[i] = new ModuleServer(server, new IModule[] { modules[i] });
+ // TODO TELL ANGEL ABOUT THIS IF STATEMENT
+ if( element instanceof IServer) {
+ IServer server = (IServer) element;
+ IModule[] modules = server.getModules();
+ int size = modules.length;
+ ModuleServer[] ms = new ModuleServer[size];
+ for (int i = 0; i < size; i++) {
+ ms[i] = new ModuleServer(server, new IModule[] { modules[i] });
+ }
+ return ms;
}
- return ms;
+ return new Object[]{};
}
public Object getParent(Object element) {