/** * Determines the partitioning of the given region of the document. * Informs the formatting strategies of each partition about the start, * the process, and the termination of the formatting session. * * @param region the document region to be formatted * @since 3.0 */ private void formatPartitions(IRegion region) { addPartitioningUpdater(); try { TypedPosition[] ranges= getPartitioning(region); if (ranges != null) { start(ranges, getIndentation(region.getOffset())); format(ranges); stop(ranges); } } catch (BadLocationException x) { } removePartitioningUpdater(); }
/** * Determines the partitioning of the given region of the document. * Informs the formatting strategies of each partition about the start, * the process, and the termination of the formatting session. * * @param region the document region to be formatted * @since 3.0 */ private void formatPartitions(IRegion region) { addPartitioningUpdater(); try { TypedPosition[] ranges= getPartitioning(region); if (ranges != null) { start(ranges, getIndentation(region.getOffset())); format(ranges); stop(ranges); } } catch (BadLocationException x) { } removePartitioningUpdater(); }