Author: sdzmitrovich
Date: 2008-12-12 11:13:44 -0500 (Fri, 12 Dec 2008)
New Revision: 12573
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3397
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-12-12
16:03:18 UTC (rev 12572)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-12-12
16:13:44 UTC (rev 12573)
@@ -273,13 +273,16 @@
.replaceFirst(
"^\\s*(\\#|\\$)\\{facesContext.externalContext.requestContextPath\\}",
Constants.EMPTY); //$NON-NLS-1$
- IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo()
- .getFile();
+ IFile file = null;
+ if (pageContext.getVisualBuilder().getCurrentIncludeInfo() != null)
+ file = pageContext.getVisualBuilder().getCurrentIncludeInfo()
+ .getFile();
+ if (file == null)
+ return resolvedValue;
+
resolvedValue = ElService.getInstance().replaceEl(file, resolvedValue);
-// IPath path = new Path(resolvedValue);
-
URI uri = null;
try {
uri = new URI(resolvedValue);
@@ -290,7 +293,9 @@
&& (uri.isAbsolute() || (new File(resolvedValue)).exists()))
return resolvedValue;
- return Constants.FILE_PREFIX+FileUtil.getFile(resolvedValue,
file).getLocation().toOSString();
+ return Constants.FILE_PREFIX
+ + FileUtil.getFile(resolvedValue, file).getLocation()
+ .toOSString();
}
/**