EasyXtext provides a set of helper classes which ease the
implementation of plugins for domain-specific languages with Xtext.
Overview
EaxyXtext consists in two Eclipse plugins:
net.vtst.eclipse.easyxtext
, for all features
which correspond to the non-UI part of an Xtext plugin,
net.vtst.eclipse.easyxtext.ui
, for all features
which correspond to the UI part of an Xtext plugin.
Most of the helper classes from EasyXtext allows configuring
Xtext in a declarative manner, e.g.:
- By implementing a
configure
method, which calls
some binding or configuration function, or
- Thanks to a polymorphic dispatcher, and the implementation of
a method for each semantic class of the DSL for which the behavior
has to be customized.
Features
The main features of EasyXtext are:
- Lexing and parsing: ({@link
net.vtst.eclipse.easyxtext.parser})
- Customization of the lexers generated by Xtext/ANTLR using
Java regular expressions,
- Custom value converters.
- Resource support: ({@link
net.vtst.eclipse.easyxtext.resource})
- Location-in-file provider with polymorphic dispatching.
- Scoping: ({@link net.vtst.eclipse.easyxtext.scoping})
- Global scope provider for a predefined built-in scope,
- Qualified name provider with polymorphic dispatching.
- Folding: ({@link
net.vtst.eclipse.easyxtext.ui.folding})
- Folding region provider with polymorphic dispatching.
- Syntax coloring: ({@link
net.vtst.eclipse.easyxtext.ui.syntaxcoloring})
- Syntax coloring based on lexing,
- Syntax coloring based on parsing.
- Launch configuration: ({@link
net.vtst.eclipse.easyxtext.ui.launching})
- Definition of launch configurations and launch
configuration tabs,
- Launching external applications (Java-based or non-Java)
- Validation: ({@link
net.vtst.eclipse.easyxtext.validation})
- Property page allowing user to configure validators.
Use
Using EasyXtext in an Xtext-based plugin requires to install
the EasyXtext runtime module (for Guice) in the runtime
module of your plugin. For this purpose, follow the instruction given
in the documentation of {@link
net.vtst.eclipse.easyxtext.guice.EasyXtextModule}.