Spaces for indentation [message #1821459] |
Thu, 13 February 2020 12:15 |
Denis Nikiforov Messages: 346 Registered: August 2013 |
Senior Member |
|
|
Hi
The questions was asked several times before. However I can't find a working solution. Can you suggest please how to use spaces for indentation? Is it possible to use tabs/spaces depending on Eclipse settings?
[Updated on: Thu, 13 February 2020 12:18] Report message to a moderator
|
|
|
|
Re: Spaces for indentation [message #1821461 is a reply to message #1821460] |
Thu, 13 February 2020 12:23 |
|
so you might use this for debugging:
org.eclipse.xtext.ui.editor.formatting2.ContentFormatter.initRequest(IXtextDocument, IRegion, XtextResource, FormatterRequest)
this one calls the method. it uses FormatterPreferenceValuesProvider which is usually bound in abstractyourdsluimodule
public void configureFormatterPreferences(Binder binder) {
binder.bind(IPreferenceValuesProvider.class).annotatedWith(FormatterPreferences.class).to(FormatterPreferenceValuesProvider.class);
}
FormatterPreferenceValuesProvider delegates to IWhitespaceInformationProvider which is bound in eclipse to
PreferenceStoreWhitespaceInformationProvider by default.
which again delegates to PreferenceStoreIndentationInformation
which reads spaces for tabs.
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06112 seconds