Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to disable OneWhitespaceFormatter
icon5.gif  How to disable OneWhitespaceFormatter [message #1696759] Thu, 28 May 2015 12:43 Go to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 78
Registered: December 2011
Member
The formatter removes multiple whitespaces from my dsl. Is it possible to disable the OneWhitespaceFormatter? For my DSL is important to leave the whitespaces in some cases (print formatting).
Re: How to disable OneWhitespaceFormatter [message #1696864 is a reply to message #1696759] Fri, 29 May 2015 07:20 Go to previous messageGo to next message
Moritz Eysholdt is currently offline Moritz EysholdtFriend
Messages: 161
Registered: July 2009
Location: Kiel, Germany
Senior Member
Usually one would implement the formatter that it doesn't remove the whitespace you need.

However, you can disable the formatter in the editor by putting

public Class<? extends IContentFormatterFactory> bindIContentFormatterFactory() {
  return null;
}


into your MyLanguageUIModule.

Also note that there is a new formatter API on the horizon:
http://www.slideshare.net/meysholdt/xtexts-new-formatter-api
Re: How to disable OneWhitespaceFormatter [message #1697059 is a reply to message #1696864] Mon, 01 June 2015 09:19 Go to previous messageGo to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 78
Registered: December 2011
Member
Thank you for your reply. I used the new formatter, which is really nice!
Re: How to disable OneWhitespaceFormatter [message #1700424 is a reply to message #1697059] Thu, 02 July 2015 14:20 Go to previous message
ayman salah is currently offline ayman salahFriend
Messages: 131
Registered: June 2015
Senior Member
Does the new formatter have onewhitespaceformatter? Because in my case i want the same behavior of it in my DSL.
Previous Topic:Redirect Generator Output into another Workspace Project
Next Topic:Couldn't find resource on classpath
Goto Forum:
  


Current Time: Tue Apr 16 13:09:45 GMT 2024

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

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

Back to the top