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;
17 * A very simple context type.
19 public class JSContextType extends TemplateContextType {
21 /** This context's id */
22 public static final String JS_CONTEXT_TYPE = "javascript"; //$NON-NLS-1$
25 * Creates a new XML context type.
27 public JSContextType() {
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());