1 19 package org.netbeans.modules.css.text.syntax; 20 21 import javax.swing.text.Document ; 22 23 import org.openide.*; 24 25 import org.netbeans.editor.*; 26 import org.netbeans.modules.editor.*; 27 import org.netbeans.modules.editor.options.AllOptions; 28 29 import org.netbeans.modules.css.text.syntax.javacc.lib.*; 30 import org.netbeans.modules.css.text.syntax.javacc.*; 31 32 import org.netbeans.modules.css.CSSObject; 33 34 41 public class CSSEditorKit extends NbEditorKit { 42 43 private static final long serialVersionUID = -5758543042688196595L; 44 45 46 public Syntax createSyntax(Document doc) { 47 return new JJEditorSyntax( 48 new CSSSyntaxTokenManager(null).new Bridge(), 49 new CSSEditorSyntaxMapper(), 50 CSSTokenContext.contextPath 51 ); 52 } 53 54 public Document createDefaultDocument() { 55 return new NbEditorDocument (this.getClass()); 56 } 57 58 public String getContentType() { 59 return CSSObject.MIME_TYPE; 60 } 61 62 } 63 | Popular Tags |