mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inline.tabs.enabled property for formatter backwards compatibility (keeps tabs inside line, not only at start)
This commit is contained in:
@@ -61,6 +61,8 @@ class InitialInfoBuilder {
|
||||
private LeafBlockWrapper myLastTokenBlock;
|
||||
private SpacingImpl myCurrentSpaceProperty;
|
||||
private ReadOnlyBlockInformationProvider myReadOnlyBlockInformationProvider;
|
||||
|
||||
private final static boolean INLINE_TABS_ENABLED = "true".equalsIgnoreCase(System.getProperty("inline.tabs.enabled"));
|
||||
|
||||
private InitialInfoBuilder(final FormattingDocumentModel model,
|
||||
final FormatTextRanges affectedRanges,
|
||||
@@ -270,7 +272,9 @@ class InitialInfoBuilder {
|
||||
final int index,
|
||||
Block parentBlock)
|
||||
{
|
||||
myCurrentWhiteSpace.setForceSkipTabulationsUsage(!myCurrentWhiteSpace.containsLineFeeds());
|
||||
if (!INLINE_TABS_ENABLED && !myCurrentWhiteSpace.containsLineFeeds()) {
|
||||
myCurrentWhiteSpace.setForceSkipTabulationsUsage(true);
|
||||
}
|
||||
final LeafBlockWrapper info =
|
||||
new LeafBlockWrapper(rootBlock, parent, myCurrentWhiteSpace, myModel, myOptions, myPreviousBlock, readOnly);
|
||||
info.setDebugInfo("target block's class: " + rootBlock.getClass());
|
||||
|
||||
Reference in New Issue
Block a user