1 19 20 package org.netbeans.modules.editor; 21 22 import java.io.Writer ; 23 import javax.swing.text.Document ; 24 import org.netbeans.editor.Formatter; 25 import org.openide.text.IndentEngine; 26 27 32 33 public class IndentEngineFormatter extends Formatter { 34 35 private IndentEngine indentEngine; 36 37 43 public IndentEngineFormatter(Class kitClass, IndentEngine indentEngine) { 44 super(kitClass); 45 46 this.indentEngine = indentEngine; 47 } 48 49 50 public IndentEngine getIndentEngine() { 51 return indentEngine; 52 } 53 54 public int indentLine(Document doc, int offset) { 55 return indentEngine.indentLine(doc, offset); 56 } 57 58 public int indentNewLine(Document doc, int offset) { 59 return indentEngine.indentNewLine(doc, offset); 60 } 61 62 public Writer createWriter(Document doc, int offset, Writer writer) { 63 return indentEngine.createWriter(doc, offset, writer); 64 } 65 66 } 67 | Popular Tags |