Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jface.text/src/org/eclipse/jface/text/rules/MultiLineRule.java')
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/rules/MultiLineRule.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/MultiLineRule.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/MultiLineRule.java
new file mode 100644
index 00000000000..f247574684b
--- /dev/null
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/MultiLineRule.java
@@ -0,0 +1,40 @@
+package org.eclipse.jface.text.rules;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+/**
+ * A rule for detecting patterns which begin with a given
+ * sequence and may end with a given sequence thereby spanning
+ * multiple lines.
+ */
+public class MultiLineRule extends PatternRule {
+
+ /**
+ * Creates a rule for the given starting and ending sequence
+ * which, if detected, will return the specified token.
+ *
+ * @param startSequence the pattern's start sequence
+ * @param endSequence the pattern's end sequence
+ * @param token the token to be returned on success
+ */
+ public MultiLineRule(String startSequence, String endSequence, IToken token) {
+ this(startSequence, endSequence, token, (char)0);
+ }
+
+ /**
+ * Creates a rule for the given starting and ending sequence
+ * which, if detected, will return the specific token.
+ * Any character which follows the given escape character will be ignored.
+ *
+ * @param startSequence the pattern's start sequence
+ * @param endSequence the pattern's end sequence
+ * @param token the token to be returned on success
+ * @param escapeCharacter the escape character
+ */
+ public MultiLineRule(String startSequence, String endSequence, IToken token, char escapeCharacter) {
+ super(startSequence, endSequence, token, escapeCharacter, false);
+ }
+} \ No newline at end of file

Back to the top