boolean (FoldingBuilder foldingBuilder) { if (!wrapStartEndMarkerTextInLanguageSpecificComment()) { // this method need to be overridden, if `wrapStartEndMarkerTextInLanguageSpecificComment` returns `false`. // The overridden methods returns `true` only for a language-specific child of `CustomFoldingBuilder` class with // overridden `CustomFoldingBuilder#isCustomFoldingCandidate(ASTNode)`. LOG.error("non-comment based custom folding node need to be filtered in overridden `CustomFoldingBuilder#isCustomFoldingCandidate(ASTNode)`"); } return foldingBuilder instanceof CustomFoldingBuilder; }