Chapter 6. Customizing Xtext Components
In this chapter, we describe the main mechanism for customizing Xtext components—Google Guice, a Dependency Injection framework. With Google Guice, we can easily and consistently inject custom implementations of specific components into Xtext. In the first section, we will briefly show some Java examples that use Google Guice. Then, we will show how Xtext uses this dependency injection framework. In particular, you will learn how to customize both the runtime and the UI aspects.
This chapter will cover the following topics:
- An introduction to Google Guice dependency injection framework
- How Xtext uses Google Guice
- How to customize several aspects of an Xtext DSL
Dependency injection
The Dependency Injection pattern ...
Get Implementing Domain-Specific Languages with Xtext and Xtend - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.