Author: yradtsevich
Date: 2010-01-14 05:29:39 -0500 (Thu, 14 Jan 2010)
New Revision: 19742
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/graphicImage.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/graphicImage.xhtml.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionJsf2Resource.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/lib/jbide2550.jar
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/2550/jbide2550.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesBlue.css
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesRed.css
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeLinkCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDReference.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionFactory.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/Jsf2ResourceUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5638
- implemented support of the attributes "name" and "library" for the
tags h:graphicImage and h:outputStylesheet.
- created JUnits for the functionality
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2010-01-14
10:29:39 UTC (rev 19742)
@@ -154,6 +154,20 @@
</vpe:template>
</vpe:tag>
<vpe:tag name="h:graphicImage" case-sensitive="yes">
+ <vpe:if test="attrpresent('name')">
+ <vpe:template children="no" modify="yes">
+ <img src="{href(jsf2resource(@library,@name))}"
width="{@width}"
+ height="{@height}" class="{@styleClass}"
style="{@style}"
+ title="{tagstring()}" alt="{jsfvalue(@alt)}"/>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ </vpe:template>
+ </vpe:if>
<vpe:if test="attrpresent('value')">
<vpe:template children="no" modify="yes">
<img src="{src(jsfvalue(@value))}" width="{@width}"
@@ -947,7 +961,7 @@
becouse it's not specified correctly in jsf lib, mareshkau -->
<!-- <vpe:if test="tld_version('min=2.0')"> -->
<vpe:template children="no" modify="no">
- <vpe:link rel="stylesheet" href="{href(@name)}" />
+ <vpe:link rel="stylesheet"
href="{href(jsf2resource(@library,@name))}" />
</vpe:template>
<!-- </vpe:if> -->
</vpe:tag>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/lib/jbide2550.jar
===================================================================
(Binary files differ)
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html 2010-01-14
10:29:39 UTC (rev 19742)
@@ -9,6 +9,7 @@
<a href="pages/components/body2.jsf">h:body (2st)</a><br>
<a
href="pages/components/outputScript.jsf">h:outputScript</a><br>
<a
href="pages/components/outputStylesheet.jsf">h:outputStylesheet</a><br>
+ <a
href="pages/components/graphicImage.jsf">h:graphicImage</a><br>
<a href="pages/JBIDE/2550/jbide2550.jsf">Resource Test
Page</a><br>
<a href="pages/JBIDE/5352/jbide5352.jsf">Test Page with template name
resolving for default tags</a><br>
<a
href="pages/JBIDE/localization_versioning/resource-handling-1.jsf">Resource
localization and versioning</a><br>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/2550/jbide2550.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/2550/jbide2550.xhtml.xml 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/2550/jbide2550.xhtml.xml 2010-01-14
10:29:39 UTC (rev 19742)
@@ -108,7 +108,7 @@
</LABEL>
</TD>
<TD>
-<IMG SRC="/.*/org.jboss.tools.vpe/img.*.gif/" STYLE="-moz-user-modify:
read-write;"/>
+<IMG SRC="/.*[/\\]org.jboss.tools.vpe[/\\]img.*.gif/"
STYLE="-moz-user-modify: read-write;"/>
</TD>
</TR>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/graphicImage.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/graphicImage.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/graphicImage.xhtml 2010-01-14
10:29:39 UTC (rev 19742)
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core">
+<f:view contentType="text/html" />
+
+<h:head>
+ <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
+ <title>First JSF 2.0 application</title>
+</h:head>
+
+
+<h:body>
+ <h:form>
+ <p><h:graphicImage name="img/img.gif"
id="graphicImageNameOnly"/></p>
+ <p><h:graphicImage library="img" name="img.gif"
id="graphicImageNameAndLib"/></p>
+ <p><h:graphicImage name="jarimg/img.gif"
id="graphicImageNameOnlyJar"/></p>
+ <p><h:graphicImage library="jarimg" name="img.gif"
id="graphicImageNameAndLibJar"/></p>
+ </h:form>
+</h:body>
+</html>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/graphicImage.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/graphicImage.xhtml.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/graphicImage.xhtml.xml 2010-01-14
10:29:39 UTC (rev 19742)
@@ -0,0 +1,14 @@
+<tests>
+ <test id="graphicImageNameOnly">
+ <IMG SRC="/.*jsf2test/WebContent/resources/img/img.gif/" />
+ </test>
+ <test id="graphicImageNameAndLib">
+ <IMG SRC="/.*jsf2test/WebContent/resources/img/img.gif/" />
+ </test>
+ <test id="graphicImageNameOnlyJar">
+ <IMG SRC="/.*[/\\]org.jboss.tools.vpe[/\\]img.*.gif/" />
+ </test>
+ <test id="graphicImageNameAndLibJar">
+ <IMG SRC="/.*[/\\]org.jboss.tools.vpe[/\\]img.*.gif/" />
+ </test>
+</tests>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml 2010-01-14
10:29:39 UTC (rev 19742)
@@ -4,8 +4,10 @@
xmlns:h="http://java.sun.com/jsf/html">
<h:head />
<h:body>
- <h:outputStylesheet name="/resources/css/stylesRed.css"
id="outputStylesheetRed"/>
- <h:outputStylesheet name="/resources/css/stylesBlue.css"
id="outputStylesheetBlue"/>
- <span>Blue text</span>
+ <h:outputStylesheet name="css/stylesRed.css"
id="outputStylesheetRed"/>
+ <h:outputStylesheet library="css" name="stylesBlue.css"
id="outputStylesheetBlue"/>
+ <h:outputStylesheet library="jarcss" name="stylesYellowBold.css"
id="outputStylesheetYellowBold"/>
+
+ <span>Yellow bold italic text on black background</span>
</h:body>
</html>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml.xml 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml.xml 2010-01-14
10:29:39 UTC (rev 19742)
@@ -1,12 +1,17 @@
<tests>
<test id="outputStylesheetRed">
<style>
- span { color: red;}
+ span { color: red; background-color: black;}
</style>
</test>
<test id="outputStylesheetBlue">
<style>
- span { color: blue;}
+ span { color: blue; font-style: italic;}
</style>
</test>
-</tests>
\ No newline at end of file
+ <test id="outputStylesheetYellowBold">
+ <style>
+ span { color: yellow; font-weight: bold;}
+ </style>
+ </test>
+</tests>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesBlue.css
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesBlue.css 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesBlue.css 2010-01-14
10:29:39 UTC (rev 19742)
@@ -1,4 +1,4 @@
span {
color: blue;
-
+ font-style: italic;
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesRed.css
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesRed.css 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesRed.css 2010-01-14
10:29:39 UTC (rev 19742)
@@ -1,4 +1,4 @@
span {
color: red;
- background-color: #80FF00
+ background-color: black;
}
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java 2010-01-14
10:29:39 UTC (rev 19742)
@@ -61,6 +61,10 @@
public void testBody2() throws Throwable {
performContentTest("components/body2.xhtml"); //$NON-NLS-1$
}
+
+ public void testGraphicImage() throws Throwable {
+ performContentTest("components/graphicImage.xhtml"); //$NON-NLS-1$
+ }
public void testHead1() throws Throwable {
performContentTest("components/head1.xhtml"); //$NON-NLS-1$
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeLinkCreator.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeLinkCreator.java 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeLinkCreator.java 2010-01-14
10:29:39 UTC (rev 19742)
@@ -29,9 +29,6 @@
private boolean caseSensitive;
private VpeExpression hrefExpr;
- private String hrefStr;
-
-
VpeLinkCreator(Element taglibElement, VpeDependencyMap dependencyMap, boolean
caseSensitive) {
this.caseSensitive = caseSensitive;
build(taglibElement, dependencyMap);
@@ -41,7 +38,7 @@
Attr hrefAttr = element.getAttributeNode(VpeTemplateManager.ATTR_LINK_HREF);
if (hrefAttr != null) {
try {
- hrefStr = hrefAttr.getValue();
+ String hrefStr = hrefAttr.getValue();
VpeExpressionInfo info = VpeExpressionBuilder.buildCompletedExpression(hrefStr,
caseSensitive);
hrefExpr = info.getExpression();
dependencyMap.setCreator(this, info.getDependencySet());
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDReference.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDReference.java 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDReference.java 2010-01-14
10:29:39 UTC (rev 19742)
@@ -160,7 +160,7 @@
jsfComponentExtension = fileExtension;
}
jsfComponentResourcePath=jsfComponentResourcePath+'/'+sourceNodeName+jsfComponentExtension;
- String fullResourcePath = FileUtil.processJSF2Resource(pageContext,
jsfComponentResourcePath);
+ String fullResourcePath = FileUtil.getJSF2ResourcePath(pageContext,
jsfComponentResourcePath);
result = FileUtil.getFile(pageContext.getEditPart().getEditorInput(),
fullResourcePath);
if(result!=null) {
return result;
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionFactory.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionFactory.java 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionFactory.java 2010-01-14
10:29:39 UTC (rev 19742)
@@ -16,6 +16,7 @@
public class VpeFunctionFactory {
private static final String FUNC_JSF_VALUE = "jsfvalue";//$NON-NLS-1$
+ private static final String FUNC_JSF2_RESOURCE = "jsf2resource";//$NON-NLS-1$
private static final String FUNC_NAME = "name";//$NON-NLS-1$
private static final String FUNC_NOT = "not";//$NON-NLS-1$
private static final String FUNC_IIF = "iif";//$NON-NLS-1$
@@ -55,6 +56,8 @@
private static Class<?> createCls(String name) {
if (FUNC_JSF_VALUE.equals(name)) {
return VpeFunctionJsfValue.class;
+ } else if (FUNC_JSF2_RESOURCE.equals(name)) {
+ return VpeFunctionJsf2Resource.class;
} else if (FUNC_NAME.equals(name)) {
return VpeFunctionName.class;
} else if (FUNC_NOT.equals(name)) {
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionJsf2Resource.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionJsf2Resource.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionJsf2Resource.java 2010-01-14
10:29:39 UTC (rev 19742)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.template.expression;
+
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.util.FileUtil;
+import org.w3c.dom.Node;
+
+/**
+ * Implementation of the function {@code jsf2resource(library, name)}.
+ *
+ * @author yradtsevich
+ */
+public class VpeFunctionJsf2Resource extends VpeFunction {
+
+ /**
+ * Returns the path to the resource specified by the {@code library}
+ * and the {@code name}.
+ *
+ * @see FileUtil#getJSF2ResourcePath(VpePageContext, String, String)
+ */
+ public VpeValue exec(VpePageContext pageContext, Node sourceNode)
+ throws VpeExpressionException {
+ String library = getParameter(0).exec(pageContext, sourceNode).stringValue();
+ if ("".equals(library)) { //$NON-NLS-1$
+ library = null;
+ }
+
+ String name = getParameter(1).exec(pageContext, sourceNode).stringValue();
+
+ String resourcePath = FileUtil.getJSF2ResourcePath(pageContext, library, name);
+ return new VpeValue(resourcePath);
+ }
+}
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2010-01-14
10:29:39 UTC (rev 19742)
@@ -17,6 +17,7 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.util.zip.ZipEntry;
+
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -54,20 +55,49 @@
public class FileUtil {
private static final String JSF2_RESOURCES = "/resources/"; //$NON-NLS-1$
- /**
- * See JBIDE-2550
- * @author mareshkau
- * @param matcher
- * @return
- */
- public static final String processJSF2Resource(VpePageContext pageContext, String
resStr){
- String tempString = resStr;
- tempString=tempString.replaceAll(":", "/");
//$NON-NLS-1$//$NON-NLS-2$
- tempString = FileUtil.JSF2_RESOURCES+tempString;
+ /**
+ * Returns the path to the resource {@code #{resource[resourceStr]}, where
+ * {@code resourceStr} is in the form {@code 'library:name'}.
+ *
+ * See JBIDE-2550
+ *
+ * @author mareshkau
+ * @author yradtsevich
+ */
+ public static final String getJSF2ResourcePath(VpePageContext pageContext,
+ String resourceStr) {
+ if (resourceStr.contains(":")) { //$NON-NLS-1$
+ String[] parts = resourceStr.split(":"); //$NON-NLS-1$
+ return getJSF2ResourcePath(pageContext, parts[0], parts[1]);
+ } else {
+ return getJSF2ResourcePath(pageContext, null, resourceStr);
+ }
+ }
+
+ /**
+ * Returns the path to the resource specified by the {@code library}
+ * and the {@code name}.
+ *
+ * See JBIDE-5638
+ *
+ * @param library may be {@code null}
+ *
+ * @author mareshkau
+ * @author yradtsevich
+ *
+ * @see <a
href="http://java.sun.com/javaee/javaserverfaces/2.0/docs/api/javax/...
+ */
+ public static final String getJSF2ResourcePath(VpePageContext pageContext,
+ String library, String name) {
+ String tempString = library == null ? name
+ : library + '/' + name;
+
+ tempString = FileUtil.JSF2_RESOURCES + tempString;
String result = ""; //$NON-NLS-1$
// if file not accessible and try to search in jar files
if(VpeCreatorUtil.getFile(tempString, pageContext)==null) {
- String tempEntryPath =seachResourceInClassPath(pageContext,
"META-INF"+tempString); //$NON-NLS-1$
+ String tempEntryPath =seachResourceInClassPath(pageContext,
+ "META-INF" + tempString); //$NON-NLS-1$
if(tempEntryPath!=null) {
result = tempEntryPath;
}
@@ -75,7 +105,7 @@
result = tempString;
}
return result;
- }
+ }
public static boolean isExistsInJSF2Resources(VpePageContext pageContext, String
resStr) {
String resourceString = resStr;
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/Jsf2ResourceUtil.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/Jsf2ResourceUtil.java 2010-01-14
07:01:52 UTC (rev 19741)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/Jsf2ResourceUtil.java 2010-01-14
10:29:39 UTC (rev 19742)
@@ -71,9 +71,9 @@
Matcher singleCoatMatcher = resourcePatternWithSinglCoat.matcher(value);
Matcher doubleCoatMatcher = resourcePatternWithDoableCoat.matcher(value);
if(doubleCoatMatcher.find()) {
- result = FileUtil.processJSF2Resource(pageContext, doubleCoatMatcher.group(1));
+ result = FileUtil.getJSF2ResourcePath(pageContext, doubleCoatMatcher.group(1));
}else if(singleCoatMatcher.find()){
- result = FileUtil.processJSF2Resource(pageContext,
singleCoatMatcher.group(1));
+ result = FileUtil.getJSF2ResourcePath(pageContext,
singleCoatMatcher.group(1));
}
return result;