Class SpringCodeFormatter

java.lang.Object
org.eclipse.jdt.core.formatter.CodeFormatter
io.spring.javaformat.eclipse.formatter.SpringCodeFormatter
Direct Known Subclasses:
SpringCodeFormatterJdk17Spaces, SpringCodeFormatterJdk17Tabs, SpringCodeFormatterJdk8Spaces, SpringCodeFormatterJdk8Tabs

public abstract class SpringCodeFormatter extends org.eclipse.jdt.core.formatter.CodeFormatter
Eclipse CodeFormatter base class for Spring formatting.
Author:
Phillip Webb
  • Field Summary

    Fields inherited from class org.eclipse.jdt.core.formatter.CodeFormatter

    F_INCLUDE_COMMENTS, K_CLASS_BODY_DECLARATIONS, K_COMPILATION_UNIT, K_EXPRESSION, K_JAVA_DOC, K_MODULE_INFO, K_MULTI_LINE_COMMENT, K_SINGLE_LINE_COMMENT, K_STATEMENTS, K_UNKNOWN
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createIndentationString(int indentationLevel)
     
    org.eclipse.text.edits.TextEdit
    format(int kind, String source, int offset, int length, int indentationLevel, String lineSeparator)
     
    org.eclipse.text.edits.TextEdit
    format(int kind, String source, org.eclipse.jface.text.IRegion[] regions, int indentationLevel, String lineSeparator)
     
    void
     

    Methods inherited from class java.lang.Object

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

    • SpringCodeFormatter

      public SpringCodeFormatter(JavaFormatConfig javaFormatConfig)
  • Method Details

    • format

      public org.eclipse.text.edits.TextEdit format(int kind, String source, int offset, int length, int indentationLevel, String lineSeparator)
      Specified by:
      format in class org.eclipse.jdt.core.formatter.CodeFormatter
    • format

      public org.eclipse.text.edits.TextEdit format(int kind, String source, org.eclipse.jface.text.IRegion[] regions, int indentationLevel, String lineSeparator)
      Specified by:
      format in class org.eclipse.jdt.core.formatter.CodeFormatter
    • createIndentationString

      public String createIndentationString(int indentationLevel)
      Overrides:
      createIndentationString in class org.eclipse.jdt.core.formatter.CodeFormatter
    • setOptions

      public void setOptions(Map<String,String> options)
      Overrides:
      setOptions in class org.eclipse.jdt.core.formatter.CodeFormatter