Author: estherbin
Date: 2008-07-16 09:45:45 -0400 (Wed, 16 Jul 2008)
New Revision: 9151
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
Log:
Make simple el substitution for the
https://jira.jboss.com:8443/jira/browse/JBIDE-2010
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-07-16
12:54:51 UTC (rev 9150)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-07-16
13:45:45 UTC (rev 9151)
@@ -28,6 +28,8 @@
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.bundle.BundleMap;
import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.css.ELReferenceList;
+import org.jboss.tools.vpe.editor.util.ElService;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
@@ -469,10 +471,11 @@
public static void setImgFromResources(VpePageContext pageContext, nsIDOMElement img,
String fileImageName, String undefinedImgName) {
IEditorInput input = pageContext.getEditPart().getEditorInput();
IPath inputPath = getInputParentPath(input);
- File file = new File(inputPath.toOSString() + File.separator + fileImageName);
+ String path =
ElService.getInstance().replaceEl(pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile(),
fileImageName);
+ File file = new File(inputPath.toOSString() + File.separator + path);
if (file.exists()) {
img.setAttribute(HtmlComponentUtil.HTML_ATR_SRC,
HtmlComponentUtil.FILE_PROTOCOL + inputPath.toOSString() + File.separator
- + fileImageName);
+ + path);
} else {
img.setAttribute(HtmlComponentUtil.HTML_ATR_SRC, undefinedImgName);
}