b80e3365546336d496b8e27c678763e26c9642cf
[phpeclipse.git] /
1 /**********************************************************************
2  Copyright (c) 2000, 2003 IBM Corp. and others.
3  All rights reserved. This program and the accompanying materials
4  are made available under the terms of the Common Public License v1.0
5  which accompanies this distribution, and is available at
6  http://www.eclipse.org/legal/cpl-v10.html
7
8  Contributors:
9  IBM Corporation - Initial implementation
10  **********************************************************************/
11 package net.sourceforge.phpeclipse.phpeditor;
12
13 import net.sourceforge.phpdt.internal.ui.text.IPHPPartitions;
14 import net.sourceforge.phpdt.ui.text.JavaTextTools;
15 //import net.sourceforge.phpeclipse.PHPeclipsePlugin;
16 import net.sourceforge.phpeclipse.ui.WebUI;
17
18 import org.eclipse.jface.text.IDocument;
19 import org.eclipse.ui.editors.text.StorageDocumentProvider;
20
21 /**
22  * @since 3.0
23  */
24 public class JavaStorageDocumentProvider extends StorageDocumentProvider {
25
26         public JavaStorageDocumentProvider() {
27                 super();
28         }
29
30         /*
31          * @see org.eclipse.ui.editors.text.StorageDocumentProvider#setupDocument(java.lang.Object,
32          *      org.eclipse.jface.text.IDocument)
33          */
34         protected void setupDocument(Object element, IDocument document) {
35
36                 if (document != null) {
37                         JavaTextTools tools = WebUI.getDefault()
38                                         .getJavaTextTools();
39                         tools.setupJavaDocumentPartitioner(document,
40                                         IPHPPartitions.PHP_PARTITIONING);
41
42                         // tools.setupJavaDocumentPartitioner(document,
43                         // IDocument.DEFAULT_CONTENT_TYPE, element); //IPHPPartitions.HTML,
44                         // element);
45                 }
46         }
47 }