/*
 * Created on 2003/05/02
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package jp.sourceforge.projects.ee2e.core.editors;

import org.eclipse.ui.IEditorPart;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.ant.internal.ui.editor.AntEditorActionContributor;
import jp.sourceforge.projects.ee2e.core.EE2EDebug;
import jp.sourceforge.projects.ee2e.core.display.EE2EMiniBufferView;


/**
 * To change this generated comment edit the template variable "typecomment":
 * Window&gt;Preferences&gt;Java&gt;Templates.
 * To enable and disable the creation of type comments go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation.
 *
 * @author Toshikazu Ando [ ando@park.ruru.ne.jp ]
 */
public class EE2EAntEditorActionContributor extends AntEditorActionContributor {
    public EE2EAntEditorActionContributor() {
        super();
        EE2EDebug.printf(3, "EE2EAntEditorActionContributor start!");
    }

    /**
     * @see org.eclipse.ui.IEditorActionBarContributor#setActiveEditor(IEditorPart)
     */
    public void setActiveEditor(IEditorPart part) {
        if(part != null) {
            EE2ETextEditorActionContributor.checkSetting(part);
            EE2ETextEditorActionContributor.createIMenuManager(part);
        }
        super.setActiveEditor(part);
    }

    /**
     * @see IEditorActionBarContributor#dispose()
     * @since 2.0
     */
    public void dispose() {
        super.dispose();
        EE2EDebug.printf(3, "EE2EAntEditorActionContributor#dispose");
        EE2EMiniBufferView.removeEE2EDisplayCompletion();
    }
    /**
     * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToMenu(IMenuManager)
     */
    public void contributeToMenu(IMenuManager manager) {
        EE2EDebug.printf(3, "EE2EAntEditorActionContributor#contributeToMenu");
        super.contributeToMenu(manager);
        EE2ETextEditorActionContributor.staticContributeToMenu(manager);
    }
}
