Class IndentationConfiguration
java.lang.Object
net.ssehub.easy.basics.modelManagement.IndentationConfiguration
Stores optional indentation configuration.
- Author:
- Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIndentationConfiguration(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
Modifier and TypeMethodDescriptionintThe number of additional whitespaces to be considered after indentation (extra indentation, language dependent).intReturns the number of whitespaces used for one indentation step.intReturns the number of whitespaces used to emulate a tabulator character.booleanReturns whether indentation is enabled.booleanReturns whether tab emulation is enabled.
-
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:
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)
-