Class IndentationConfiguration

java.lang.Object
net.ssehub.easy.basics.modelManagement.IndentationConfiguration

public class IndentationConfiguration extends Object
Stores optional indentation configuration.
Author:
Holger Eichelberger
  • Field Details

    • step

      private int step
    • tabEmu

      private int tabEmu
    • additional

      private int additional
  • Constructor Details

    • IndentationConfiguration

      public IndentationConfiguration(int step)
      Creates an indentation configuration object without tab emulation.
      Parameters:
      step - the number of whitespaces per indentation step (positive integer, 0 or negative if indentation shall be disabled)
    • IndentationConfiguration

      public IndentationConfiguration(int step, int tabEmu)
      Creates an indentation configuration object.
      Parameters:
      step - the number of whitespaces per indentation step (positive integer, 0 or negative if indentation shall be disabled)
      tabEmu - the number of whitespaces per tab (0 or negative if disabled)
    • IndentationConfiguration

      public IndentationConfiguration(int step, int tabEmu, int additional)
      Creates an indentation configuration object.
      Parameters:
      step - the number of whitespaces per indentation step (positive integer, 0 or negative if indentation shall be disabled)
      tabEmu - the number of whitespaces per tab (0 or negative if disabled)
      additional - additional whitespaces to be removed after indentation for extra formatting (language-dependent interpretation, non-negative integer)
  • Method Details

    • getIndentationStep

      public int getIndentationStep()
      Returns the number of whitespaces used for one indentation step.
      Returns:
      the number of whitespaces (positive integer, 0 or negative if indentation shall be disabled)
    • isIndentationEnabled

      public boolean isIndentationEnabled()
      Returns whether indentation is enabled.
      Returns:
      true if indentation is enabled, false else
    • getTabEmulation

      public int getTabEmulation()
      Returns the number of whitespaces used to emulate a tabulator character.
      Returns:
      the number of whitespaces (0 or negative if disabled)
    • isTabEmulationEnabled

      public boolean isTabEmulationEnabled()
      Returns whether tab emulation is enabled.
      Returns:
      true if tab emulation is enabled, false else
    • getAdditional

      public int getAdditional()
      The number of additional whitespaces to be considered after indentation (extra indentation, language dependent).
      Returns:
      the number of additional whitespaces (non-negative integer)