Author: akazakov
Date: 2009-03-08 20:30:33 -0400 (Sun, 08 Mar 2009)
New Revision: 14097
Modified:
branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3972 - Fixed
Modified:
branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java
===================================================================
---
branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java 2009-03-08
04:11:34 UTC (rev 14096)
+++
branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java 2009-03-09
00:30:33 UTC (rev 14097)
@@ -188,8 +188,18 @@
static String MODULE_NAME_PREFIX = "org.eclipse.jst.j2ee.server.web:";
//$NON-NLS-1$
public static IModule findModule(IProject project) {
- return ServerUtil.getModule(project);
-
+ //
https://jira.jboss.org/jira/browse/JBIDE-3972
+ // There may be a few modules for resources from the same project.
+ // Ignore module with jboss.singlefile type if there are other module types.
+ IModule[] modules = ServerUtil.getModules(project);
+ if(modules.length>0) {
+ for (int i = 0; i < modules.length; i++) {
+ if(!"jboss.singlefile".equals(modules[i].getModuleType().getId())) {
+ return modules[i];
+ }
+ }
+ }
+ return modules[0];
}
public static void runRegisterInServerJob(IProject p, IServer server) {