Prepared better HEREDOC support; see comment for bug #1319276
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / ui / text / PHPSourceViewerConfiguration.java
index ee2d646..d749720 100644 (file)
@@ -601,7 +601,7 @@ public class PHPSourceViewerConfiguration extends SourceViewerConfiguration {
 
     IPHPPartitions.HTML, IPHPPartitions.HTML_MULTILINE_COMMENT, IPHPPartitions.PHP_PARTITIONING,
         IPHPPartitions.PHP_SINGLELINE_COMMENT, IPHPPartitions.PHP_MULTILINE_COMMENT, IPHPPartitions.PHP_PHPDOC_COMMENT,
-        IPHPPartitions.PHP_STRING_DQ, IPHPPartitions.PHP_STRING_SQ, IPHPPartitions.CSS, IPHPPartitions.CSS_MULTILINE_COMMENT,
+        IPHPPartitions.PHP_STRING_DQ, IPHPPartitions.PHP_STRING_SQ, IPHPPartitions.PHP_STRING_HEREDOC, IPHPPartitions.CSS, IPHPPartitions.CSS_MULTILINE_COMMENT,
         IPHPPartitions.JAVASCRIPT, IPHPPartitions.JS_MULTILINE_COMMENT, IPHPPartitions.SMARTY,
         IPHPPartitions.SMARTY_MULTILINE_COMMENT,
 
@@ -625,7 +625,7 @@ public class PHPSourceViewerConfiguration extends SourceViewerConfiguration {
   public String[] getConfiguredPHPContentTypes() {
     return new String[] { IDocument.DEFAULT_CONTENT_TYPE, IPHPPartitions.PHP_PARTITIONING, IPHPPartitions.PHP_SINGLELINE_COMMENT,
         IPHPPartitions.PHP_MULTILINE_COMMENT, IPHPPartitions.PHP_PHPDOC_COMMENT, IPHPPartitions.PHP_STRING_DQ,
-        IPHPPartitions.PHP_STRING_SQ, IPHPPartitions.CSS, IPHPPartitions.CSS_MULTILINE_COMMENT, IPHPPartitions.JAVASCRIPT,
+        IPHPPartitions.PHP_STRING_SQ, IPHPPartitions.PHP_STRING_HEREDOC, IPHPPartitions.CSS, IPHPPartitions.CSS_MULTILINE_COMMENT, IPHPPartitions.JAVASCRIPT,
         IPHPPartitions.JS_MULTILINE_COMMENT, IPHPPartitions.SMARTY, IPHPPartitions.SMARTY_MULTILINE_COMMENT, };
   }
 
@@ -668,6 +668,7 @@ public class PHPSourceViewerConfiguration extends SourceViewerConfiguration {
     assistant.setContentAssistProcessor(processor, IPHPPartitions.PHP_PARTITIONING);
     assistant.setContentAssistProcessor(processor, IPHPPartitions.PHP_STRING_DQ);
     assistant.setContentAssistProcessor(processor, IPHPPartitions.PHP_STRING_SQ);
+    assistant.setContentAssistProcessor(processor, IPHPPartitions.PHP_STRING_HEREDOC);
 
     assistant.setContentAssistProcessor(new PHPDocCompletionProcessor(getEditor()), IPHPPartitions.PHP_PHPDOC_COMMENT);
     //    assistant.enableAutoActivation(true);
@@ -821,6 +822,9 @@ public class PHPSourceViewerConfiguration extends SourceViewerConfiguration {
     phpDR = new DefaultDamagerRepairer(getStringSQScanner());
     phpReconciler.setDamager(phpDR, IPHPPartitions.PHP_STRING_SQ);
     phpReconciler.setRepairer(phpDR, IPHPPartitions.PHP_STRING_SQ);
+    phpDR = new DefaultDamagerRepairer(getStringDQScanner());
+    phpReconciler.setDamager(phpDR, IPHPPartitions.PHP_STRING_HEREDOC);
+    phpReconciler.setRepairer(phpDR, IPHPPartitions.PHP_STRING_HEREDOC);
     phpDR = new DefaultDamagerRepairer(getSinglelineCommentScanner());
     phpReconciler.setDamager(phpDR, IPHPPartitions.PHP_SINGLELINE_COMMENT);
     phpReconciler.setRepairer(phpDR, IPHPPartitions.PHP_SINGLELINE_COMMENT);