void () { configure(""" class C { /** doc */ int a;<caret> } """, false); verifyFoldingState(); verifyItem(12, 22, null); toggleItem(); verifyFoldingState(10, 22); verifyItem(12, 22, "doc"); toggleItem(); verifyFoldingState(); verifyItem(12, 22, null); runWriteCommand(() -> getEditor().getDocument().setText(getEditor().getDocument().getText().replace("doc", "another"))); toggleItem(); verifyFoldingState(10, 26); verifyItem(12, 26, "another"); }