Package com.dubture.twig.ui.preferences

Source Code of com.dubture.twig.ui.preferences.TwigTemplatePreferencePage

/*******************************************************************************
* This file is part of the Twig eclipse plugin.
*
* (c) Robert Gruendler <r.gruendler@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
******************************************************************************/
package com.dubture.twig.ui.preferences;

import org.eclipse.php.internal.ui.IPHPHelpContextIds;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Event;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.texteditor.templates.TemplatePreferencePage;

import com.dubture.twig.ui.TwigUICorePlugin;

/**
*
* {@link TwigTemplatePreferencePage} contributes a preference page for twig
* code assist templates.
*
*
* @author Robert Gruendler <r.gruendler@gmail.com>
*
*/
@SuppressWarnings("restriction")
public class TwigTemplatePreferencePage extends TemplatePreferencePage
{

    public TwigTemplatePreferencePage()
    {

        TwigUICorePlugin plugin = TwigUICorePlugin.getDefault();

        setPreferenceStore(plugin.getPreferenceStore());
        setTemplateStore(plugin.getTemplateStore());
        setContextTypeRegistry(plugin.getTemplateContextRegistry());

    }

    public void performHelp()
    {
        PlatformUI
                .getWorkbench()
                .getHelpSystem()
                .setHelp(getControl(), IPHPHelpContextIds.TEMPLATES_PREFERENCES);
        getControl().notifyListeners(SWT.Help, new Event());
    }

}
TOP

Related Classes of com.dubture.twig.ui.preferences.TwigTemplatePreferencePage

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.