Refactory
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / phpeditor / php / HTMLPartitionScanner.java
index eab265e..077e7c6 100644 (file)
  */
 package net.sourceforge.phpeclipse.phpeditor.php;
 
-import java.util.ArrayList;
+//import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
 
 import net.sourceforge.phpdt.internal.ui.text.IPHPPartitions;
 
-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.ITypedRegion;
+//import org.eclipse.jface.text.ITypedRegion;
 import org.eclipse.jface.text.rules.ICharacterScanner;
 import org.eclipse.jface.text.rules.IPartitionTokenScanner;
 import org.eclipse.jface.text.rules.IToken;
@@ -41,7 +43,7 @@ public class HTMLPartitionScanner implements IPartitionTokenScanner {
 
        private String fContentType = IPHPPartitions.HTML;
 
-       private String fPrevContentType = IPHPPartitions.HTML;
+       //private String fPrevContentType = IPHPPartitions.HTML;
 
        private boolean partitionBorder = false;
 
@@ -431,12 +433,12 @@ public class HTMLPartitionScanner implements IPartitionTokenScanner {
         * @return <code>true</code> if the current offset is in a string else
         *         returns false.
         */
-       private boolean isInString(String contentType) {
-               if (fContentType == contentType)
-                       return (fInString || fInDoubString);
-               else
-                       return false;
-       }
+//     private boolean isInString(String contentType) {
+//             if (fContentType == contentType)
+//                     return (fInString || fInDoubString);
+//             else
+//                     return false;
+//     }
 
        /**
         * Returns the previouse partition stack for the given offset.
@@ -446,27 +448,27 @@ public class HTMLPartitionScanner implements IPartitionTokenScanner {
         * 
         * @return The stack as a string array.
         */
-       private String[] getPartitionStack(int offset) {
-               ArrayList types = new ArrayList();
-               int tmpOffset = 0;
-               try {
-                       ITypedRegion region = fDocument.getPartition(offset);
-                       tmpOffset = region.getOffset();
-                       while (tmpOffset - 1 > 0) {
-                               region = fDocument.getPartition(tmpOffset - 1);
-                               tmpOffset = region.getOffset();
-                               types.add(0, region.getType());
-                       }
-               } catch (BadLocationException e) {
-                       if (DEBUG) {
-                               e.printStackTrace();
-                       }
-               }
-
-               String[] retVal = new String[types.size()];
-
-               retVal = (String[]) types.toArray(retVal);
-               return retVal;
-       }
+//     private String[] getPartitionStack(int offset) {
+//             ArrayList types = new ArrayList();
+//             int tmpOffset = 0;
+//             try {
+//                     ITypedRegion region = fDocument.getPartition(offset);
+//                     tmpOffset = region.getOffset();
+//                     while (tmpOffset - 1 > 0) {
+//                             region = fDocument.getPartition(tmpOffset - 1);
+//                             tmpOffset = region.getOffset();
+//                             types.add(0, region.getType());
+//                     }
+//             } catch (BadLocationException e) {
+//                     if (DEBUG) {
+//                             e.printStackTrace();
+//                     }
+//             }
+//
+//             String[] retVal = new String[types.size()];
+//
+//             retVal = (String[]) types.toArray(retVal);
+//             return retVal;
+//     }
 
 }