A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / ui / templates / template / JSContextType.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation 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 API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpeclipse.ui.templates.template;
12
13 import org.eclipse.jface.text.templates.GlobalTemplateVariables;
14 import org.eclipse.jface.text.templates.TemplateContextType;
15
16 /**
17  * A very simple context type.
18  */
19 public class JSContextType extends TemplateContextType {
20
21         /** This context's id */
22         public static final String JS_CONTEXT_TYPE = "javascript"; //$NON-NLS-1$
23
24         /**
25          * Creates a new XML context type.
26          */
27         public JSContextType() {
28                 addGlobalResolvers();
29         }
30
31         private void addGlobalResolvers() {
32                 addResolver(new GlobalTemplateVariables.Cursor());
33                 addResolver(new GlobalTemplateVariables.WordSelection());
34                 addResolver(new GlobalTemplateVariables.LineSelection());
35                 addResolver(new GlobalTemplateVariables.Dollar());
36                 addResolver(new GlobalTemplateVariables.Date());
37                 addResolver(new GlobalTemplateVariables.Year());
38                 addResolver(new GlobalTemplateVariables.Time());
39                 addResolver(new GlobalTemplateVariables.User());
40         }
41
42 }