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
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.eclipse.xtext.formatting.IWhitespaceInformationProvider

        org.eclipse.xtext.formatting.IWhitespaceInformationProvider.Default
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String getLineSeparatorPreference​(org.eclipse.emf.common.util.URI aUri)  
      • Methods inherited from class org.eclipse.xtext.ui.editor.formatting.PreferenceStoreWhitespaceInformationProvider

        getIndentationInformation, getLineSeparatorInformation, getLineSeparatorPreference
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DSLWhitespaceInformationProvider

        public DSLWhitespaceInformationProvider()
    • Method Detail

      • getLineSeparatorPreference

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