Class DSLWhitespaceInformationProvider

  • All Implemented Interfaces:
    org.eclipse.xtext.formatting.IWhitespaceInformationProvider

    public class DSLWhitespaceInformationProvider
    extends org.eclipse.xtext.ui.editor.formatting.PreferenceStoreWhitespaceInformationProvider
    Custom whitespace information provider which implements a more sophisticated, automatic line break detection, in case no line break information can be deduced from project/file settings. Only if that automatic detection fails, a fallback to the system property is done.

    Unfortunately, due to the superclass being not really ideal to extend in the manner I required, I had to copy/paste a lot more lines from it than I feel comfortable to :(.
    Author:
    Rene Schneider - initial API and implementation
    • Constructor Detail

      • DSLWhitespaceInformationProvider

        public DSLWhitespaceInformationProvider()
    • Method Detail

      • getLineSeparatorPreference

        protected String getLineSeparatorPreference​(org.eclipse.emf.common.util.URI aUri)
        Overrides:
        getLineSeparatorPreference in class org.eclipse.xtext.ui.editor.formatting.PreferenceStoreWhitespaceInformationProvider