Author: rob.stryker(a)jboss.com
Date: 2007-11-21 14:38:55 -0500 (Wed, 21 Nov 2007)
New Revision: 5022
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ModuleUtil.java
Log:
JBIDE-1349 - single file deployer assumed "in workspace" meant "under the
workspace tree".
Also, NPE.
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java 2007-11-21
18:18:48 UTC (rev 5021)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java 2007-11-21
19:38:55 UTC (rev 5022)
@@ -54,6 +54,7 @@
import org.eclipse.wst.server.core.model.IModuleResource;
import org.eclipse.wst.server.core.model.ModuleDelegate;
import org.eclipse.wst.server.core.model.ModuleFactoryDelegate;
+import org.jboss.ide.eclipse.archives.core.ArchivesCore;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.server.UnitedServerListener;
import org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager;
@@ -224,7 +225,8 @@
private IPath workspaceRelative;
public SingleDeployableModuleDelegate(IPath workspaceRelative) {
this.workspaceRelative = workspaceRelative;
- global =
ResourcesPlugin.getWorkspace().getRoot().getLocation().append(workspaceRelative);
+ String projectName = workspaceRelative.segment(0);
+ global = ArchivesCore.getInstance().getVariables().getProjectPath(projectName);
}
public IModule[] getChildModules() {
return new IModule[0];
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ModuleUtil.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ModuleUtil.java 2007-11-21
18:18:48 UTC (rev 5021)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ModuleUtil.java 2007-11-21
19:38:55 UTC (rev 5022)
@@ -12,7 +12,8 @@
ArrayList<IModule[]> list = new ArrayList<IModule[]>();
IModule[] children = server.getChildModules(root, new NullProgressMonitor());
// children is { aWar, bWar, cWar } projects
- for( int i = 0; i < children.length; i++ ) {
+ int length = children == null ? 0 : children.length;
+ for( int i = 0; i < length; i++ ) {
ArrayList<IModule> inner = new ArrayList<IModule>();
inner.addAll(Arrays.asList(root));
inner.add(children[i]);
Show replies by date