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
diff --git a/archive/net.sourceforge.phpeclipse.css.ui/src/net/sourceforge/phpeclipse/css/ui/internal/CssDocumentSetupParticipant.java b/archive/net.sourceforge.phpeclipse.css.ui/src/net/sourceforge/phpeclipse/css/ui/internal/CssDocumentSetupParticipant.java
new file mode 100644 (file)
index 0000000..a0aae6d
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2004 Christopher Lenz 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:
+ *     Christopher Lenz - initial implementation
+ * 
+ * $Id: CssDocumentSetupParticipant.java,v 1.1 2004-09-02 18:11:49 jsurfer Exp $
+ */
+
+package net.sourceforge.phpeclipse.css.ui.internal;
+
+import net.sourceforge.phpeclipse.css.ui.CssUI;
+import net.sourceforge.phpeclipse.css.ui.text.CssTextTools;
+
+import org.eclipse.core.filebuffers.IDocumentSetupParticipant;
+import org.eclipse.jface.text.IDocument;
+
+/**
+ * Document setup participant that sets up the CSS specific partitioning.
+ */
+public class CssDocumentSetupParticipant implements IDocumentSetupParticipant {
+
+       /* 
+        * @see IDocumentSetupParticipant#setup(IDocument)
+        */
+       public void setup(IDocument document) {
+               if (document != null) {
+                       CssTextTools tools = CssUI.getDefault().getTextTools();
+                       tools.setupDocument(document);
+               }
+       }
+
+}