jEditor-def
attribute which identifies the XML file describing each syntaxjEditor-extensions
: identifies the name of the syntax syntax for each extensionjEditor-type
: identifies the class which implements the syntax highlighting for each syntax. This class must extend the TokenMarker classfile
elements, which contain:name
attribute for the syntax namepath
attribute for the syntax TokenMarker classextension
attribute for the syntax extensiontype
attribute for the syntax type[1]
markup
, code
, shell
, text
altname
children elements if the syntax has more than one nameextension
children elements if the syntax has more than one extension<file name="java" extension="java" path="org.jeditor.scripts.tokenmarkers.JavaTokenMarker" type="code" />For a HTML syntax:
<file name="html" path="org.jeditor.scripts.tokenmarkers.HTMLTokenMarker" type="markup"> <extension extension="html" /> <extension extension="htm" /> </file>
<file name="c++" path="org.jeditor.scripts.tokenmarkers.CCTokenMarker" type="code"> <altName name="cpp" /> <extension extension="cpp" /> <extension extension="cc" /> <extension extension="hpp" /> </file>In that case, you can name your syntax either
c++
or cpp
, and the file can have one of the following extensions: cpp
, cc
, or hpp
.
jEditor-type
attribute identifies the path of the class which implements the syntax highlighting for each syntax. This class must extend the TokenMarker classjEditor-extensions
atttribute identifies the name of the syntax for each extensionjEditor-type
attribute:html=org.jeditor.scripts.tokenmarkers.HTMLTokenMarkerFor the file specified by the
jEditor-extensions
attribute:html=html htm=htm
jEditor-syntaxes.jar
jar file, released with the library, provides syntaxes for the following languages:jEditor-def: org/jeditor/scripts/pack/filetypes.xmlFor the
filetypes.xml
file:<fileTypes> <file name="povray" extension="pov" path="org.jeditor.scripts.pack.PovrayTokenMarker" type="code" /> <file name="ruby" extension="rb" path="org.jeditor.scripts.pack.RubyTokenMarker" type="code" /> <file name="groovy" path="org.jeditor.scripts.pack.GroovyTokenMarker" type="code"> <extension extension="groovy" /> <extension extension="gvy" /> <extension extension="gy" /> <extension extension="gsh" /> </file> </fileTypes>
jEditor-extensions: org/jeditor/scripts/pack/fileextensionpack.properties jEditor-type: org/jeditor/scripts/pack/filetypepack.propertiesFor the
fileextensionpack.properties
file:pov=povray rb=ruby groovy=groovyFor the
filetypepack.properties
file:povray=org.jeditor.scripts.pack.PovrayTokenMarker ruby=org.jeditor.scripts.pack.RubyTokenMarker groovy=org.jeditor.scripts.pack.GroovyTokenMarker
markup
, code
, shell
, text
Copyright 2016-2019 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence