The xwork2 snippet can't seems to be referenced. I was trying to change this
http://cwiki.apache.org/confluence/display/WW/Model+Driven+Interceptor from refering to the old xwork to the new xwork2. Looks like it is still refering to cvs instead of the new svn. Just notice this in the diff - if (urlParam.startsWith("com.opensymphony.")) { + if (urlParam.startsWith("org.opensymphony.")) { shouldn't it be "com.opensymphony..." instead? Thx in advance. ----- Original Message ---- From: tm jee <[EMAIL PROTECTED]> To: Struts Developers List <dev@struts.apache.org> Sent: Saturday, 19 August, 2006 12:51:16 AM Subject: Re: [s2] Snippet Macro Cheers. Ted. ----- Original Message ---- From: Ted Husted <[EMAIL PROTECTED]> To: Struts Developers List <dev@struts.apache.org> Sent: Friday, 18 August, 2006 11:09:14 PM Subject: Re: [s2] Snippet Macro OK, the snippet macro is up and running on the ASF Struts 2 wiki, complete with shortcuts. h2. Description {snippet:id=javadoc|javadoc=true|url=org.apache.struts2.components.If} h2. Parameters {snippet:id=tagattributes|javadoc=false|url=struts2/docs/tags/If.html} h2. Examples {snippet:id=example|lang=xml|javadoc=true|url=struts2/core/src/main/java/org/apache/struts2/components/If.java} I'll start a final pass on the wiki to update the snippets and catch other stragglers. (Note that when updating the references pages, we should rachet the headings down a knotch, so that the largest is h2. (h1 being reserved for the top-level page title.)) I didn't have the karma to check the snippet macro back in, but here's the patch. ---- Index: snippet/src/java/atlassian-plugin.xml =================================================================== --- snippet/src/java/atlassian-plugin.xml (revision 279) +++ snippet/src/java/atlassian-plugin.xml (working copy) @@ -2,8 +2,8 @@ <atlassian-plugin name='Snippet Macros' key='confluence.extra.snippet'> <plugin-info> <description>Macro that gets a snippet of the content from a URL</description> - <vendor name="Codehaus" url="http://www.codehaus.com"/> - <version>0.5</version> + <vendor name="opensymphony.dev.java.net" url="https://opensymphony.dev.java.net/source/browse/opensymphony/wiki/snippet/"/> + <version>r280</version> </plugin-info> <macro name='snippet' class='snippet.SnippetMacro' key='snippet' > Index: snippet/src/java/snippet/SnippetMacro.java =================================================================== --- snippet/src/java/snippet/SnippetMacro.java (revision 279) +++ snippet/src/java/snippet/SnippetMacro.java (working copy) @@ -106,7 +106,7 @@ String urlParam = (String) parameters.get("url"); required(urlParam, "url"); - if (urlParam.startsWith("com.opensymphony.")) { + if (urlParam.startsWith("org.opensymphony.")) { // ok, this is a direct class reference, we can fix this // first, figure out which module we're talking about int nextDot = urlParam.indexOf('.', "com.opensymphony.".length()); @@ -121,18 +121,18 @@ } else { urlParam = module + "/src/java/" + urlParam.replaceAll("\\.", "/") + ".java"; } - } else if (urlParam.startsWith("org.apache.struts.action2.")) { - // ex: https://svn.apache.org/repos/asf/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/ - // support for SAF 2.0 - String url = "https://svn.apache.org/repos/asf/struts/action2/trunk/core/src/main/java/";;; + } else if (urlParam.startsWith("org.apache.struts2.")) { + // ex: https://svn.apache.org/repos/asf/struts/strut2/trunk/core/src/main/java/org/apache/struts/action2/ + // support for Struts 2.0 + String url = "https://svn.apache.org/repos/asf/struts/struts2/trunk/core/src/main/java/";;; urlParam = url + urlParam.replaceAll("\\.", "/") + ".java"; } if (!urlParam.startsWith("http")) { - if (urlParam.startsWith("action2")) { - // cut out the action2 part - urlParam = urlParam.substring("action2".length()); - urlParam = "https://svn.apache.org/repos/asf/struts/action2/trunk/";; + urlParam; + if (urlParam.startsWith("struts2")) { + // cut out the struts2 part + urlParam = urlParam.substring("struts2".length()); + urlParam = "https://svn.apache.org/repos/asf/struts/struts2/trunk/";; + urlParam; } else { urlParam = "https://opensymphony.dev.java.net/source/browse/*checkout*/";; + urlParam; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]