Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Line break after multi-line comments using serialization
Line break after multi-line comments using serialization [message #1000351] Mon, 14 January 2013 15:14 Go to next message
Marco Naddeo is currently offline Marco NaddeoFriend
Messages: 62
Registered: November 2012
Member
Hi Smile

how can I insert a line break after multi-line comments when I serialize an EMF model?

For example, I want this:

/* This is a
multi-line
comment */
public void myMethod() {
...
}


and not this:

/* This is a
multi-line
comment */ public void myMethod() {
...
}


I'm using MyDslFormatter (extending AbstractDeclarativeFormatter) to format the code, but what about comments? Rolling Eyes

Thanks in advance,
Marco
Re: Line break after multi-line comments using serialization [message #1000816 is a reply to message #1000351] Tue, 15 January 2013 13:17 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
Registered: July 2009
Senior Member
Hi,

staight forwared doesnt work
c.setLinewrap().after(f.getML_COMMENTRule());

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Making part of DSL read-only
Next Topic:Use xmi elements inside the dsl
Goto Forum:
  


Current Time: Sat Apr 27 00:54:14 GMT 2024

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

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

Back to the top