package jp.sourceforge.projects.ee2e.core.cf;
import jp.sourceforge.projects.ee2e.core.*;
import jp.sourceforge.projects.ee2e.core.relax.*;
import jp.sourceforge.projects.ee2e.core.editors.EE2EIndentBehavior;
import jp.sourceforge.projects.ee2e.core.editors.EE2EIndentJava;
import jp.sourceforge.projects.ee2e.core.editors.EE2EMenuBehavior;
import jp.sourceforge.projects.ee2e.core.editors.EE2EToolkit;

/**
 * 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 EE2ECFJava extends EE2ECF {
    public EE2ECFJava() {
        super();
    }
    /**
     * @see jp.sourceforge.projects.ee2e.core.editors.EE2ECF#getFactoryName()
     */
    public String getFactoryName() {
        return "java";
    }

    /**
     * @see jp.sourceforge.projects.ee2e.core.editors.EE2ECF#tabIndentAction()
     */
    public EE2EIndentBehavior indentAction() {
        if(jb == null) {
            int indentLen;
            EE2REe2e ee2e = EE2EToolkit.get().getEe2e(this.getFactoryName());
            if (ee2e == null) {
                EE2EDebug.printf(1, "eE2EFileInstance/ee2e is null");
                indentLen = 4;
            } else {
                indentLen = ee2e.getIndent();
            }
            jb = new EE2EIndentJava(indentLen);
        }
        return jb;
    }
    private EE2EIndentJava jb;

	/**
	 * @see jp.sourceforge.projects.ee2e.core.editors.EE2ECF#tabFormatAction()
	 */
    public EE2EIndentBehavior tabFormatAction() {
    	return null;
    }

    /**
     * @see jp.sourceforge.projects.ee2e.core.editors.EE2ECF#commentRegion()
     */
    public EE2EMenuBehavior commentRegion() {
        return null;
    }
      
    /**
     * @see jp.sourceforge.projects.ee2e.core.editors.EE2ECF#unCommentRegion()
     */
    public EE2EMenuBehavior unCommentRegion() {
        return null;
    }
}
