Author: rob.stryker(a)jboss.com
Date: 2012-01-09 03:06:39 -0500 (Mon, 09 Jan 2012)
New Revision: 37713
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java
Log:
JBDS-1974 - changing jboss_config to jboss_config_dir, which accounts for more usecases
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java 2012-01-09
07:45:20 UTC (rev 37712)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java 2012-01-09
08:06:39 UTC (rev 37713)
@@ -93,17 +93,12 @@
}
private void setEffectiveBaseDir() {
- IPath dir = baseDir == null ? null : new Path(baseDir);
- if( dir == null && category != null) {
- dir = getCategory().getServer().getRuntime().getLocation();
- }
- if( dir != null && !dir.isAbsolute() && category != null)
- dir = getCategory().getServer().getRuntime().getLocation().append(dir);
+ String serverName = server == null ? "" : server.getName(); //$NON-NLS-1$
+ String dir1 = baseDir == null ? null : baseDir;
String dir2 = null;
- String serverName = server == null ? "" : server.getName(); //$NON-NLS-1$
- if( dir != null ) {
- dir2 = dir.toString().replace("${jboss_config_dir}", //$NON-NLS-1$
+ if( dir1 != null ) {
+ dir2 = dir1.replace("${jboss_config_dir}", //$NON-NLS-1$
"${jboss_config_dir:" + serverName + "}"); //$NON-NLS-1$
//$NON-NLS-2$
dir2 = dir2.replace("${jboss_config}", //$NON-NLS-1$
"${jboss_config:" + serverName + "}"); //$NON-NLS-1$
//$NON-NLS-2$
@@ -114,7 +109,16 @@
true, StringVariableManager.getDefault());
} catch( CoreException ce ) {}
}
- effectiveBaseDir = dir2 == null ? null : dir2.toString();
+
+
+ IPath dir = dir2 == null ? null : new Path(dir2);
+ if( dir == null && category != null) {
+ dir = getCategory().getServer().getRuntime().getLocation();
+ }
+ if( dir != null && !dir.isAbsolute() && category != null)
+ dir = getCategory().getServer().getRuntime().getLocation().append(dir);
+
+ effectiveBaseDir = dir == null ? null : dir.toString();
}
protected AntFileFilter getFilter() {
Show replies by date