Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve BlipProcessor documentation

This class is intended to be frequently subclassed, so let's improve the
documentation.
  • Loading branch information...
commit d267b77a37d2931aa3d5bc145aeea1b61123f4e9 1 parent edf8af3
@emk authored
Showing with 18 additions and 2 deletions.
  1. +18 −2 src/buglinky/BlipProcessor.java
View
20 src/buglinky/BlipProcessor.java
@@ -33,6 +33,8 @@
/**
* Annotate the specified blip.
+ *
+ * @param blip The blip to process.
*/
public void processBlip(Blip blip) {
LOG.fine("Processing blip " + blip.getBlipId() + " with " +
@@ -86,7 +88,16 @@ private Pattern getCompiledPattern() {
}
/**
- * Process a regular expression match.
+ * Process a regular expression match. Use the annotate and replace
+ * functions to perform the actual transformations.
+ *
+ * @param doc The document containing the match.
+ * @param range The range of text in the blip that was matched.
+ * @param match The regular expression match object. Note that the
+ * offsets provided by this object may be incorrect
+ * because of previous text replacements.
+ *
+ * @see BlipProcessor#annotate(TextView, Range, String, String)
*/
protected abstract void processMatch(TextView doc, Range range,
Matcher match);
@@ -96,7 +107,12 @@ protected abstract void processMatch(TextView doc, Range range,
*
* The Wave Robot API does not currently filter out duplicate annotation
* requests, which causes extra network traffic and more possibilities for
- * nasty bot loops. So we do this screening on our end.
+ * nasty bot loops. So we filter them out ourselves.
+ *
+ * @param doc The TextView to containing the text to annotate.
+ * @param range The range of text to apply the annotation to.
+ * @param name The name of the annotation.
+ * @param value The value of the annotation.
*/
protected void annotate(TextView doc, Range range, String name,
String value) {
Please sign in to comment.
Something went wrong with that request. Please try again.