diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java
index 3b4e85f..f67dcf7 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java
@@ -159,34 +159,6 @@
 
 	/**
 	 *
-	 * @deprecated migrate to new StringBuilder API
-	 *
-	 * @param buffer the output StringBuilder
-	 * @param position offset where the prolog is placed
-	 * @param fgRGB Foreground-Color
-	 * @param bgRGB Background-Color
-	 * @param styleSheet Stylesheet
-	 */
-	@Deprecated
-	public static void insertPageProlog(StringBuffer buffer, int position, RGB fgRGB, RGB bgRGB, String styleSheet) {
-		if (fgRGB == null)
-			fgRGB= FG_COLOR_RGB;
-		if (bgRGB == null)
-			bgRGB= BG_COLOR_RGB;
-
-		StringBuffer pageProlog= new StringBuffer(300);
-
-		pageProlog.append("<html>"); //$NON-NLS-1$
-
-		appendStyleSheet(pageProlog, styleSheet, fgRGB, bgRGB);
-
-		appendColors(pageProlog, fgRGB, bgRGB);
-
-		buffer.insert(position, pageProlog.toString());
-	}
-
-	/**
-	 *
 	 * @param buffer the output StringBuilder
 	 * @param position offset where the prolog is placed
 	 * @param fgRGB Foreground-Color
@@ -229,24 +201,6 @@
 	/**
 	 *
 	 *
-	 * @param pageProlog The Pageprolog where the color has to be set
-	 * @param fgRGB Foreground-Color
-	 * @param bgRGB Background-Color
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	private static void appendColors(StringBuffer pageProlog, RGB fgRGB, RGB bgRGB) {
-		pageProlog.append("<body text=\""); //$NON-NLS-1$
-		appendColor(pageProlog, fgRGB);
-		pageProlog.append("\" bgcolor=\""); //$NON-NLS-1$
-		appendColor(pageProlog, bgRGB);
-		pageProlog.append("\">"); //$NON-NLS-1$
-	}
-
-	/**
-	 *
-	 *
 	 * @param buffer The Output buffer
 	 * @param rgb RGB-Value
 	 *
@@ -260,22 +214,6 @@
 
 	/**
 	 *
-	 *
-	 * @param buffer The Output buffer
-	 * @param rgb RGB-Value
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	private static void appendColor(StringBuffer buffer, RGB rgb) {
-		buffer.append('#');
-		appendAsHexString(buffer, rgb.red);
-		appendAsHexString(buffer, rgb.green);
-		appendAsHexString(buffer, rgb.blue);
-	}
-
-	/**
-	 *
 	 * @param buffer the output buffer
 	 * @param intValue the intValue will be converted to hex and appended
 	 *
@@ -290,21 +228,6 @@
 	/**
 	 *
 	 * @param buffer the output buffer
-	 * @param intValue the intValue will be converted to hex and appended
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	private static void appendAsHexString(StringBuffer buffer, int intValue) {
-		String hexValue= Integer.toHexString(intValue);
-		if (hexValue.length() == 1)
-			buffer.append('0');
-		buffer.append(hexValue);
-	}
-
-	/**
-	 *
-	 * @param buffer the output buffer
 	 * @param styles array with styles to be appended
 	 *
 	 */
