Advertisement
Guest User

IndentationHelper

a guest
Jun 1st, 2016
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. package com.gameforge.idea.Corona.lang.formatter;
  2.  
  3. import com.gameforge.idea.Corona.lang.parser.CoronaElementTypes;
  4. import com.intellij.formatting.Indent;
  5. import com.intellij.lang.ASTNode;
  6. import com.intellij.psi.impl.source.tree.FileElement;
  7.  
  8. public class CoronaIndent implements CoronaElementTypes {
  9.     public static Indent getIndent(CoronaFormatBlock parent, ASTNode child) {
  10.         if (child.getElementType() == BLOCK && !(parent.getNode().getPsi() instanceof FileElement)) {
  11.             return Indent.getNormalIndent();
  12.         }
  13.  
  14.         return Indent.getNoneIndent();
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement