Syntax | Name | Alternate names | Extensions |
---|---|---|---|
text files[2]
This syntax is for plain text documents. It has no syntax highlighting
|
text | - | txt |
batch files[3]
They are Windows bat files
|
batch | bat | - |
C++ files | c++ | cpp | cpp, cc, hpp |
C# files | csharp | c# | cs |
C files | c | C | c, h |
fortran files | fortran | - | for, f, ftn, fpp, f90,f95, f03, f08 |
html files | html | - | html, htm |
idl declarations | idl | IDL | idl |
JavaScript files | jscript | js, javascript | js |
JSON files[4]
JSON files are valid JavaScript files, so the syntax for these files is the same
|
json | - | json |
Java files | java | - | java |
Groovy files[5]
Groovy files are presented by default with the same syntax as Java files, though the syntax can be overriden by syntax packs
|
groovy | - | groovy, gvy, gy, gsh |
makefiles | make | - | make |
php files | php | - | php |
properties files | props | properties | properties |
Python files | python | py | py |
SQL files | sql | SQL | sql |
T-SQL files | tsql | T-SQL | tsql |
shell scripts[6]
they are Unix or Linux shell scripts
|
shell | bash | bash, sh |
XML files | xml | dtd, DTD, xsd, xsl | xml, xsd, xsl, xul, svg, xaml, scxml, fxml, rdf, vxml, wsdl, dae, owl |
SPARQL files | sparql | - | sparql |
turtle files | turtle | ttl | ttl |
TeX files | tex | - | tex |
xpath files | xpath | - | xpath |
patch files | patch | - | patch |
eiffel files | eiffel | - | e |
manifest files[7]
it is Java manifest file
|
manifest | - | mf |
css files | css | - | stylesheet |
csv files[8]
Uses commas as delimiters
|
csv | - | csv |
csv2 files[9]
Uses semi-colons as delimiters
|
csv2 | - | - |
TokenMarker
for a syntax:TokenMarker
associated with a syntax name or file extensionTokenMarker
for the java
syntax, you can either do:TokenMarker tk = new JavaTokenMarker();or:
SyntaxMapper mapper = SyntaxMapper.getInstance(); TokenMarker tk = mapper.createTokenMarker("java");It is also possible to create a TokenMarker associated with a file extension. For example:
SyntaxMapper mapper = SyntaxMapper.getInstance(); Syntax syntax = mapper.getSyntaxForExtension("htm"); TokenMarker tk = syntax.createTokenMarker();
jEditor-syntaxes.jar
jar file, released with the library, provides syntaxes for the following languages:Document doc = ... SyntaxTokenizer tokenizer = new SyntaxTokenizer("java"); StyledDocument styledDoc = tokenizer.applySyntax(doc);
Copyright 2016-2019 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence