Improved template handling in HTML partition
authoraxelcl <axelcl>
Thu, 18 Aug 2005 20:11:13 +0000 (20:11 +0000)
committeraxelcl <axelcl>
Thu, 18 Aug 2005 20:11:13 +0000 (20:11 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/TemplateProposal.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPDocumentPartitioner.java

index 7dc609a..828f11e 100644 (file)
@@ -8,7 +8,7 @@
  Contributors:
  Igor Malinin - initial contribution
 
- $Id: PHPDocumentPartitioner.java,v 1.3 2005-05-15 23:24:41 axelcl Exp $
+ $Id: PHPDocumentPartitioner.java,v 1.4 2005-08-18 20:09:25 axelcl Exp $
  **********************************************************************/
 package net.sourceforge.phpeclipse.phpeditor.php;
 
@@ -32,6 +32,11 @@ public class PHPDocumentPartitioner extends MultiViewPartitioner {
 
   public static final String PHP_SCRIPT_CODE = "__php_script_code";
 
+  public static final String[] LEGAL_TYPES = {
+       PHP_TEMPLATE_DATA,
+       PHP_SCRIPT_CODE
+  };
+  
   private IPartitionTokenScanner scriptScanner;
 
   public PHPDocumentPartitioner(IPartitionTokenScanner scanner, IPartitionTokenScanner scriptScanner) {
@@ -85,4 +90,8 @@ public class PHPDocumentPartitioner extends MultiViewPartitioner {
 
     return super.getContentType(parent, view);
   }
+
+       public String[] getLegalContentTypes() {
+               return LEGAL_TYPES;
+       }
 }
\ No newline at end of file