@@ -340,42 +263,6 @@
 	/**
 	 *
 	 * @param buffer the output buffer
-	 * @param styles array with styles to be appended
-	 *
-	 * @deprecated As of 3.13, replaced by {@link #insertStyles(StringBuilder, String[])}
-	 */
-	@Deprecated
-	public static void insertStyles(StringBuffer buffer, String[] styles) {
-		if (styles == null || styles.length == 0)
-			return;
-
-		StringBuffer styleBuf= new StringBuffer(10 * styles.length);
-		for (String style : styles) {
-			styleBuf.append(" style=\""); //$NON-NLS-1$
-			styleBuf.append(style);
-			styleBuf.append('"');
-		}
-
-		// Find insertion index
-		// a) within existing body tag with trailing space
-		int index= buffer.indexOf("<body "); //$NON-NLS-1$
-		if (index != -1) {
-			buffer.insert(index+5, styleBuf);
-			return;
-		}
-
-		// b) within existing body tag without attributes
-		index= buffer.indexOf("<body>"); //$NON-NLS-1$
-		if (index != -1) {
-			buffer.insert(index+5, ' ');
-			buffer.insert(index+6, styleBuf);
-			return;
-		}
-	}
-
-	/**
-	 *
-	 * @param buffer the output buffer
 	 * @param styleSheet the stylesheet
 	 * @param fgRGB Foreground-Color
 	 * @param bgRGB Background-Color
@@ -401,33 +288,6 @@
 	/**
 	 *
 	 * @param buffer the output buffer
-	 * @param styleSheet the stylesheet
-	 * @param fgRGB Foreground-Color
-	 * @param bgRGB Background-Color
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	private static void appendStyleSheet(StringBuffer buffer, String styleSheet, RGB fgRGB, RGB bgRGB) {
-		if (styleSheet == null)
-			return;
-
-		// workaround for https://bugs.eclipse.org/318243
-		StringBuffer fg= new StringBuffer();
-		appendColor(fg, fgRGB);
-		styleSheet= styleSheet.replaceAll("InfoText", fg.toString()); //$NON-NLS-1$
-		StringBuilder bg= new StringBuilder();
-		appendColor(bg, bgRGB);
-		styleSheet= styleSheet.replaceAll("InfoBackground", bg.toString()); //$NON-NLS-1$
-
-		buffer.append("<head><style CHARSET=\"ISO-8859-1\" TYPE=\"text/css\">"); //$NON-NLS-1$
-		buffer.append(styleSheet);
-		buffer.append("</style></head>"); //$NON-NLS-1$
-	}
-
-	/**
-	 *
-	 * @param buffer the output buffer
 	 * @param styleSheetURL the URL to the Stylesheet
 	 *
 	 */
@@ -447,28 +307,6 @@
 	/**
 	 *
 	 * @param buffer the output buffer
-	 * @param styleSheetURL the URL to the Stylesheet
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	private static void appendStyleSheetURL(StringBuffer buffer, URL styleSheetURL) {
-		if (styleSheetURL == null)
-			return;
-
-		buffer.append("<head>"); //$NON-NLS-1$
-
-		buffer.append("<LINK REL=\"stylesheet\" HREF= \""); //$NON-NLS-1$
-		buffer.append(styleSheetURL);
-		buffer.append("\" CHARSET=\"ISO-8859-1\" TYPE=\"text/css\">"); //$NON-NLS-1$
-
-		buffer.append("</head>"); //$NON-NLS-1$
-	}
-
-
-	/**
-	 *
-	 * @param buffer the output buffer
 	 * @param position the offset
 	 *
 	 */
@@ -483,38 +321,6 @@
 	 *
 	 * @param buffer the output buffer
 	 * @param position the offset
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	public static void insertPageProlog(StringBuffer buffer, int position) {
-		StringBuffer pageProlog= new StringBuffer(60);
-		pageProlog.append("<html>"); //$NON-NLS-1$
-		appendColors(pageProlog, FG_COLOR_RGB, BG_COLOR_RGB);
-		buffer.insert(position,  pageProlog.toString());
-	}
-
-	/**
-	 *
-	 * @param buffer the output buffer
-	 * @param position the offset
-	 * @param styleSheetURL URL to the Stylesheet
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	public static void insertPageProlog(StringBuffer buffer, int position, URL styleSheetURL) {
-		StringBuffer pageProlog= new StringBuffer(300);
-		pageProlog.append("<html>"); //$NON-NLS-1$
-		appendStyleSheetURL(pageProlog, styleSheetURL);
-		appendColors(pageProlog, FG_COLOR_RGB, BG_COLOR_RGB);
-		buffer.insert(position,  pageProlog.toString());
-	}
-
-	/**
-	 *
-	 * @param buffer the output buffer
-	 * @param position the offset
 	 * @param styleSheetURL URL to the Stylesheet
 	 *
 	 */
@@ -540,36 +346,12 @@
 	/**
 	 *
 	 * @param buffer the output buffer
-	 * @param position the offset
-	 * @param styleSheet Stylesheet
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	public static void insertPageProlog(StringBuffer buffer, int position, String styleSheet) {
-		insertPageProlog(buffer, position, null, null, styleSheet);
-	}
-
-	/**
-	 *
-	 * @param buffer the output buffer
 	 *
 	 */
 	public static void addPageProlog(StringBuilder buffer) {
 		insertPageProlog(buffer, buffer.length());
 	}
 
