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
9 IBM Corporation - Initial implementation
10 **********************************************************************/
11 package net.sourceforge.phpeclipse.phpeditor;
13 import net.sourceforge.phpdt.internal.ui.text.IPHPPartitions;
14 import net.sourceforge.phpdt.ui.text.JavaTextTools;
15 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
17 import org.eclipse.core.filebuffers.IDocumentSetupParticipant;
18 import org.eclipse.jface.text.IDocument;
21 * The document setup participant for PHPDT.
23 public class SmartyDocumentSetupParticipant implements IDocumentSetupParticipant {
25 public SmartyDocumentSetupParticipant() {
29 * @see org.eclipse.core.filebuffers.IDocumentSetupParticipant#setup(org.eclipse.jface.text.IDocument)
31 public void setup(IDocument document) {
32 JavaTextTools tools= PHPeclipsePlugin.getDefault().getJavaTextTools();
33 tools.setupSmartyDocumentPartitioner(document, IPHPPartitions.PHP_PARTITIONING, null); //IPHPPartitions.PHP_PARTITIONING, null);