From: axelcl Date: Thu, 18 Aug 2005 20:11:13 +0000 (+0000) Subject: Improved template handling in HTML partition X-Git-Url: http://git.phpeclipse.com Improved template handling in HTML partition --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/TemplateProposal.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/TemplateProposal.java index 4ca7d17..f042e57 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/TemplateProposal.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/TemplateProposal.java @@ -54,7 +54,6 @@ import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.texteditor.link.EditorLinkedModeUI; - /** * A template proposal. */ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPDocumentPartitioner.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPDocumentPartitioner.java index 7dc609a..828f11e 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPDocumentPartitioner.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPDocumentPartitioner.java @@ -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