1 package org.antlr.works.editor; 2 3 import org.antlr.works.components.grammar.CEditorGrammar; 4 5 import javax.swing.text.*; 6 36 37 public class EditorATEEditorKit extends StyledEditorKit implements ViewFactory { 38 39 protected CEditorGrammar editor; 40 41 public EditorATEEditorKit(CEditorGrammar editor) { 42 this.editor = editor; 43 } 44 45 public ViewFactory getViewFactory() { 46 return this; 47 } 48 49 public Document createDefaultDocument() { 50 return new DefaultStyledDocument(); 51 } 52 53 public View create(Element elem) { 54 return new EditorATERenderingView(elem, editor.getTextEditor(), editor.getDebugger()); 55 } 56 57 } 58 | Popular Tags |