Class JacksonJsonFormatterService

java.lang.Object
de.funfried.netbeans.plugins.external.formatter.json.base.AbstractJsonFormatterService
de.funfried.netbeans.plugins.external.formatter.json.jackson.JacksonJsonFormatterService
All Implemented Interfaces:
FormatterService

public class JacksonJsonFormatterService extends AbstractJsonFormatterService
Jackson Json implementation of the AbstractJsonFormatterService.
Author:
bahlef
  • Field Details

  • Constructor Details

    • JacksonJsonFormatterService

      public JacksonJsonFormatterService()
  • Method Details

    • getDisplayName

      @NonNull public String getDisplayName()
      Retruns the display name of this formatter implementation.
      Returns:
      the display name of this formatter implementation
    • getId

      @NonNull public String getId()
      Retruns the unique identifier of this formatter implementation.
      Returns:
      the unique identifier of this formatter implementation
    • createOptionsPanel

      public FormatterOptionsPanel createOptionsPanel(Project project)
      Creates and returns the FormatterOptionsPanel for this formatter which will be displayed in the overall options dialog underneath this formatters selection.
      Parameters:
      project - the Project if the panel which is created is used to modify project specific settings, otherwise null
      Returns:
      the FormatterOptionsPanel for this formatter, or null if there are no options a user could make for this formatter
    • getContinuationIndentSize

      @CheckForNull public Integer getContinuationIndentSize(Document document)
      Returns the continuation indent size configured for the given Document, or null if it should not affect the editor behavior.
      Parameters:
      document - the Document for which the continuation indent size is requested
      Returns:
      the continuation indent size configured for the given Document, or null if it should not affect the editor behavior
    • getIndentSize

      @CheckForNull public Integer getIndentSize(Document document)
      Returns the indent size configured for the given Document, or null if it should not affect the editor behavior.
      Parameters:
      document - the Document for which the indent size is requested
      Returns:
      the indent size configured for the given Document, or null if it should not affect the editor behavior
    • getRightMargin

      @CheckForNull public Integer getRightMargin(Document document)
      Not supported by this formatter returns always 0 except the given Document is null, then also null will be returned.
      Parameters:
      document - the Document for which the right margin is requested
      Returns:
      0 except the given Document is null, then also null will be returned
    • getFormatJob

      protected FormatJob getFormatJob(StyledDocument document)
      Returns the FormatJob.
      Specified by:
      getFormatJob in class AbstractJsonFormatterService
      Parameters:
      document - the StyledDocument which should be formatted
    • getSpacesPerTab

      @CheckForNull public Integer getSpacesPerTab(Document document)
      Returns the spaces per tab configured for the given Document, or null if it should not affect the editor behavior.
      Parameters:
      document - the Document for which the spaces per tab is requested
      Returns:
      the spaces per tab configured for the given Document, or null if it should not affect the editor behavior
    • isExpandTabToSpaces

      @CheckForNull public Boolean isExpandTabToSpaces(Document document)
      Returns the expand tab to spaces flag configured for the given Document, or null if it should not affect the editor behavior.
      Parameters:
      document - the Document for which the expand tab to spaces flag is requested
      Returns:
      the expand tab to spaces flag configured for the given Document, or null if it should not affect the editor behavior