Author: yradtsevich
Date: 2010-03-19 14:45:29 -0400 (Fri, 19 Mar 2010)
New Revision: 20945
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5042
Enhance DnD support in VPE
VPE Refactoring
- Duplicate method VpeFunctionSrc.getAbsoluteResourcePath has been removed.
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 2010-03-19
18:06:20 UTC (rev 20944)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java 2010-03-19
18:45:29 UTC (rev 20945)
@@ -160,11 +160,12 @@
}
protected String getUnresolved() {
- return IMG_PREFIX + getAbsoluteResourcePath(IMG_UNRESOLVED).replace('\\',
'/');
+ return VpeStyleUtil.getAbsoluteResourcePathUrl(IMG_UNRESOLVED);
}
protected String getPrefix() {
- return IMG_PREFIX;
+ return VpeStyleUtil.FILE_PROTOCOL + VpeStyleUtil.SLASH
+ + VpeStyleUtil.SLASH + VpeStyleUtil.SLASH;
}
private String processValue(VpePageContext pageContext, Node sourceNode,
@@ -270,17 +271,17 @@
// return resolvedValue;
// }
- public static String getAbsoluteResourcePath(String resourcePathInPlugin) {
- String pluginPath = VpePlugin.getPluginResourcePath();
- IPath pluginFile = new Path(pluginPath);
- File file = pluginFile.append(resourcePathInPlugin).toFile();
- if (file.exists()) {
- return file.getAbsolutePath();
- } else {
- throw new RuntimeException("Can't get path for " //$NON-NLS-1$
- + resourcePathInPlugin);
- }
- }
+// public static String getAbsoluteResourcePath(String resourcePathInPlugin) {
+// String pluginPath = VpePlugin.getPluginResourcePath();
+// IPath pluginFile = new Path(pluginPath);
+// File file = pluginFile.append(resourcePathInPlugin).toFile();
+// if (file.exists()) {
+// return file.getAbsolutePath();
+// } else {
+// throw new RuntimeException("Can't get path for " //$NON-NLS-1$
+// + resourcePathInPlugin);
+// }
+// }
protected KbQuery createKbQuery(JspContentAssistProcessor processor, Node fNode, int
offset, String attrName) {
KbQuery kbQuery = new KbQuery();