Removed UI.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / PHPDocumentProvider.java
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPDocumentProvider.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPDocumentProvider.java
deleted file mode 100644 (file)
index 198ad1f..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-package net.sourceforge.phpeclipse.phpeditor;
-
-/**********************************************************************
-Copyright (c) 2000, 2002 IBM Corp. and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Common Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/cpl-v10.html
-
-Contributors:
-    IBM Corporation - Initial implementation
-    Klaus Hartlage - www.eclipseproject.de
-**********************************************************************/
-
-import net.sourceforge.phpeclipse.phpeditor.php.IPHPPartitionScannerConstants;
-import net.sourceforge.phpeclipse.phpeditor.php.PHPPartitionScanner;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jface.text.rules.DefaultPartitioner;
-import org.eclipse.ui.editors.text.FileDocumentProvider;
-
-/** 
- * The PHPDocumentProvider provides the IDocuments used by java editors.
- */
-
-public class PHPDocumentProvider extends FileDocumentProvider {
-
-  // private final static String[] TYPES= new String[] { PHPPartitionScanner.PHP, PHPPartitionScanner.JAVA_DOC, PHPPartitionScanner.JAVA_MULTILINE_COMMENT };
-  private final static String[] TYPES = new String[] { 
-       IPHPPartitionScannerConstants.PHP,
-       IPHPPartitionScannerConstants.PHP_MULTILINE_COMMENT,
-    IPHPPartitionScannerConstants.HTML, 
-       IPHPPartitionScannerConstants.HTML_MULTILINE_COMMENT,
-       IPHPPartitionScannerConstants.JAVASCRIPT,
-       IPHPPartitionScannerConstants.CSS};
-
-  private static PHPPartitionScanner fgScanner = null;
-
-  public PHPDocumentProvider() {
-    super();
-  }
-
-  /* (non-Javadoc)
-   * Method declared on AbstractDocumentProvider
-   */
-  protected IDocument createDocument(Object element) throws CoreException {
-    IDocument document = super.createDocument(element);
-    if (document != null) {
-      IDocumentPartitioner partitioner = createPHPPartitioner();
-      document.setDocumentPartitioner(partitioner);
-      partitioner.connect(document);
-    }
-    return document;
-  }
-
-  /**
-   * Return a partitioner for .php files.
-   */
-  private IDocumentPartitioner createPHPPartitioner() {
-    return new DefaultPartitioner(getPHPPartitionScanner(), TYPES);
-  }
-
-  /**
-   * Return a scanner for creating java partitions.
-   */
-  private PHPPartitionScanner getPHPPartitionScanner() {
-    if (fgScanner == null)
-      fgScanner = new PHPPartitionScanner();
-    return fgScanner;
-  }
-}