/******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.ganoro.phing.ui.editors.templates; import org.eclipse.jface.text.templates.TemplateContextType; import org.eclipse.jface.text.templates.GlobalTemplateVariables; /** * A very simple context type. */ public class BuildFileContextType extends TemplateContextType { /** This context's id */ public static final String BUILDFILE_CONTEXT_TYPE= "org.ganoro.phing.ui.editors.templates.buildFile"; //$NON-NLS-1$ /** * Creates a new XML context type. */ public BuildFileContextType() { addGlobalResolvers(); } private void addGlobalResolvers() { addResolver(new GlobalTemplateVariables.Cursor()); addResolver(new GlobalTemplateVariables.WordSelection()); addResolver(new GlobalTemplateVariables.LineSelection()); addResolver(new GlobalTemplateVariables.Dollar()); addResolver(new GlobalTemplateVariables.Date()); addResolver(new GlobalTemplateVariables.Year()); addResolver(new GlobalTemplateVariables.Time()); addResolver(new GlobalTemplateVariables.User()); } }