Author: rob.stryker(a)jboss.com
Date: 2007-09-24 15:28:00 -0400 (Mon, 24 Sep 2007)
New Revision: 3775
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
Log:
Change allowing children to be seen in view
WTP Publishing re-written to accomodate change
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-09-24
17:06:34 UTC (rev 3774)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-09-24
19:28:00 UTC (rev 3775)
@@ -85,25 +85,24 @@
}
public IModule[] getChildModules(IModule[] module) {
- if (module[0] != null && module[0].getModuleType() != null) {
- if (module.length == 1) {
- IModuleType moduleType = module[0].getModuleType();
- if (moduleType != null && "jst.ear".equals(moduleType.getId())) {
//$NON-NLS-1$
- IEnterpriseApplication enterpriseApplication = (IEnterpriseApplication) module[0]
- .loadAdapter(IEnterpriseApplication.class, null);
- if (enterpriseApplication != null) {
- IModule[] earModules = enterpriseApplication.getModules();
- if ( earModules != null) {
- return earModules;
- }
+ int last = module.length-1;
+ if (module[last] != null && module[last].getModuleType() != null) {
+ IModuleType moduleType = module[last].getModuleType();
+ if("jst.ear".equals(moduleType.getId())) { //$NON-NLS-1$
+ IEnterpriseApplication enterpriseApplication = (IEnterpriseApplication) module[0]
+ .loadAdapter(IEnterpriseApplication.class, null);
+ if (enterpriseApplication != null) {
+ IModule[] earModules = enterpriseApplication.getModules();
+ if ( earModules != null) {
+ return earModules;
}
}
- else if (moduleType != null &&
"jst.web".equals(moduleType.getId())) { //$NON-NLS-1$
- IWebModule webModule = (IWebModule) module[0].loadAdapter(IWebModule.class, null);
- if (webModule != null) {
- IModule[] modules = webModule.getModules();
- return modules;
- }
+ }
+ else if ("jst.web".equals(moduleType.getId())) { //$NON-NLS-1$
+ IWebModule webModule = (IWebModule) module[last].loadAdapter(IWebModule.class,
null);
+ if (webModule != null) {
+ IModule[] modules = webModule.getModules();
+ return modules;
}
}
}
Show replies by date