Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » DSL Formatter does not execute(xtext formatter)
DSL Formatter does not execute [message #1219614] Wed, 04 December 2013 22:44 Go to next message
Franz Schubert is currently offline Franz Schubert
Messages: 1
Registered: December 2013
Junior Member
Hoping for some help with what I believe is a basic problem.

I have a DSL (we'll call it MyDsl), the plugin and generator for which work perfectly. However, some of the methods that are called by the generator cause line breaks to occur in bad spots, such as:

private int
  someField;


I have assumed that the best way to remove these lines breaks is through the MyDslFormatter.xtend::configureFormatting method. Something like
c.setNoLinewrap().after(ga.getFieldValueRule())
However, even a basic
c.setAutoLinewrap(20)
has no effect on the code which is produced by the generator.

A breakpoint in the MyDslFormatter.java class never gets hit.

What am I missing? Do I need to add something to a config file to cause my formatter to get picked up during the modeling workflow process?

Thanks
Re: DSL Formatter does not execute [message #1219631 is a reply to message #1219614] Thu, 05 December 2013 05:57 Go to previous message
Christian Dietrich is currently online Christian Dietrich
Messages: 6396
Registered: July 2009
Senior Member
Hi the formatter is for formatting DSL files (if you call it in the
editor or call the serializer ) and not for your igenerator

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Previous Topic:Problem while exporting eclipse product
Next Topic:Error method or field is undefined for the type xxx
Goto Forum:
  


Current Time: Fri Oct 31 06:39:23 GMT 2014

Powered by FUDForum. Page generated in 0.01782 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software