Reference Documentation
- Overview
- What is Xtext?
- How Does It Work?
- Xtext is Highly Configurable
- Who Uses Xtext?
- Who is Behind Xtext?
- What is a Domain-Specific Language
- The Grammar Language
- A First Example
- The Syntax
- Language Declaration
- EPackage Declarations
- EPackage Generation
- EPackage Import
- Using Namespace URIs to Import Existing EPackages
- Using Resource URIs to Import Existing EPackages - Deprecated
- Using Classpath URIs to Import Existing EPackages - Deprecated
- Ecore Model Aliases for EPackages
- Rules
- Terminal Rules
- Return Types
- Extended Backus-Naur Form Expressions
- Keywords / Characters
- Character Ranges
- Wildcard
- Until Token
- Negated Token
- Rule Calls
- Alternatives
- Groups
- Terminal Fragments
- EOF - End Of File
- Parser Rules
- Extended Backus-Naur Form Expressions
- Assignments
- Cross-References
- Unordered Groups
- Simple Actions
- Unassigned Rule Calls
- Assigned Actions
- Hidden Terminal Symbols
- Data Type Rules
- Enum Rules
- Syntactic Predicates
- Ecore Model Inference
- Type and Package Generation
- Feature and Type Hierarchy Generation
- Enum Literal Generation
- Feature Normalization
- Customized Post Processing
- Error Conditions
- Grammar Mixins
- Common Terminals
- Configuration
- The Language Generator
- A Short Introduction to MWE2
- General Architecture
- Generator Fragments
- Configuration
- Standard Generator Fragments
- Dependency Injection in Xtext with Google Guice
- The Module API
- Obtaining an Injector
- Runtime Concepts
- Runtime Setup (ISetup)
- Setup within Eclipse-Equinox (OSGi)
- Logging
- Validation
- Automatic Validation
- Lexer/Parser: Syntactical Validation
- Linker: Crosslink Validation
- Serializer: Concrete Syntax Validation
- Custom Validation
- Validating Manually
- Test Validators
- Linking
- Declaration of Crosslinks
- Default Runtime Behavior (Lazy Linking)
- Scoping
- Global Scopes and Resource Descriptions
- Resource and EObject Descriptions
- Global Scopes Based On Explicit Imports (ImportURI Mechanism)
- Global Scopes Based On External Configuration (e.g. Classpath-Based)
- About the Index, Containers and Their Manager
- JDT-Based Container Manager
- Eclipse Project-Based Containers
- ResourceSet-Based Containers
- Local Scoping
- Declarative Scoping
- Imported Namespace-Aware Scoping
- org.eclipse.xtext.naming.IQualifiedNameProvider
- Importing Namespaces
- Value Converter
- Serialization
- The Contract
- Roles of the Semantic Model and the Node Model During Serialization
- Parse Tree Constructor
- Options
- Preserving Comments from the Node Model
- Transient Values
- Unassigned Text
- Cross-Reference Serializer
- Merge White Space
- Token Stream
- Formatting (Pretty Printing)
- General FormattingConfig Settings
- FormattingConfig Instructions
- Grammar Element Finders
- Fragment Provider (Referencing Xtext Models From Other EMF Artifacts)
- Encoding in Xtext
- Encoding at Language Design Time
- Encoding at Language Runtime
- Encoding of an XtextResource
- Encoding in New Model Projects
- Encoding of Xtext Source Code
- IDE Concepts
- Label Provider
- Label Providers For EObjects
- DefaultEObjectLabelProvider
- Label Providers For Index Entries
- Content Assist
- Quick Fixes
- Quickfixes for Linking Errors and Syntax Errors
- Template Proposals
- Cross Reference Template Variable Resolver
- Enumeration Template Variable Resolver
- Outline View
- Influencing the outline structure
- Styling the outline
- Filtering actions
- Sorting actions
- Quick Outline
- Hyperlinking
- Location Provider
- Customizing Available Hyperlinks
- Syntax Coloring
- Lexical Highlighting
- Semantic Highlighting
- Xtext and Java
- Plug-in Setup
- Referring to Java Elements using JVM Types
- Customization Points
- Referring to Java Types Using Xbase
- Inferring a JVM Model
- Linking and Indexing
- Using Xbase Expressions
- Making Your Grammar Refer To Xbase
- Using the Xbase Interpreter
- Xbase Language Reference
- Lexical Syntax
- Identifiers
- Escaped Identifiers
- Syntax
- Examples
- String Literals
- Syntax
- Examples
- Integer Literals
- Syntax
- Comments
- Syntax
- White Space
- Reserved Keywords
- Types
- Arrays
- Simple Type References
- Syntax
- Examples
- Function Types
- Syntax
- Examples
- Parameterized Type References
- Syntax
- Examples
- Primitives
- Conformance and Conversion
- Common Super Type
- Expressions
- Literals
- String Literals
- Integer Literals
- Boolean Literals
- Null Literal
- Type Literals
- Type Casts
- Syntax
- Examples
- Infix Operators / Operator Overloading
- Short-Circuit Boolean Operators
- Examples
- Assignments
- Feature Calls
- Syntax
- Property Access
- Implicit variables 'this' and 'it'
- Null-Safe Feature Call
- Constructor Call
- Examples
- Syntax
- Closures
- Syntax
- Typing
- Function Mapping
- Implicit Parameter it
- Examples
- If Expression
- Syntax
- Typing
- Examples
- Switch Expression
- Type guards
- Typing
- Examples
- Syntax
- Variable Declarations
- Syntax
- Typing
- Blocks
- Examples
- Syntax
- For Loop
- Syntax
- While Loop
- Syntax
- Examples
- Do-While Loop
- Syntax
- Examples
- Return Expression
- Throwing Exceptions
- Try, Catch, Finally
- Extension Methods
- Examples
- Builder Syntax
- MWE2
- Examples
- The Simplest Workflow
- A Simple Transformation
- A Stop-Watch
- Language Reference
- Mapping to Java Classes
- Module
- Properties
- Mandatory Properties
- Named Components
- Auto Injection
- Syntax Reference
- Module
- Property
- Component
- String Literals
- Boolean Literals
- References
- Integration with EMF and Other EMF Editors
- Model, Ecore Model, and Ecore
- EMF Code Generation
- XtextResource Implementation
- Integration with GMF Editors
- Stage 1: Make GMF Read and Write the Semantic Model As Text
- Stage 2: Calling the Xtext Parser to Parse GMF Labels
- Stage 3: A Popup Xtext Editor (experimental)