CustomFoldingBuilder (FoldingBuilder builder, FoldingDescriptor descriptor) { if (builder instanceof CustomFoldingBuilder) return (CustomFoldingBuilder)builder; FoldingBuilder originalBuilder = CompositeFoldingBuilder.getOriginalBuilder(descriptor); if (originalBuilder instanceof CustomFoldingBuilder) return (CustomFoldingBuilder)originalBuilder; return null; }