/** * Fires <code>formatterStops</code> to all formatter strategies which were * involved in the formatting process which is about to terminate. * * @param regions the partitioning of the document which has been formatted */ private void stop(TypedPosition[] regions) { for (TypedPosition region : regions) { IFormattingStrategy s= getFormattingStrategy(region.getType()); if (s != null) s.formatterStops(); } }
/** * Fires <code>formatterStops</code> to all formatter strategies which were * involved in the formatting process which is about to terminate. * * @param regions the partitioning of the document which has been formatted */ private void stop(TypedPosition[] regions) { for (int i= 0; i < regions.length; i++) { IFormattingStrategy s= getFormattingStrategy(regions[i].getType()); if (s != null) s.formatterStops(); } }
/** * Formats the given region with the strategy registered for the default * content type. The strategy is informed about the start, the process, and * the termination of the formatting session. * * @param region the region to be formatted * @since 3.0 */ private void formatRegion(IRegion region) { IFormattingStrategy strategy= getFormattingStrategy(IDocument.DEFAULT_CONTENT_TYPE); if (strategy != null) { strategy.formatterStarts(getIndentation(region.getOffset())); format(strategy, new TypedPosition(region.getOffset(), region.getLength(), IDocument.DEFAULT_CONTENT_TYPE)); strategy.formatterStops(); } }
/** * Formats the given region with the strategy registered for the default * content type. The strategy is informed about the start, the process, and * the termination of the formatting session. * * @param region the region to be formatted * @since 3.0 */ private void formatRegion(IRegion region) { IFormattingStrategy strategy= getFormattingStrategy(IDocument.DEFAULT_CONTENT_TYPE); if (strategy != null) { strategy.formatterStarts(getIndentation(region.getOffset())); format(strategy, new TypedPosition(region.getOffset(), region.getLength(), IDocument.DEFAULT_CONTENT_TYPE)); strategy.formatterStops(); } }