Author: scabanovich
Date: 2010-03-03 06:59:59 -0500 (Wed, 03 Mar 2010)
New Revision: 20595
Modified:
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/CompoundPattern.java
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PatternLoader.java
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PrefixUrlPattern.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5920
Modified:
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/CompoundPattern.java
===================================================================
---
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/CompoundPattern.java 2010-03-03
11:50:38 UTC (rev 20594)
+++
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/CompoundPattern.java 2010-03-03
11:59:59 UTC (rev 20595)
@@ -57,7 +57,11 @@
* @see org.jboss.tools.jsf.web.pattern.JSFUrlPattern#getJSFPaths(java.lang.String)
*/
public List<String> getJSFPaths(String url) {
- return new ArrayList<String>();
+ List<String> result = new ArrayList<String>();
+ for (JSFUrlPattern pattern: patterns) {
+ result.addAll(pattern.getJSFPaths(url));
+ }
+ return result;
}
}
Modified:
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PatternLoader.java
===================================================================
---
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PatternLoader.java 2010-03-03
11:50:38 UTC (rev 20594)
+++
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PatternLoader.java 2010-03-03
11:59:59 UTC (rev 20595)
@@ -83,7 +83,6 @@
String n = p.substring(2);
for (int i = 0; i < n.length(); i++)
if(!Character.isJavaIdentifierPart(n.charAt(i))) return null;
- if(n.equals("jsf")) return null; //default pattern
PostfixUrlPattern up = new PostfixUrlPattern();
up.setPostfix(p.substring(1));
return up;
Modified:
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PrefixUrlPattern.java
===================================================================
---
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PrefixUrlPattern.java 2010-03-03
11:50:38 UTC (rev 20594)
+++
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PrefixUrlPattern.java 2010-03-03
11:59:59 UTC (rev 20595)
@@ -45,7 +45,10 @@
* @see org.jboss.tools.jsf.web.pattern.JSFUrlPattern#getJSFPaths(java.lang.String)
*/
public List<String> getJSFPaths(String url) {
- return new ArrayList<String>();
+ List<String> result = new ArrayList<String>();
+ String path = getJSFPath(url);
+ if(path != null && path.length() > 0) result.add(path);
+ return result;
}
public String toString() {