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
1
vote
1 answer

Eclipse Modeling Framework and XPAND - How to create iOS metamodel?

I want to define a model driven approach with Eclipse Modeling Framework (EMF) and XPAND. Therefore I want to define a platform specific metamodel (PSM) with Ecore and write XPAND templates for code generation for the iOS platform. My question is…
1
vote
1 answer

Compile a DSL developed in Xtext and Xpand on command line

It seems like a DSL (Domain-specific Language) developed in Xtext and Xpand is very much bound with Eclipse. Is there any way I can compile my DSL on command line, just like compiling Java code?
darcyy
  • 5,236
  • 5
  • 28
  • 41
1
vote
3 answers

How to programmatically run an Xpand workflow on a model in a second workbench?

I have an Xtext/Xpand (oAW 4.3, Eclipse 3.4) generator plug-in, which I run together with the editor plug-in in a second workbench. There, I'd like to run Xpand workflows programmatically on the model file I create. If I set the model file using the…
Fabian Steeg
  • 44,988
  • 7
  • 85
  • 112
1
vote
2 answers

Eclipse Modeling Framework - Workflow?

I have the following question. I have got an EMF Project with a M2M Transformation which uses ATL as Technology. Then I have a project that uses XPand for Code Generation. I want to do the following workflow. Model A -- --> Model B ----> Code How…
0
votes
1 answer

Hibernate columnDefault true needs to be mapped to sqlserver BIT default 1

I have a need to map the @org.hibernate.annotations.ColumnDefault("true") to BIT default 1 in generated SQL schema. Is there anyway other than adding a @Column(columnDefinintion="BIT default 1") I'm using SQL Server 2008 Dialect and hibernate 5.3.26…
0
votes
0 answers

Is it possible to pass parameters from MWE2 configuration to XTend

for very long time I used XPand with MWE2 and there is a variable mechanism that I can define in MWE2 and pass it to XPand Template, like the following. component = org.eclipse.xpand2.Generator : javaGenerator { metaModel = umlMM globalVarDef…
posthumecaver
  • 1,584
  • 4
  • 16
  • 29
0
votes
1 answer

What are the minimal pom dependencies of Xpand?

I use Xpand for code generation inside a maven plugin project. So, I need to add the required libraries as dependencies in pom.xml in order to define and use Xpand templates. What is the minimum list of dependencies that should be added to the pom?
user3399000
  • 353
  • 3
  • 18
0
votes
1 answer

How To invoke a model's template from another model in xpand for AUTOSAR

I've been trying to develop an AUTOSAR 4.2.1 module to generate code using Xpand/Xtend. I'm using artext demonstrator 1.6.0. But my query is that the concept of defining a variation point is not found in the PDF(ECUConfigurationParameters.arxml)…
Sujju
  • 97
  • 8
0
votes
2 answers

How can I return a list based on a condition on the referencing elements of the list

I want to return a list of elements of 'ListOfObjects' that are being referenced by 'SomeOtherObject' with it's(SomeOtherObject's) attribute satisfying the condition. I'm trying this…
Sujju
  • 97
  • 8
0
votes
0 answers

Can we do template based generation using only Xtend2

I've been trying to do some template based C code generation with Xpand/Xtend. Using Template.xpt which uses some xtend code like Utils.ext to do some processing. My problem is that instead of writing methods like this: cached…
Sujju
  • 97
  • 8
0
votes
1 answer

Exception in thread "main" java.lang.NoSuchFieldError: ruleMemo

I am following a nice openArchitectureWare tutorial (It is about code generation with oAW from EMF models using Xpand). At the final code generation step, when it is supposed to generate the code (when running workflow.oaw after defining the…
user3399000
  • 353
  • 3
  • 18
0
votes
1 answer

Pass String with Xpand method call as parameter

In XPAND template, I have a call where, the call should be done for the method which takes the String and the Object. i.e. , «setData("String",Object)-» For the above method, the String value I want to pass is the simplified value of below…
0
votes
2 answers

How to install the Xpand in Eclipse?

I m trying to install Xpand in Eclipse. I am doing it through update manager. However the download stack at around 29%. I use the following link: http://download.eclipse.org/modeling/m2t/xpand/updates/nightly/ Alternatively I downloaded the zip…
panipsilos
  • 2,219
  • 11
  • 37
  • 53
0
votes
1 answer

generated Xpand code ' editor does not contain a main type'. However I have a main method

I am trying to understand dsl code generation with xText and xPand. I have opened the statemachine xText example in eclipse and ran as a new eclipse application. I then made a java contaning a test.statemachine file in the src and copied the…
Dan Barr
  • 93
  • 9
0
votes
1 answer

How can I programmatically run an Xpand code generator from a Java class?

I am trying to achieve model driven development by defining a DSL and performing M2M as well as M2T (code generation). For the code generation I chose to work with XPand and template definitions. Could you provide sample code or link to…
Pavlos
  • 73
  • 1
  • 7