package jp.sourceforge.projects.ee2e.core.cf;

import jp.sourceforge.projects.ee2e.core.editors.EE2EIndentBehavior;
import jp.sourceforge.projects.ee2e.core.editors.EE2EIndentXML;
import jp.sourceforge.projects.ee2e.core.editors.EE2EIndentXMLFormat;

/**
 * @author user
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
/**
 * 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 EE2ECFXml extends EE2ECF {
    public EE2ECFXml() {
        super();
    }
    /**
     * @see jp.sourceforge.projects.ee2e.core.editors.EE2ECF#getFactoryName()
     */
    public String getFactoryName() {
        return "xml";
    }
    /**
     * @see jp.sourceforge.projects.ee2e.core.editors.EE2ECF#tabIndentAction()
     */
    public EE2EIndentBehavior indentAction() {
        if(xml == null) {
             xml = this.createIndentXML();
        }
        return xml;
    }
    protected EE2EIndentXML createIndentXML() {
        return new EE2EIndentXML(this.getSize(), this.getEmptyLineStatus());
    }
    private EE2EIndentXML xml;
    
	/**
	 * @see jp.sourceforge.projects.ee2e.core.editors.EE2ECF#tabFormatAction()
	 */
    public EE2EIndentBehavior tabFormatAction() {
        if(format == null) {
             format = new EE2EIndentXMLFormat(this.getSize());
        }
        return format;
    }
    private EE2EIndentXMLFormat format;

    /** Is an indent allowed by empty line? */
    protected boolean getEmptyLineStatus() {
        return false;
    }
}
