xtext

The JvmModelInferrer, the debugger and Xbase in Xtext 2.3

In previous posts, I had blogged about some experiments done with Xtext 2 wonderful mechanisms to access Java types and to reuse Xbase expressions; however, when generating code, I was using the "manual way". That is to say, I was not using the JvmModelInferrer mechanism; the mechanism of JvmModelInferrer allows to define a mapping from your DSL elements to Java elements. You'll then have for free a complete integration of Java into your DSL, and viceversa (yes, from Java you can jump directly to your DSL elements starting from generated classes, methods, etc.). And by the way, you'll also have [...]

Di |2020-04-27T09:08:21+00:00maggio 22nd, 2012|

Xtext 2.1: using Xbase variables

On a previous post, I started to blog about how Xtext 2.1 made it extremely easy to have a powerful integration with Java thanks to Xbase, a new expression language library which allows to integrate (Java-like) expressions in your DSL. I had also blogged about using JVM types from your DSL. In this post, IÔÇÖd like to continue to inspect how to use only a small part of Xbase and still have the control on the generation part: in particular (for other projects) I would like to retain the control on the generation for my model, while relying on the [...]

Di |2012-06-08T11:14:50+00:00dicembre 26th, 2011|

Xtext 2.1: using Xbase expressions

On a previous post, I started to blog about how Xtext 2.1 made it extremely easy to have a powerful integration with Java in your DSL. In this post I'd like to continue to experiment with this mechanism, and in particular I'll start to use Xbase, a new expression language library which allows to integrate (Java-like) expressions in your DSL. If you take a look at the Five simple steps to your JVM language, you'll see the power of Xbase! Moreover, in Xtext 2.1, using Xbase is even easier since by writing only a AbstractModelInferrer you'll get a full integration [...]

Di |2012-06-08T11:15:15+00:00novembre 23rd, 2011|

Using JVM Types in Xtext 2.1 and the ImportManager

Xtext 2.1 made it even easier to access Java types from your DSL; you can find some paragraphs in the documentation. In particular, the new features of Xbase seem to make this integration even more powerful! This paragraph in the documentation briefly describe how to refer to Java elements using JVM Types, and then dedicates much more room to accessing Java Types using Xbase. In this post, I'd like to document some my experiments/experiences in accessing JVM Types without using Xbase, and in particular, not by using the good ol' Domainmodel example, but something even more simpler, so that I [...]

Di |2012-06-08T11:15:38+00:00novembre 21st, 2011|
Torna in cima