2 * Created on 28.04.2003
5 package net.sourceforge.phpeclipse.phpeditor.php;
7 import org.eclipse.jface.text.*;
11 * @version $Revision: 1.1 $
13 public class PHPPartition extends Partition
15 private boolean fShortTagsEnabled = true;
21 * @param parentPartition
23 public PHPPartition(IDocument document, String parentPartition)
27 new char[] { '<', '>' },
28 IPHPPartitionScannerConstants.PHP,
35 * @see net.sourceforge.phpeclipse.phpeditor.php.Partition#allowedPartition(java.lang.String)
37 protected boolean allowedPartition(String type)
39 if(type.equals(IPHPPartitionScannerConstants.PHP_MULTILINE_COMMENT))
46 * @see net.sourceforge.phpeclipse.phpeditor.php.Partition#scan()
48 protected boolean scan()
51 if(fShortTagsEnabled && checkPattern("<?", true))
55 else if(checkPattern("<?php", false))
65 private void scanToEnd()
70 while(!checkPattern("?>", true))
72 int offset = getOffset();
73 if(checkPattern("/*", true))