summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2006-03-22 21:44:43 (EST)
committerpelder2006-03-22 21:44:43 (EST)
commit297c270c1bf87912918522b13f989543c67cc93c (patch)
treedfe465731cf2813288fc8923f378c2d495d0433b
parent7e6e86d14ad26829e2b9272484f1f8d089479acd (diff)
downloadorg.eclipse.jet-297c270c1bf87912918522b13f989543c67cc93c.zip
org.eclipse.jet-297c270c1bf87912918522b13f989543c67cc93c.tar.gz
org.eclipse.jet-297c270c1bf87912918522b13f989543c67cc93c.tar.bz2
Improve java doc
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/AbstractChooseAlternative.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/AbstractChooseAlternative.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/AbstractChooseAlternative.java
index 4492fe9..b63106c 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/AbstractChooseAlternative.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/AbstractChooseAlternative.java
@@ -21,11 +21,32 @@ import java.text.MessageFormat;
import org.eclipse.jet.JET2Writer;
import org.eclipse.jet.internal.l10n.JET2Messages;
import org.eclipse.jet.taglib.AbstractConditionalTag;
+import org.eclipse.jet.taglib.ConditionalTag;
import org.eclipse.jet.taglib.CustomTag;
import org.eclipse.jet.taglib.JET2TagException;
/**
- * Abstract class than handles common behaviors between 'when' and 'otherwise' tag implementations
+ * Abstract class than handles common behaviors between 'when' and 'otherwise' tag implementations. The
+ * choose tag can be extended to include other tags by defining a tag the extends this type. Such tags
+ * must have the following properties:
+ * <ul>
+ * <li>The tag must be declared as a <code>conditionalTag</code> in a <code>org.eclipse.jet.tagLibraries</code> extension.</li>
+ * <li>The <code>processContents</code> attribute must be set of <code>custom</code>.</li>
+ * <li>The tag should implement its {@link ConditionalTag#doEvalCondition(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context)} method as follows:
+ * <pre>
+ * boolean processContents = false;
+ *
+ * ChooseTag chooseTag = getChooseTag();
+ * if (!chooseTag.isSatisfied()){
+ * // implement test here, and set processContents if appropriate
+ * if (processContents) {
+ * chooseTag.setSatisfied(true);
+ * }
+ * }
+ * return processContents;
+ * </pre>
+ * </li>
+ * </ul>
*/
public abstract class AbstractChooseAlternative extends AbstractConditionalTag
{