1 19 package org.netbeans.modules.xml.text.syntax; 20 21 import javax.swing.text.Document ; 22 23 import org.netbeans.editor.Syntax; 24 import org.netbeans.editor.BaseDocument; 25 import org.netbeans.modules.editor.NbEditorKit; 26 27 import org.netbeans.modules.editor.*; 28 29 import org.netbeans.modules.xml.core.DTDDataObject; 30 31 import org.netbeans.modules.xml.text.syntax.javacc.lib.*; 32 import org.netbeans.modules.xml.text.syntax.javacc.*; 33 34 45 public class DTDKit extends UniKit { 46 47 48 private static final long serialVersionUID =-6140259975700590155L; 49 50 51 public Syntax createSyntax(Document doc) { 52 return new JJEditorSyntax( 53 new DTDSyntaxTokenManager(null).new Bridge(), 54 new DTDSyntaxTokenMapper(), 55 DTDTokenContext.contextPath 56 ); 57 } 58 59 public Document createDefaultDocument() { 60 return new NbEditorDocument (this.getClass()); 61 } 62 63 public String getContentType() { 64 return DTDDataObject.MIME_TYPE; 65 } 66 67 } 68 | Popular Tags |