TextUtilities.addDocumentPartitioners(document, partitioners);
	public void format() {		super.format();		Assert.isLegal(fPartitions.size() > 0);		final IDocument document= getViewer().getDocument();		final TypedPosition position= (TypedPosition)fPartitions.removeFirst();		try {			final ITypedRegion partition= TextUtilities.getPartition(document, fFormatter.getDocumentPartitioning(), position.getOffset());			final String type= partition.getType();			position.offset= partition.getOffset();			position.length= partition.getLength();			final Map preferences= getPreferences();			final boolean format= preferences.get(PreferenceConstants.FORMATTER_COMMENT_FORMAT) == IPreferenceStore.TRUE;			final boolean header= preferences.get(PreferenceConstants.FORMATTER_COMMENT_FORMATHEADER) == IPreferenceStore.TRUE;			if (format && (header || position.getOffset() != 0 || !type.equals(IJavaPartitions.JAVA_DOC))) {				final CommentRegion region= CommentObjectFactory.createRegion(this, position, TextUtilities.getDefaultLineDelimiter(document));				final String indentation= getLineIndentation(document, region, position.getOffset());				final Map partitioners= TextUtilities.removeDocumentPartitioners(document);				region.format(indentation);				TextUtilities.addDocumentPartitioners(document, partitioners);			}		} catch (BadLocationException exception) {			// Should not happen		}	}