1) Fixed stackoverflow when clicking on entry in PHPeclipse Error Log: OverrideIndica...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / ui / text / JavaTextTools.java
index 10c34c1..636a10f 100644 (file)
@@ -24,8 +24,9 @@ import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IDocumentExtension3;
 import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jface.text.rules.DefaultPartitioner;
-import org.eclipse.jface.text.rules.RuleBasedScanner;
+//import org.eclipse.jface.text.rules.DefaultPartitioner;
+import org.eclipse.jface.text.rules.FastPartitioner;
+//import org.eclipse.jface.text.rules.RuleBasedScanner;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 
@@ -50,8 +51,12 @@ public class JavaTextTools implements IPHPPartitions {
        // JSPScriptScanner.JSP_DEFAULT,
        // JSPScriptScanner.JSP_BRACKET };
        private final static String[] LEGAL_CONTENT_TYPES = new String[] {
-                       PHP_PHPDOC_COMMENT, PHP_MULTILINE_COMMENT, PHP_SINGLELINE_COMMENT,
-                       PHP_STRING_DQ, PHP_STRING_SQ, PHP_STRING_HEREDOC };
+                       PHP_PHPDOC_COMMENT, 
+                       PHP_MULTILINE_COMMENT, 
+                       PHP_SINGLELINE_COMMENT,
+                       PHP_STRING_DQ, 
+                       PHP_STRING_SQ, 
+                       PHP_STRING_HEREDOC };
 
        // private static XMLPartitionScanner HTML_PARTITION_SCANNER = null;
 
@@ -296,9 +301,9 @@ public class JavaTextTools implements IPHPPartitions {
         * 
         * @return a Java source code scanner
         */
-       public RuleBasedScanner getCodeScanner() {
-               return fCodeScanner;
-       }
+//     public RuleBasedScanner getCodeScanner() {
+//             return fCodeScanner;
+//     }
 
        /**
         * Returns a scanner which is configured to scan Java multiline comments.
@@ -307,9 +312,9 @@ public class JavaTextTools implements IPHPPartitions {
         * 
         * @since 2.0
         */
-       public RuleBasedScanner getMultilineCommentScanner() {
-               return fMultilineCommentScanner;
-       }
+//     public RuleBasedScanner getMultilineCommentScanner() {
+//             return fMultilineCommentScanner;
+//     }
 
        /**
         * Returns a scanner which is configured to scan HTML code.
@@ -328,9 +333,9 @@ public class JavaTextTools implements IPHPPartitions {
         * 
         * @since 2.0
         */
-       public RuleBasedScanner getSmartyScanner() {
-               return fSmartyScanner;
-       }
+//     public RuleBasedScanner getSmartyScanner() {
+//             return fSmartyScanner;
+//     }
 
        /**
         * Returns a scanner which is configured to scan Smarty code.
@@ -339,9 +344,9 @@ public class JavaTextTools implements IPHPPartitions {
         * 
         * @since 2.0
         */
-       public RuleBasedScanner getSmartyDocScanner() {
-               return fSmartyDocScanner;
-       }
+//     public RuleBasedScanner getSmartyDocScanner() {
+//             return fSmartyDocScanner;
+//     }
 
        /**
         * Returns a scanner which is configured to scan Java singleline comments.
@@ -350,9 +355,9 @@ public class JavaTextTools implements IPHPPartitions {
         * 
         * @since 2.0
         */
-       public RuleBasedScanner getSinglelineCommentScanner() {
-               return fSinglelineCommentScanner;
-       }
+//     public RuleBasedScanner getSinglelineCommentScanner() {
+//             return fSinglelineCommentScanner;
+//     }
 
        /**
         * Returns a scanner which is configured to scan Java strings.
@@ -371,9 +376,9 @@ public class JavaTextTools implements IPHPPartitions {
         * 
         * @return a JavaDoc scanner
         */
-       public RuleBasedScanner getJavaDocScanner() {
-               return fPHPDocScanner;
-       }
+//     public RuleBasedScanner getJavaDocScanner() {
+//             return fPHPDocScanner;
+//     }
 
        /**
         * Returns a scanner which is configured to scan Java-specific partitions,
@@ -502,9 +507,9 @@ public class JavaTextTools implements IPHPPartitions {
         * @return the partition managing position categories or <code>null</code>
         *         if there is none
         */
-       public String[] getPartitionManagingPositionCategories() {
-               return new String[] { DefaultPartitioner.CONTENT_TYPES_CATEGORY };
-       }
+//     public String[] getPartitionManagingPositionCategories() {
+//             return new String[] { DefaultPartitioner.CONTENT_TYPES_CATEGORY };
+//     }
 
        /**
         * Determines whether the preference change encoded by the given event
@@ -579,7 +584,7 @@ public class JavaTextTools implements IPHPPartitions {
         */
        public IDocumentPartitioner createPHPPartitioner() {
                // return new DefaultPartitioner(getPHPPartitionScanner(), TYPES);
-               return new DefaultPartitioner(getPHPPartitionScanner(),
+               return new /*DefaultPartitioner*/FastPartitioner(getPHPPartitionScanner(),
                                LEGAL_CONTENT_TYPES);
        }
 
@@ -596,7 +601,7 @@ public class JavaTextTools implements IPHPPartitions {
        // return jspScriptScanner;
        // }
        private IDocumentPartitioner createSmartyPartitioner() {
-               return new DefaultPartitioner(getSmartyPartitionScanner(),
+               return new /*DefaultPartitioner*/FastPartitioner(getSmartyPartitionScanner(),
                                XMLTextTools.TYPES);
        }
 
@@ -729,7 +734,7 @@ public class JavaTextTools implements IPHPPartitions {
         * @return the core preference store
         * @since 3.0
         */
-       protected Preferences getCorePreferenceStore() {
-               return fCorePreferenceStore;
-       }
+//     protected Preferences getCorePreferenceStore() {
+//             return fCorePreferenceStore;
+//     }
 }
\ No newline at end of file