Java 类com.intellij.psi.formatter.xml.SyntheticBlock 实例源码

项目:rythm_plugin    文件:RythmFormattingModelBuilder.java   
private BlockWithParent getRealBlockParent() {
    BlockWithParent parent = getParent();
    while (parent instanceof DataLanguageBlockWrapper && ((DataLanguageBlockWrapper) parent).getOriginal() instanceof SyntheticBlock) {
        parent = parent.getParent();
    }
    return parent;
}
项目:Intellij-Dust    文件:DustFormatterBlock.java   
private BlockWithParent getRealBlockParent() {
  // if we can follow the chain of synthetic parent blocks, and if we end up
  // at a real DataLanguage block (i.e. the synthetic blocks didn't lead to an DustFormatterBlock),
  // we're a child of a templated language node and need an indent
  BlockWithParent parent = getParent();
  while (parent instanceof DataLanguageBlockWrapper
      && ((DataLanguageBlockWrapper) parent).getOriginal() instanceof SyntheticBlock) {
    parent = parent.getParent();
  }


  return parent;
}
项目:bamboo-soy    文件:SoyBlock.java   
private static boolean isSynthetic(BlockWithParent block) {
  return block instanceof DataLanguageBlockWrapper && ((DataLanguageBlockWrapper) block)
      .getOriginal() instanceof SyntheticBlock;
}