Author: rob.stryker(a)jboss.com
Date: 2010-02-11 04:33:28 -0500 (Thu, 11 Feb 2010)
New Revision: 20237
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.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/LocalDeploymentModuleTab.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleDeploymentPage.java
Log:
JBIDE-5832 - JBIDE-5828
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 2010-02-11
07:40:29 UTC (rev 20236)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2010-02-11
09:33:28 UTC (rev 20237)
@@ -154,8 +154,8 @@
String loc = jbsrt.getConfigLocation();
String config = jbsrt.getJBossConfiguration();
IPath p = new Path(loc).append(config)
- .append(IJBossServerConstants.DEPLOY).makeRelative();
- return p.toString();
+ .append(IJBossServerConstants.DEPLOY);
+ return ServerUtil.makeGlobal(jbsrt, p).toString();
}
return null;
}
@@ -178,8 +178,8 @@
String config = jbsrt.getJBossConfiguration();
IPath p = new Path(loc)
.append(config).append(IJBossServerConstants.TMP)
- .append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative();
- return p.toString();
+ .append(IJBossServerConstants.JBOSSTOOLS_TMP);
+ return ServerUtil.makeGlobal(jbsrt, p).toString();
}
return null;
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/LocalDeploymentModuleTab.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/LocalDeploymentModuleTab.java 2010-02-11
07:40:29 UTC (rev 20236)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/LocalDeploymentModuleTab.java 2010-02-11
09:33:28 UTC (rev 20237)
@@ -50,6 +50,7 @@
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
+import org.jboss.ide.eclipse.as.core.util.ServerUtil;
import
org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentModulePrefs;
import
org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentPreferences;
import org.jboss.ide.eclipse.as.ui.Messages;
@@ -524,12 +525,14 @@
private String getDeployDir() {
return page.getServer().getRuntime() == null ? "" : //$NON-NLS-1$
- getServer().getDeployFolder();
+ ModuleDeploymentPage.makeRelative(getServer().getDeployFolder(),
+ page.getServer().getRuntime());
}
private String getTempDeployDir() {
return page.getServer().getRuntime() == null ? "" : //$NON-NLS-1$
- getServer().getTempDeployFolder();
+ ModuleDeploymentPage.makeRelative(getServer().getTempDeployFolder(),
+ page.getServer().getRuntime());
}
private IDeployableServer getServer() {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleDeploymentPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleDeploymentPage.java 2010-02-11
07:40:29 UTC (rev 20236)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleDeploymentPage.java 2010-02-11
09:33:28 UTC (rev 20237)
@@ -20,6 +20,7 @@
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.ui.editor.IServerEditorPartInput;
import org.eclipse.wst.server.ui.editor.ServerEditorPart;
@@ -153,18 +154,33 @@
public String makeGlobal(String path) {
- return ServerUtil.makeGlobal(getRuntime(), new Path(path)).toString();
+ return makeGlobal(path, server.getRuntime());
}
+ public static String makeGlobal(String path, IRuntime runtime) {
+ IJBossServerRuntime rt = getRuntime(runtime);
+ if( rt != null )
+ return ServerUtil.makeGlobal(rt, new Path(path)).toString();
+ return path;
+ }
+
public String makeRelative(String path) {
- if (getRuntime() == null) {
+ return makeRelative(path, server.getRuntime());
+ }
+
+ public static String makeRelative(String path, IRuntime runtime) {
+ IJBossServerRuntime rt = getRuntime(runtime);
+ if (rt == null)
return path;
- }
- return ServerUtil.makeRelative(getRuntime(), new Path(path)).toString();
+ return ServerUtil.makeRelative(rt, new Path(path)).toString();
}
private IJBossServerRuntime getRuntime() {
IRuntime r = server.getRuntime();
+ return getRuntime(r);
+ }
+
+ public static IJBossServerRuntime getRuntime(IRuntime r) {
IJBossServerRuntime ajbsrt = null;
if (r != null) {
ajbsrt = (IJBossServerRuntime) r
Show replies by date