xtext

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 absolute path of the IFile I have, e.g. with: String dslFile = file.getLocation().makeAb...

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 counter . but i am unable to do so. when i increment the counter, it gets printed to the...

ANTLR Operator Precedence

How is operator precedence implemented in ANTLR? I'm using the XText/Antlr package at the moment. Edit: I did what sepp2k suggested, and operator precedence works now, but stuff like 3 +* also work now. The operators are basically "falling through" the tree. Also, I tried the C grammar on ANTLR's website and the same thing happened...

XText for EClipse & Oslo Intellipad for SQL Server then WHAT FOR .NET ??

XText is a great editor and language manufacture for the DSLs in EClipse. I thought that Intellipad is the equivalent in the .NET world, of course as all I get disappointed when Microsoft announce that it would be part of SQL Server. Now if I need to create a DSL that runs on the .NET environment with editor that support coloring, intel...

Can I use XText for a DSL involving an XML file type?

I have defined a small DSL that is mostly written in the form of different types of XML files in conjuction with some property files. This works very well but I wish to create an Eclipse Editor to make editing these files easier for beginners (I already have a working parser). The main XML file can reference some items from the .propert...

What are the main differences between Jetbrains' MPS and Eclipse Xtext?

I have used Eclipse Xtext in several projects. I loved the ease of defining a grammar over an Ecore (meta)model and letting everything generated for you including awesome Eclipse plugin editor, but I was quite uncomfortable with the underlying EMF framework with everything hard-wired in static fields. Lately I came across Jetbrains' MPS...

How can I traverse the EMF object tree generated by Xtext?

I'm using Xtext to define my DSL. Xtext generates a parser that lets me traverse the EMF model of my input DSL. I'd like to translate this EMF model into some other tree. To do this translation, I need to traverse the tree. But, I couldn't find a visitor class for the EMF model generated by Xtext. The closest thing that I've found is a S...

Why linking doesn't work in my Xtext-based DSL?

The following is the Xtext grammar for my DSL. Model: variableTypes=VariableTypes predicateTypes=PredicateTypes variableDeclarations= VariableDeclarations rules=Rules; VariableType: name=ID; VariableTypes: 'var types' (variableTypes+=VariableType)+; PredicateTypes: 'predicate types' (predicateTypes+=PredicateType)+; Predic...

Getting XText to work

I know you don't like helping others in their homework but I have to make an XText grammar, write a sample code that matches this grammar and compile it to a html file. The lecturer showed us the steps and everything worked for him... He said "It's so simple it will be a 10 minute work for you". And I believed that. However at home almo...

Good resources for learning xtext ?

Can anyone recommend any good resources (online or books) for learning how to use xtext ? I know the xtext site has some pretty good tutorials but I am looking for something more detailed (Classical ER modeling,...). ...

Problem integrating OCL types in Xtext grammar

Hi, I'm working on a grammar (Xtext project) where I want to reuse OCL types. Usually you refer in Xtext to existing types with an import statement, e.g. import "http://www.eclipse.org/emf/2002/Ecore" as ecore There is already an example Xtext project (CompleteOCL) which integrates OCL types in a grammar. Unfortunately the project re...

How can I store inline HTML in an XText class?

I'm using XElement-related stack of classes to build HTML. One thing I need is the XText element to store raw HTML (e.g., <i>this</i>) without HTML-encoding it. Is there any hack that would let me do it so that when I call ToString() it gives me the expected HTML back? ...

Java plug-in Extension Point

Hello guys, I am creating a programming language in xtext and I want: I need to know which extension point I have to choose to create my own Run-As handler in the plug-in development. to create my handler of running the program by contributing to the Run As extension. How to attach a command when the user right-click a table in the Da...