Refactory: remove dependance to org.eclipse.debug.ui from net.sourceforge.phpeclipse.ui
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / phpeditor / JavaDocumentSetupParticipant.java
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.core.filebuffers.IDocumentSetupParticipant;
19 import org.eclipse.jface.text.IDocument;
20
21 /**
22  * The document setup participant for PHPDT.
23  */
24 public class JavaDocumentSetupParticipant implements IDocumentSetupParticipant {
25
26         public JavaDocumentSetupParticipant() {
27         }
28
29         /*
30          * @see org.eclipse.core.filebuffers.IDocumentSetupParticipant#setup(org.eclipse.jface.text.IDocument)
31          */
32         public void setup(IDocument document) {
33                 JavaTextTools tools = WebUI.getDefault().getJavaTextTools();
34                 tools.setupJavaDocumentPartitioner(document,
35                                 IPHPPartitions.PHP_PARTITIONING);
36
37                 // tools.setupJavaDocumentPartitioner(document,
38                 // IPHPPartitions.PHP_PARTITIONING, null);
39                 // //IPHPPartitions.PHP_PARTITIONING, null);
40         }
41 }