Diff of /incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/TagConverter.java
Parent Directory
| Revision Log
| Patch
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/TagConverter.java 2006/02/04 21:44:01 374935
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/TagConverter.java 2006/02/04 21:47:46 374936
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.demo.jsp;
+
/*
* Copyright 2002-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
+
/*
* Created on: 02.09.2002, 23:40:26
* $Id: TagConverter.java,v 1.1.1.1 2004/04/15 18:41:00 idus Exp $
*/
-package org.apache.myfaces.tobago.example.demo.jsp;
import org.apache.oro.text.regex.MalformedPatternException;
import org.apache.oro.text.regex.Pattern;
@@ -25,17 +27,16 @@ import org.apache.oro.text.regex.Pattern
public class TagConverter extends AbstractConverter {
public Pattern initPattern() throws MalformedPatternException {
- return compiler.compile("(?s)<.*?>");
+ return getCompiler().compile("(?s)<.*?>");
}
public String convertMatch(String fragment) {
// String escaped = XmlUtils.escape(fragment);
- String withLinks = util.substitute(
- "s/^<jsp:include page=\\\"([\\-\\.\\/\\w]+)" +
- "/<jsp:include page=\\\"<a href='viewSource.jsp?jsp=$1'>$1<\\/a>/", fragment);
+ String withLinks = getUtil().substitute("s/^<jsp:include page=\\\"([\\-\\.\\/\\w]+)"
+ + "/<jsp:include page=\\\"<a href='viewSource.jsp?jsp=$1'>$1<\\/a>/", fragment);
- String escaped = util.substitute("s/^(<\\/?)(\\w+):/$1<b>$2<\\/b>:/", withLinks);
+ String escaped = getUtil().substitute("s/^(<\\/?)(\\w+):/$1<b>$2<\\/b>:/", withLinks);
escaped = highlightStrings(escaped);
return "<span class=\"html-tag\"><" + escaped.substring(1, escaped.length()-1) + "></span>";
}