Author: dgolovin
Date: 2008-01-30 15:59:43 -0500 (Wed, 30 Jan 2008)
New Revision: 6041
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1270
server parameter can be null when 'Manually define new Server' radio selected.
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java 2008-01-30
20:45:19 UTC (rev 6040)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java 2008-01-30
20:59:43 UTC (rev 6041)
@@ -53,14 +53,16 @@
* @see ILaunchableAdapterDelegate#getLaunchable(IServer, IModuleObject)
*/
public Object getLaunchable(IServer server, IModuleArtifact moduleObject) {
- ServerDelegate delegate =
(ServerDelegate)server.loadAdapter(ServerDelegate.class,null);
- if (!(delegate instanceof JBossServer ))
- return null;
- if ((moduleObject instanceof Servlet) ||(moduleObject instanceof WebResource))
- return prepareHttpLaunchable(moduleObject, delegate);
-
- if((moduleObject instanceof EJBBean) || (moduleObject instanceof JndiObject))
- return prepareJndiLaunchable(moduleObject,delegate);
+ if (server != null) {
+ ServerDelegate delegate =
(ServerDelegate)server.loadAdapter(ServerDelegate.class,null);
+ if (!(delegate instanceof JBossServer ))
+ return null;
+ if ((moduleObject instanceof Servlet) ||(moduleObject instanceof WebResource))
+ return prepareHttpLaunchable(moduleObject, delegate);
+
+ if((moduleObject instanceof EJBBean) || (moduleObject instanceof JndiObject))
+ return prepareJndiLaunchable(moduleObject,delegate);
+ }
return null;
}