Questions tagged [xpand]

Xpand is a language specialized on code generation for Eclipse.

Xpand is a language specialized on code generation based on EMF models. It supports the following main language features:

Pluggable Type System Dynamic Dispatch of Functions AOP Rich Expressions (OCL-like but with Java-like syntax)

Official Wiki : http://wiki.eclipse.org/Xpand

32 questions
4
votes
2 answers

How to solve ERROR Mwe2Launcher: Couldn't find EClass for name

I created a Xpand generator. In its src/ folder I've defined my model My.nn a template and a workflow. This is how my workflow.mwe2 file looks like: module workflow.NeuralNetworksGenerator import org.eclipse.emf.mwe.utils.* var targetDir =…
deedee
  • 311
  • 1
  • 3
  • 8
4
votes
2 answers

Type field of Property not filled in for UML PrimitiveType in Xpand

I have an XPT template that generates text from a UML model. This is the excerpt I use on the attributes of a class «FOREACH attribute AS a» Id: «a.name» Type: «a.type.name» «ENDFOREACH» All works well as long as the type is a class from…
allprog
  • 16,540
  • 9
  • 56
  • 97
4
votes
1 answer

How to call Java code from Xpand?

I want to call an arbitrary Java method from an Xpand template (e.g. a static method). How can I do this?
thSoft
  • 21,755
  • 5
  • 88
  • 103
4
votes
1 answer

M2T Xpand with existing ecore model

I have an ecore model MyModel.ecore for which i want to generate code using Xpand. I dont have edit code or a runtime environment for the xpand project, i just want to create a xpand project, load MyModel.ecore, create a model.xmi using "create…
Moises B.
  • 637
  • 1
  • 8
  • 19
3
votes
1 answer

Make either a reference or a terminal accessible through the same element name in Xtext/Xpand?

I have an Xtext grammar that describes statemachines, and I have been using references to previously declared events and states to describe transitions: Event: 'event' name=ID ; State: 'state' name=ID ; Transition: event=[Event] '=>'…
weltraumpirat
  • 22,544
  • 5
  • 40
  • 54
2
votes
5 answers

What is the difference between Acceleo and Xpand?

I have a DSL which is based on a custom metamodel, which in its turn is based on EMF/Ecore. I am trying to figure out which solution to choose, and I cant find any decent comparisons anywhere. Does anyone have any reasons why I should choose one…
anders
  • 772
  • 1
  • 10
  • 17
2
votes
1 answer

Parser error on Xpand: SAXParserFactoryImpl cannot be cast to SAXParserFactory

I am getting this dialog box when i am building my application with Xpand. "An internal error occurred during: "Analyzing accessible EMF metamodels for project my.generator.project". org.apache.xerces.jaxp.SAXParserFactoryImpl cannot be cast to…
Eshika
  • 321
  • 1
  • 8
  • 20
2
votes
2 answers

Samples from Xpand -

Can i get some good tutorials on XPand.. i need to get info on commands like LET. It would better if some one could post some samples on it. The problem i am facing is like.. i run a "for" loop and after checking some condition i need to increment a…
Reji
  • 3,426
  • 2
  • 21
  • 25
2
votes
2 answers

How to use xtext and xpand togheter

I have a rather silly question. I am using xtext to define a simple dsl and Xpand to generate code. Now I want to use xpand to read my dsl models and generate code. How can i do that? I read lot of tutorials saying that I can simple do that by…
panipsilos
  • 2,219
  • 11
  • 37
  • 53
2
votes
1 answer

How to convert my DSL to an existing programming language?

I want to build a domain-specific language that can be converted to an existing language (e.g. python, SQL). I try to avoid building a full-blown compiler and have looked into Xtext and Xpand. They look plausible, as Xtext will be used to design the…
darcyy
  • 5,236
  • 5
  • 28
  • 41
1
vote
1 answer

Java code generation with XPAND (nested packages)

I'm working on generating code from an existing model with XPAND. This model contains nested packages as one knows them from Java for example. As far as I understand there are no loops or anything, so that I could concatenate for example the package…
Asamandra
  • 57
  • 1
  • 9
1
vote
4 answers

How to configure Xtext mwe.Reader to fill the root element in a slot

I am using Xtext 2.0 with MWE 1 and XPand, but I guess the Problem for MWE 2 and XTend is exactly the same. My Xtext grammer looks like this (excerpt): grammer org.test.Test with org.eclipse.xtext.common.Terminals generate test…
Ralph
  • 118,862
  • 56
  • 287
  • 383
1
vote
3 answers

Actionscript 3 code beautifier for xpand (MWE2 Workflow)

I Currently I'm developing a code generator for Java and Actionscript3. The generator works quiet well, but the Actionscript3 code isn't really nice. For Java, there is an existing code beautifier integrated with xpand (MWE2 Workflow) but for…
Yves
  • 172
  • 2
  • 14
1
vote
1 answer

How to migrate code generation from xpand to xtend(2)?

We wanto to reimplement an old project, wich used code generation via xtext and xpand. Xpand should be replaced with Xtend(2) and the old fornax plugin workflow execution should be removed, replacey by xtext and xtend maven plugins. In the old…
gregor
  • 63
  • 6
1
vote
0 answers

Providing Cusom Jars in newly created DSL-Projects in Xtext

this might be a duplicate question (see Xtext Project: Add Jar Libraries with the Project Wizard Manager into the Classpath/Referenced Libaries of the clients Project), but I'm not able to comment on the original one due to low reputation. Therefore…
Stefan
  • 11
  • 1
1
2 3