added a convenience method.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14787 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-01-24 23:55:26 +00:00
1 parent 0c9deaf494
commit 0721611f7d
1 file changed
+7
@@ -35,6 +35,13 @@ public abstract class AbstractMarkupText {
*/
public abstract void addMarkup( int startPos, int endPos, String startTag, String endTag );
/**
* Adds a start tag and end tag around the entire text
*/
public final void wrapBy(String startTag, String endTag) {
addMarkup(0,getText().length(),startTag,endTag);
}
/**
* Find all "tokens" that match the given pattern in this text.
*