Author: dmaliarevich
Date: 2008-10-20 10:27:16 -0400 (Mon, 20 Oct 2008)
New Revision: 10997
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2936, creating uri was updated.
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java 2008-10-20
14:27:12 UTC (rev 10996)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java 2008-10-20
14:27:16 UTC (rev 10997)
@@ -179,7 +179,7 @@
}
protected String getUnresolved() {
- return IMG_PREFIX + getAbsoluteResourcePath(IMG_UNRESOLVED);
+ return IMG_PREFIX + getAbsoluteResourcePath(IMG_UNRESOLVED).replace('\\',
'/');
}
protected String getPrefix() {
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-10-20
14:27:12 UTC (rev 10996)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-10-20
14:27:16 UTC (rev 10997)
@@ -281,7 +281,7 @@
sourceElement.setAttribute(ATTRIBUTE_STYLE, style);
}
- // selets parameter from atribute style
+ // selects parameter from attribute style
public static String deleteFromString(String data, String begin, String end) {
int startPosition = data.indexOf(begin);
@@ -317,7 +317,7 @@
value = getFilePath(input, value);
}
- value = FILE_PROTOCOL + SLASH + SLASH + value;
+ value = FILE_PROTOCOL + SLASH + SLASH + value.replace('\\', '/');
URL url = null;
try {
url = new URL(value);
@@ -371,7 +371,7 @@
filePath = getFilePath(input, filePath);
}
- filePath = FILE_PROTOCOL + SLASH + SLASH + filePath;
+ filePath = FILE_PROTOCOL + SLASH + SLASH + filePath.replace('\\',
'/');
URL url = null;
try {
url = new URL(filePath);
@@ -491,7 +491,7 @@
if (!new File(filePath).isAbsolute()) {
filePath = getFilePath(href_val, filePath);
} else {
- filePath = FILE_PROTOCOL + SLASH + SLASH + filePath;
+ filePath = FILE_PROTOCOL + SLASH + SLASH + filePath.replace('\\',
'/');
}
URL url = null;
@@ -530,9 +530,9 @@
if (tagPath.isEmpty()) {
if (showUnresolvedImage) {
return FILE_PROTOCOL + SLASH + SLASH
- + getAbsoluteResourcePath(UNRESOLVED_IMAGE_PATH);
+ + getAbsoluteResourcePath(UNRESOLVED_IMAGE_PATH).replace('\\',
'/');
} else {
- return path;
+ return path.replace('\\', '/');
}
}
@@ -545,16 +545,16 @@
.equalsIgnoreCase(device))) {
if (showUnresolvedImage) {
return FILE_PROTOCOL + SLASH + SLASH
- + getAbsoluteResourcePath(UNRESOLVED_IMAGE_PATH);
+ + getAbsoluteResourcePath(UNRESOLVED_IMAGE_PATH).replace('\\',
'/');
} else {
- return path;
+ return path.replace('\\', '/');
}
}
File locFile = tagPath.toFile();
if (locFile.exists()) {
return FILE_PROTOCOL + SLASH + SLASH + SLASH
- + locFile.getAbsolutePath();
+ + locFile.getAbsolutePath().replace('\\', '/');
}
IEditorInput input = pageContext.getEditPart().getEditorInput();
@@ -603,16 +603,16 @@
File f = new File(location + File.separator + pathCopy);
if (f.exists()) {
return FILE_PROTOCOL + SLASH + SLASH + SLASH
- + f.getPath();
+ + f.getPath().replace('\\', '/');
}
}
}
}
if (showUnresolvedImage) {
return FILE_PROTOCOL + SLASH + SLASH
- + getAbsoluteResourcePath(UNRESOLVED_IMAGE_PATH);
+ + getAbsoluteResourcePath(UNRESOLVED_IMAGE_PATH).replace('\\',
'/');
} else {
- return path;
+ return path.replace('\\', '/');
}
}