/* * Created on 28.04.2003 * */ package net.sourceforge.phpeclipse.phpeditor.php; import org.eclipse.jface.text.IDocument; /** * @author slanger * @version $Revision: 1.2 $ */ public class PHPPartition extends Partition { private boolean fShortTagsEnabled = true; /** * @param document * @param delim * @param contentType * @param parentPartition */ public PHPPartition(IDocument document, String parentPartition) { super( document, new char[] { '<', '>' }, IPHPPartitionScannerConstants.PHP, parentPartition); } /* (non-Javadoc) * @see net.sourceforge.phpeclipse.phpeditor.php.Partition#allowedPartition(java.lang.String) */ protected boolean allowedPartition(String type) { if(type.equals(IPHPPartitionScannerConstants.PHP_MULTILINE_COMMENT)) return true; return false; } /* (non-Javadoc) * @see net.sourceforge.phpeclipse.phpeditor.php.Partition#scan() */ protected boolean scan() { int ch; if(fShortTagsEnabled && checkPattern("", true)) { int offset = getOffset(); if(checkPattern("/*", true)) { unread(2); return; } } } }