Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Maetzel2003-08-14 13:11:35 +0000
committerKai Maetzel2003-08-14 13:11:35 +0000
commit21f84691e7324824072b444be93d1666405c9a6e (patch)
tree8f2db0feccbf6f4e2abebf29bc26b0934c91b9fe /org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example
parent0f999aa6a80753245c3e9136c354eed5557f664f (diff)
downloadeclipse.platform.text-21f84691e7324824072b444be93d1666405c9a6e.tar.gz
eclipse.platform.text-21f84691e7324824072b444be93d1666405c9a6e.tar.xz
eclipse.platform.text-21f84691e7324824072b444be93d1666405c9a6e.zip
bug fix
Diffstat (limited to 'org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example')
-rw-r--r--org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java
index 76132bf6352..cf459d97768 100644
--- a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java
@@ -36,14 +36,9 @@ public class JavaAutoIndentStrategy extends DefaultAutoIndentStrategy {
* Returns whether or not the text ends with one of the given search strings.
*/
private boolean endsWithDelimiter(IDocument d, String txt) {
-
String[] delimiters= d.getLegalLineDelimiters();
-
- for (int i= 0; i < delimiters.length; i++) {
- if (txt.endsWith(delimiters[i]))
- return true;
- }
-
+ if (delimiters != null)
+ return TextUtilities.endsWith(delimiters, txt) > -1;
return false;
}

Back to the top