}
@Override
protected FoldedPosition newFoldedPosition(IRegion region,
ITextRegion significantRegion) {
FoldedPosition result=null;
if(region!=null && lastOffset!=region.getOffset()){
if(type!=null && significantRegion!=null){
//additional -1 introduced as it seemed to help for folding 2-line regions that where otherwise not folded
result= new TypedFoldedRegion(region.getOffset(), region.getLength(), significantRegion.getOffset() - region.getOffset()-1, significantRegion.getLength(),type);
}else{