Refactoring: rename class
This commit is contained in:
@@ -37,7 +37,7 @@ import java.util.List;
|
||||
|
||||
import static org.jetbrains.jet.JetNodeTypes.*;
|
||||
import static org.jetbrains.jet.lexer.JetTokens.*;
|
||||
import static org.jetbrains.jet.plugin.formatter.ASTIndentStrategy.strategy;
|
||||
import static org.jetbrains.jet.plugin.formatter.NodeIndentStrategy.strategy;
|
||||
|
||||
/**
|
||||
* @see Block for good JavaDoc documentation
|
||||
@@ -279,7 +279,7 @@ public class JetBlock extends AbstractBlock {
|
||||
}
|
||||
}
|
||||
|
||||
private static final ASTIndentStrategy[] INDENT_RULES = new ASTIndentStrategy[] {
|
||||
private static final NodeIndentStrategy[] INDENT_RULES = new NodeIndentStrategy[] {
|
||||
strategy("No indent for braces in blocks")
|
||||
.in(BLOCK, CLASS_BODY, FUNCTION_LITERAL)
|
||||
.forType(RBRACE, LBRACE)
|
||||
@@ -357,7 +357,7 @@ public class JetBlock extends AbstractBlock {
|
||||
}
|
||||
}
|
||||
|
||||
for (ASTIndentStrategy strategy : INDENT_RULES) {
|
||||
for (NodeIndentStrategy strategy : INDENT_RULES) {
|
||||
Indent indent = strategy.getIndent(child);
|
||||
if (indent != null) {
|
||||
return indent;
|
||||
|
||||
+4
-4
@@ -27,8 +27,8 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public abstract class ASTIndentStrategy {
|
||||
public static ASTIndentStrategy constIndent(Indent indent) {
|
||||
public abstract class NodeIndentStrategy {
|
||||
public static NodeIndentStrategy constIndent(Indent indent) {
|
||||
return new ConstIndentStrategy(indent);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public abstract class ASTIndentStrategy {
|
||||
@Nullable
|
||||
public abstract Indent getIndent(@NotNull ASTNode node);
|
||||
|
||||
public static class ConstIndentStrategy extends ASTIndentStrategy {
|
||||
public static class ConstIndentStrategy extends NodeIndentStrategy {
|
||||
private final Indent indent;
|
||||
|
||||
public ConstIndentStrategy(Indent indent) {
|
||||
@@ -53,7 +53,7 @@ public abstract class ASTIndentStrategy {
|
||||
}
|
||||
}
|
||||
|
||||
public static class PositionStrategy extends ASTIndentStrategy {
|
||||
public static class PositionStrategy extends NodeIndentStrategy {
|
||||
private Indent defaultIndent = Indent.getNoneIndent();
|
||||
|
||||
private final List<IElementType> in = new ArrayList<IElementType>();
|
||||
Reference in New Issue
Block a user