-	/**
-	 *
-	 * @param buffer the output buffer
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	public static void addPageProlog(StringBuffer buffer) {
-		insertPageProlog(buffer, buffer.length());
-	}
-
 	public static void addPageEpilog(StringBuilder buffer) {
 		buffer.append("</body></html>"); //$NON-NLS-1$
 	}
@@ -578,34 +360,12 @@
 	 *
 	 * @param buffer the output buffer
 	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	public static void addPageEpilog(StringBuffer buffer) {
-		buffer.append("</body></html>"); //$NON-NLS-1$
-	}
-
-	/**
-	 *
-	 * @param buffer the output buffer
-	 *
 	 */
 	public static void startBulletList(StringBuilder buffer) {
 		buffer.append("<ul>"); //$NON-NLS-1$
 	}
 
 	/**
-	 *
-	 * @param buffer the output buffer
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	public static void startBulletList(StringBuffer buffer) {
-		buffer.append("<ul>"); //$NON-NLS-1$
-	}
-
-	/**
 	 * ends the bulletpointlist
 	 *
 	 * @param buffer the output buffer
@@ -616,18 +376,6 @@
 	}
 
 	/**
-	 * ends the bulletpointlist
-	 *
-	 * @param buffer the output buffer
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	public static void endBulletList(StringBuffer buffer) {
-		buffer.append("</ul>"); //$NON-NLS-1$
-	}
-
-	/**
 	 * Adds bulletpoint
 	 *
 	 * @param buffer the output buffer
@@ -643,23 +391,6 @@
 	}
 
 	/**
-	 * Adds bulletpoint
-	 *
-	 * @param buffer the output buffer
-	 * @param bullet the bulletpoint
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	public static void addBullet(StringBuffer buffer, String bullet) {
-		if (bullet != null) {
-			buffer.append("<li>"); //$NON-NLS-1$
-			buffer.append(bullet);
-			buffer.append("</li>"); //$NON-NLS-1$
-		}
-	}
-
-	/**
 	 *
 	 * Adds h5 headline
 	 *
@@ -677,24 +408,6 @@
 
 	/**
 	 *
-	 * Adds h5 headline
-	 *
-	 * @param buffer the output buffer
-	 * @param header of h5 headline
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	public static void addSmallHeader(StringBuffer buffer, String header) {
-		if (header != null) {
-			buffer.append("<h5>"); //$NON-NLS-1$
-			buffer.append(header);
-			buffer.append("</h5>"); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 *
 	 * @param buffer the output buffer
 	 * @param paragraph the content of the paragraph
 	 *
@@ -707,21 +420,6 @@
 	}
 
 	/**
-	 *
-	 * @param buffer the output buffer
-	 * @param paragraph the content of the paragraph
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	public static void addParagraph(StringBuffer buffer, String paragraph) {
-		if (paragraph != null) {
-			buffer.append("<p>"); //$NON-NLS-1$
-			buffer.append(paragraph);
-		}
-	}
-
-	/**
 	 * Appends a string and keeps its whitespace and newlines.
 	 * <p>
 	 * <b>Warning:</b> This starts a new paragraph when rendered in a browser, but
@@ -744,31 +442,6 @@
 	}
 
 	/**
-	 * Appends a string and keeps its whitespace and newlines.
-	 * <p>
-	 * <b>Warning:</b> This starts a new paragraph when rendered in a browser, but
-	 * it doesn't starts a new paragraph when rendered with a {@link HTML2TextReader}
-	 * (e.g. in a {@link DefaultInformationControl} that renders simple HTML).
-	 *
-	 * @param buffer the output buffer
-	 * @param preFormatted the string that should be rendered with whitespace preserved
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 *
-	 * @see #convertToHTMLContent(String)
-	 * @see #convertToHTMLContentWithWhitespace(String)
-	 * @since 3.7
-	 */
-	@Deprecated
-	public static void addPreFormatted(StringBuffer buffer, String preFormatted) {
-		if (preFormatted != null) {
-			buffer.append("<pre>"); //$NON-NLS-1$
-			buffer.append(preFormatted);
-			buffer.append("</pre>"); //$NON-NLS-1$
-		}
-	}
-
-	/**
 	 *
 	 * @param buffer the output buffer
 	 * @param paragraphReader The content of the Read will be added to output buffer
@@ -780,19 +453,6 @@
 	}
 
 	/**
-	 *
-	 * @param buffer the output buffer
-	 * @param paragraphReader The content of the Read will be added to output buffer
-	 *
-	 * @deprecated migrate to new StringBuilder API
-	 */
-	@Deprecated
-	public static void addParagraph(StringBuffer buffer, Reader paragraphReader) {
-		if (paragraphReader != null)
-			addParagraph(buffer, read(paragraphReader));
-	}
-
-	/**
 	 * Replaces the following style attributes of the font definition of the <code>html</code>
 	 * element:
 	 * <ul>
