mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
added abstract getType method to Indent class
This commit is contained in:
@@ -83,6 +83,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
public abstract class Indent {
|
||||
private static IndentFactory myFactory;
|
||||
|
||||
public abstract Type getType();
|
||||
|
||||
static void setFactory(IndentFactory factory) {
|
||||
myFactory = factory;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package com.intellij.formatting;
|
||||
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
public class IndentImpl extends Indent {
|
||||
class IndentImpl extends Indent {
|
||||
private final boolean myIsAbsolute;
|
||||
private final boolean myRelativeToDirectParent;
|
||||
|
||||
@@ -38,6 +38,7 @@ public class IndentImpl extends Indent {
|
||||
myEnforceIndentToChildren = enforceIndentToChildren;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type getType() {
|
||||
return myType;
|
||||
}
|
||||
|
||||
+2
-1
@@ -59,7 +59,8 @@ public class FormatterBasedLineIndentInfoBuilder {
|
||||
List<Block> normallyIndentedBlocks = ContainerUtil.filter(getBlocksStartingNewLine(), new Condition<Block>() {
|
||||
@Override
|
||||
public boolean value(Block block) {
|
||||
Indent.Type type = block.getIndent() instanceof IndentImpl ? ((IndentImpl)block.getIndent()).getType() : null;
|
||||
Indent indent = block.getIndent();
|
||||
Indent.Type type = indent != null ? indent.getType() : null;
|
||||
return type == Indent.Type.NONE || type == Indent.Type.NORMAL;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user