intial source from ttp://www.sf.net/projects/wdte
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.css.ui / src / net / sourceforge / phpeclipse / css / ui / internal / CssDocumentSetupParticipant.java
1 /*
2  * Copyright (c) 2004 Christopher Lenz 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  *     Christopher Lenz - initial implementation
10  * 
11  * $Id: CssDocumentSetupParticipant.java,v 1.1 2004-09-02 18:11:49 jsurfer Exp $
12  */
13
14 package net.sourceforge.phpeclipse.css.ui.internal;
15
16 import net.sourceforge.phpeclipse.css.ui.CssUI;
17 import net.sourceforge.phpeclipse.css.ui.text.CssTextTools;
18
19 import org.eclipse.core.filebuffers.IDocumentSetupParticipant;
20 import org.eclipse.jface.text.IDocument;
21
22 /**
23  * Document setup participant that sets up the CSS specific partitioning.
24  */
25 public class CssDocumentSetupParticipant implements IDocumentSetupParticipant {
26
27         /* 
28          * @see IDocumentSetupParticipant#setup(IDocument)
29          */
30         public void setup(IDocument document) {
31                 if (document != null) {
32                         CssTextTools tools = CssUI.getDefault().getTextTools();
33                         tools.setupDocument(document);
34                 }
35         }
36
37 }