A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / php / PHPWordExtractor.java
index 4db149a..ed9b88c 100644 (file)
@@ -1,14 +1,14 @@
 /**********************************************************************
-Copyright (c) 2000, 2002 IBM Corp. and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Common Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/cpl-v10.html
-
-Contributors:
-    IBM Corporation - Initial implementation
-    www.phpeclipse.de
-**********************************************************************/
+ Copyright (c) 2000, 2002 IBM Corp. and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Common Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/cpl-v10.html
+
+ Contributors:
+ IBM Corporation - Initial implementation
+ www.phpeclipse.de
+ **********************************************************************/
 package net.sourceforge.phpeclipse.phpeditor.php;
 
 import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
@@ -24,10 +24,13 @@ public class PHPWordExtractor {
 
        /**
         * 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.
+        * 
+        * @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) {
 
@@ -41,7 +44,8 @@ public class PHPWordExtractor {
 
                        while (position >= 0) {
                                character = document.getChar(position);
-                               if (!Scanner.isPHPIdentifierPart(character) && (character != '$'))
+                               if (!Scanner.isPHPIdentifierPart(character)
+                                               && (character != '$'))
                                        break;
                                --position;
                        }
@@ -53,12 +57,13 @@ public class PHPWordExtractor {
 
                        while (position < length) {
                                character = document.getChar(position);
-                               if (!Scanner.isPHPIdentifierPart(character) && (character != '$'))
+                               if (!Scanner.isPHPIdentifierPart(character)
+                                               && (character != '$'))
                                        break;
                                ++position;
                        }
 
-      start++;
+                       start++;
                        end = position;
 
                        if (end > start)