Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Implementing Domain-Specific Languages with Xtext and Xtend

You're reading from   Implementing Domain-Specific Languages with Xtext and Xtend If you know Eclipse then learning how to implement a DSL using Xtext is a natural progression. And this guide makes it easy to get started through a step-by-step approach accompanied with simple examples.

Arrow left icon
Product type Paperback
Published in Aug 2013
Publisher Packt
ISBN-13 9781782160304
Length 342 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Lorenzo Bettini Lorenzo Bettini
Author Profile Icon Lorenzo Bettini
Lorenzo Bettini
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Implementing Domain-Specific Languages with Xtext and Xtend
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. Implementing a DSL 2. Creating Your First Xtext Language FREE CHAPTER 3. The Xtend Programming Language 4. Validation 5. Code Generation 6. Customizations 7. Testing 8. An Expression Language 9. Type Checking 10. Scoping 11. Building and Releasing 12. Xbase 13. Bibliography
Index

Testing the UI


Most of the mechanisms of a DSL implemented in Xtext can be tested with plain Java Junit tests without a UI environment. However, when testing UI features, tests need a running Eclipse.

In the Entities DSL we did not customize the content assist, thus we do not really need to test it; however, for more complex DSLs, you want to test that the custom content assist works as expected, and you want to avoid having to manually check that.

Eclipse provides a specific launch configuration, "Junit Plug-in Test", which executes Junit tests with a running Eclipse.

Implementing tests for the UI concepts might be tricky, since usually you will need to write code to set up Eclipse workbench infrastructures such as projects, files, and so on. Xtext provides some base classes for testing UI concepts which do most of the job for you, so that you can simply test specific features without having to worry about the setup steps.

Note

The examples in this section do not necessarily represent valuable...

lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Implementing Domain-Specific Languages with Xtext and Xtend
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon