| /******************************************************************************* |
| * Copyright (c) 2009 David Green and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * David Green - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.mylyn.internal.wikitext.ui.editor.assist; |
| |
| import org.eclipse.jface.text.templates.GlobalTemplateVariables; |
| import org.eclipse.jface.text.templates.TemplateContextType; |
| |
| public class SourceTemplateContextType extends TemplateContextType { |
| |
| public static final String ID = "org.eclipse.mylyn.wikitext.ui.editor"; //$NON-NLS-1$ |
| |
| public SourceTemplateContextType() { |
| super(ID, Messages.MarkupTemplateCompletionProcessor_contextName); |
| 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()); |
| } |
| } |