X-Git-Url: http://secure.phpeclipse.com
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/JavaHeuristicScanner.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/JavaHeuristicScanner.java
index 0ca33ab..e68f3c2 100644
--- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/JavaHeuristicScanner.java
+++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/JavaHeuristicScanner.java
@@ -15,12 +15,14 @@ import java.util.Arrays;
import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
import net.sourceforge.phpeclipse.phpeditor.php.PHPDocumentPartitioner;
-import org.eclipse.jface.text.Assert;
+//incastrix
+//import org.eclipse.jface.text.Assert;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
+//import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.Region;
+//import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.TextUtilities;
/**
@@ -677,16 +679,16 @@ public class JavaHeuristicScanner implements Symbols {
* @return a region describing the surrounding block, or null
* if none can be found
*/
- public IRegion findSurroundingBlock(int offset) {
- if (offset < 1 || offset >= fDocument.getLength())
- return null;
-
- int begin = findOpeningPeer(offset - 1, LBRACE, RBRACE);
- int end = findClosingPeer(offset, LBRACE, RBRACE);
- if (begin == NOT_FOUND || end == NOT_FOUND)
- return null;
- return new Region(begin, end + 1 - begin);
- }
+// public IRegion findSurroundingBlock(int offset) {
+// if (offset < 1 || offset >= fDocument.getLength())
+// return null;
+//
+// int begin = findOpeningPeer(offset - 1, LBRACE, RBRACE);
+// int end = findClosingPeer(offset, LBRACE, RBRACE);
+// if (begin == NOT_FOUND || end == NOT_FOUND)
+// return null;
+// return new Region(begin, end + 1 - begin);
+// }
/**
* Finds the smallest position in fDocument
such that the
@@ -706,9 +708,9 @@ public class JavaHeuristicScanner implements Symbols {
* bound
) that resides in a Java partition, or
* NOT_FOUND
if none can be found
*/
- public int findNonWhitespaceForward(int position, int bound) {
- return scanForward(position, bound, fNonWSDefaultPart);
- }
+// public int findNonWhitespaceForward(int position, int bound) {
+// return scanForward(position, bound, fNonWSDefaultPart);
+// }
/**
* Finds the smallest position in fDocument
such that the
@@ -749,9 +751,9 @@ public class JavaHeuristicScanner implements Symbols {
* position
] that resides in a Java partition, or
* NOT_FOUND
if none can be found
*/
- public int findNonWhitespaceBackward(int position, int bound) {
- return scanBackward(position, bound, fNonWSDefaultPart);
- }
+// public int findNonWhitespaceBackward(int position, int bound) {
+// return scanBackward(position, bound, fNonWSDefaultPart);
+// }
/**
* Finds the lowest position p
in fDocument
@@ -823,9 +825,9 @@ public class JavaHeuristicScanner implements Symbols {
* position
] that resides in a Java partition, or
* NOT_FOUND
if none can be found
*/
- public int scanForward(int position, int bound, char ch) {
- return scanForward(position, bound, new CharacterMatch(ch));
- }
+// public int scanForward(int position, int bound, char ch) {
+// return scanForward(position, bound, new CharacterMatch(ch));
+// }
/**
* Finds the lowest position in fDocument
such that the
@@ -847,9 +849,9 @@ public class JavaHeuristicScanner implements Symbols {
* bound
) that resides in a Java partition, or
* NOT_FOUND
if none can be found
*/
- public int scanForward(int position, int bound, char[] chars) {
- return scanForward(position, bound, new CharacterMatch(chars));
- }
+// public int scanForward(int position, int bound, char[] chars) {
+// return scanForward(position, bound, new CharacterMatch(chars));
+// }
/**
* Finds the highest position p
in fDocument
@@ -929,9 +931,9 @@ public class JavaHeuristicScanner implements Symbols {
* position
] that resides in a Java partition, or
* NOT_FOUND
if none can be found
*/
- public int scanBackward(int position, int bound, char ch) {
- return scanBackward(position, bound, new CharacterMatch(ch));
- }
+// public int scanBackward(int position, int bound, char ch) {
+// return scanBackward(position, bound, new CharacterMatch(ch));
+// }
/**
* Finds the highest position in fDocument
such that the
@@ -953,9 +955,9 @@ public class JavaHeuristicScanner implements Symbols {
* position
] that resides in a Java partition, or
* NOT_FOUND
if none can be found
*/
- public int scanBackward(int position, int bound, char[] chars) {
- return scanBackward(position, bound, new CharacterMatch(chars));
- }
+// public int scanBackward(int position, int bound, char[] chars) {
+// return scanBackward(position, bound, new CharacterMatch(chars));
+// }
/**
* Checks whether position
resides in a default (Java)