blob: 493f1e6fd41a70217d83c801b94b5a55223bb266 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
* 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:
* Istvan Rath - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.editor.text.light;
import org.eclipse.viatra2.editor.text.Activator;
import org.eclipse.viatra2.editor.text.light.vtml.QuickParseVTMLAction;
import org.eclipse.viatra2.editor.text.light.vtml.VTMLConfiguration;
import org.eclipse.ui.editors.text.TextEditor;
public class VTMLEditor extends TextEditor {
private VTEColorProvider iColorProvider;
protected QuickParseVTMLAction iQuickParseAction;
public VTMLEditor() {
super();
iColorProvider = new VTEColorProvider();
setSourceViewerConfiguration(new VTMLConfiguration(iColorProvider));
}
@Override
protected void createActions() {
super.createActions();
iQuickParseAction = new QuickParseVTMLAction();
setAction("quickparse", iQuickParseAction);
}
public void updateActions()
{
//((VTMLActionbarContributor)getEditorSite().getActionBarContributor()).updateActions(this);
//getEditorSite().getActionBars().getToolBarManager().update(true);
//getEditorSite().getActionBars().updateActionBars();
}
@Override
public void setFocus() {
super.setFocus();
updateActions();
Activator.getDefault().setCurrentVTMLEditor(this);
}
public void dispose() {
iColorProvider.dispose();
super.dispose();
}
}