Class IndentationConfiguration
- java.lang.Object
-
- net.ssehub.easy.basics.modelManagement.IndentationConfiguration
-
public class IndentationConfiguration extends java.lang.ObjectStores optional indentation configuration.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private intadditionalprivate intstepprivate inttabEmu
-
Constructor Summary
Constructors Constructor Description IndentationConfiguration(int step)Creates an indentation configuration object without tab emulation.IndentationConfiguration(int step, int tabEmu)Creates an indentation configuration object.IndentationConfiguration(int step, int tabEmu, int additional)Creates an indentation configuration object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAdditional()The number of additional whitespaces to be considered after indentation (extra indentation, language dependent).intgetIndentationStep()Returns the number of whitespaces used for one indentation step.intgetTabEmulation()Returns the number of whitespaces used to emulate a tabulator character.booleanisIndentationEnabled()Returns whether indentation is enabled.booleanisTabEmulationEnabled()Returns whether tab emulation is enabled.
-
-
-
Constructor Detail
-
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 Detail
-
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:
trueif indentation is enabled,falseelse
-
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:
trueif tab emulation is enabled,falseelse
-
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)
-
-