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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpeclipse.ui.templates.template;
13 import org.eclipse.jface.text.templates.GlobalTemplateVariables;
14 import org.eclipse.jface.text.templates.TemplateContextType;
18 * A very simple context type.
20 public class JSContextType extends TemplateContextType {
22 /** This context's id */
23 public static final String JS_CONTEXT_TYPE= "javascript"; //$NON-NLS-1$
26 * Creates a new XML context type.
28 public JSContextType() {
32 private void addGlobalResolvers() {
33 addResolver(new GlobalTemplateVariables.Cursor());
34 addResolver(new GlobalTemplateVariables.WordSelection());
35 addResolver(new GlobalTemplateVariables.LineSelection());
36 addResolver(new GlobalTemplateVariables.Dollar());
37 addResolver(new GlobalTemplateVariables.Date());
38 addResolver(new GlobalTemplateVariables.Year());
39 addResolver(new GlobalTemplateVariables.Time());
40 addResolver(new GlobalTemplateVariables.User());