public class PrettyPrintingUtils extends java.lang.Object
Constructor and Description |
---|
PrettyPrintingUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
determineAdditionalIndent(IToken token,
ELanguage language)
Determines any additional indentation that should be used.
|
static eu.cqse.check.framework.shallowparser.prettyprint.ECasing |
determineCasing(IToken token)
Returns the casing to use for a token.
|
static boolean |
determineNoIndent(IToken token)
Determines whether no indentation should be used.
|
static eu.cqse.check.framework.shallowparser.prettyprint.ESpacing |
getPostTokenSpacing(IToken token,
int abapChainedStatementDepth)
Returns the spacing to be used after the given token.
|
static eu.cqse.check.framework.shallowparser.prettyprint.ESpacing |
getStatementSpacing(ShallowEntity entity,
ELanguage language)
Returns the spacing to be used based on the given entity.
|
static boolean |
isDelimiter(IToken token) |
static boolean |
isMultiLine(IToken token)
Returns if the token is a multiline token.
|
static boolean |
isOutsideOfProcedureDivision(ShallowEntity entity)
Returns true if the given entity is outside of a procedure division otherwise
false.
|
static eu.cqse.check.framework.shallowparser.prettyprint.ESpacing |
maxSpacing(eu.cqse.check.framework.shallowparser.prettyprint.ESpacing spacing1,
eu.cqse.check.framework.shallowparser.prettyprint.ESpacing spacing2)
Returns the larger of two spacings.
|
static boolean |
methodEntityIsNotSectionOrParagraph(EShallowEntityType type,
java.lang.String subType)
Returns true if a method entity is not a section or paragraph otherwise false
|
static java.lang.String |
trimTokenTextLine(java.lang.String line,
ELanguage language)
Trims a line of token text if necessary.
|
public PrettyPrintingUtils()
public static boolean methodEntityIsNotSectionOrParagraph(EShallowEntityType type, java.lang.String subType)
public static boolean isMultiLine(IToken token)
public static eu.cqse.check.framework.shallowparser.prettyprint.ESpacing maxSpacing(eu.cqse.check.framework.shallowparser.prettyprint.ESpacing spacing1, eu.cqse.check.framework.shallowparser.prettyprint.ESpacing spacing2)
public static boolean isOutsideOfProcedureDivision(ShallowEntity entity)
public static eu.cqse.check.framework.shallowparser.prettyprint.ESpacing getStatementSpacing(ShallowEntity entity, ELanguage language)
public static java.lang.String trimTokenTextLine(java.lang.String line, ELanguage language)
public static java.lang.String determineAdditionalIndent(IToken token, ELanguage language)
public static boolean determineNoIndent(IToken token)
public static eu.cqse.check.framework.shallowparser.prettyprint.ECasing determineCasing(IToken token)
public static boolean isDelimiter(IToken token)
public static eu.cqse.check.framework.shallowparser.prettyprint.ESpacing getPostTokenSpacing(IToken token, int abapChainedStatementDepth)