Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornick2002-07-12 15:21:48 +0000
committernick2002-07-12 15:21:48 +0000
commit30ff93906764849cfc1ea9bc6f740cda24b6d2b0 (patch)
treeee2e9c248ee4f50bb768441485dc883682ac6c70 /org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse
parentce81eadfd93a2d3c6f0a777ebf53acfcd7c46d7a (diff)
downloadeclipse.platform.text-30ff93906764849cfc1ea9bc6f740cda24b6d2b0.tar.gz
eclipse.platform.text-30ff93906764849cfc1ea9bc6f740cda24b6d2b0.tar.xz
eclipse.platform.text-30ff93906764849cfc1ea9bc6f740cda24b6d2b0.zip
Removed unused class (see bug 21370)
Diffstat (limited to 'org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse')
-rw-r--r--org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaWordDetector.java63
1 files changed, 0 insertions, 63 deletions
diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaWordDetector.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaWordDetector.java
deleted file mode 100644
index 6aaf2850895..00000000000
--- a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaWordDetector.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.eclipse.ui.examples.javaeditor.java;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-
-/**
- * Detects Java words in documents.
- */
-public class JavaWordDetector {
-
- /**
- * Find the location of the word at offset in document.
- * @returns Point - x is the start position, y is the end position.
- * Return null if it is not found.
- * @param document the document being searched.
- * @param offset - the position to start searching from.
- */
- public static Point findWord(IDocument document, int offset) {
-
- int start= -1;
- int end= -1;
-
- try {
-
- int position= offset;
- char character;
-
- while (position >= 0) {
- character= document.getChar(position);
- if (!Character.isJavaIdentifierPart(character))
- break;
- --position;
- }
-
- start= position;
-
- position= offset;
- int length= document.getLength();
-
- while (position < length) {
- character= document.getChar(position);
- if (!Character.isJavaIdentifierPart(character))
- break;
- ++position;
- }
-
- end= position;
-
- if (end > start)
- return new Point(start, end - start);
-
- } catch (BadLocationException x) {
- }
-
- return null;
- }
-}

Back to the top