Skip to content

Commit 43161a6

Browse files
Rob Strykermickaelistria
Rob Stryker
authored andcommitted
Renamed to HTMLBuilder, set RGB fields to final
Signed-off-by: Rob Stryker <[email protected]>
1 parent 1859f52 commit 43161a6

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

bundles/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.eclipse.swt.graphics.RGB;
2424
import org.eclipse.swt.widgets.Display;
2525

26-
import org.eclipse.text.html.BaseHTMLPrinter;
26+
import org.eclipse.text.html.HTMLBuilder;
2727

2828
import org.eclipse.jface.resource.JFaceColors;
2929
import org.eclipse.jface.resource.JFaceResources;
@@ -36,7 +36,7 @@
3636
* Moved into this package from <code>org.eclipse.jface.internal.text.revisions</code>.</p>
3737
*/
3838
public class HTMLPrinter {
39-
private static final BaseHTMLPrinter CORE= new BaseHTMLPrinter();
39+
private static final HTMLBuilder CORE= new HTMLBuilder();
4040

4141
static {
4242
final Display display= Display.getDefault();
@@ -87,7 +87,7 @@ private static void cacheColors(Display display) {
8787
* @see #addPreFormatted(StringBuilder, String) for rendering with an {@link HTML2TextReader}
8888
*/
8989
public static String convertToHTMLContent(String content) {
90-
return BaseHTMLPrinter.convertToHTMLContent(content);
90+
return HTMLBuilder.convertToHTMLContent(content);
9191
}
9292

9393
/**
@@ -106,11 +106,11 @@ public static String convertToHTMLContent(String content) {
106106
* @since 3.7
107107
*/
108108
public static String convertToHTMLContentWithWhitespace(String content) {
109-
return BaseHTMLPrinter.convertToHTMLContentWithWhitespace(content);
109+
return HTMLBuilder.convertToHTMLContentWithWhitespace(content);
110110
}
111111

112112
public static String read(Reader rd) {
113-
return BaseHTMLPrinter.read(rd);
113+
return HTMLBuilder.read(rd);
114114
}
115115

116116
/**
@@ -477,6 +477,6 @@ private static void runOp(StringBuffer buffer, BuilderBuffer bf) {
477477
public static String convertTopLevelFont(String styles, FontData fontData) {
478478
boolean bold= (fontData.getStyle() & SWT.BOLD) != 0;
479479
boolean italic= (fontData.getStyle() & SWT.ITALIC) != 0;
480-
return BaseHTMLPrinter.convertTopLevelFont(styles, bold, italic, fontData.getHeight(), fontData.getName());
480+
return HTMLBuilder.convertTopLevelFont(styles, bold, italic, fontData.getHeight(), fontData.getName());
481481
}
482482
}

bundles/org.eclipse.text/src/org/eclipse/text/html/BaseHTMLPrinter.java renamed to bundles/org.eclipse.text/src/org/eclipse/text/html/HTMLBuilder.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @since 3.14
2828
*/
29-
public class BaseHTMLPrinter {
29+
public class HTMLBuilder {
3030

3131
private static volatile RGB DEFAULT_BG_COLOR_RGB= new RGB(255, 255, 225); // CoreRGB value of info bg color on WindowsXP
3232
private static volatile RGB DEFAULT_FG_COLOR_RGB= new RGB(0, 0, 0); // CoreRGB value of info fg color on WindowsXP
@@ -44,11 +44,11 @@ public class BaseHTMLPrinter {
4444
private RGB linkColor;
4545
private RGB alinkColor;
4646

47-
public BaseHTMLPrinter() {
47+
public HTMLBuilder() {
4848
this(DEFAULT_BG_COLOR_RGB, DEFAULT_FG_COLOR_RGB, DEFAULT_LINK_COLOR_RGB, DEFAULT_ACTIVE_LINK_COLOR_RGB);
4949
}
5050

51-
public BaseHTMLPrinter(RGB bg, RGB fg, RGB link, RGB alink) {
51+
public HTMLBuilder(RGB bg, RGB fg, RGB link, RGB alink) {
5252
setColors(bg, fg, link, alink);
5353
}
5454

bundles/org.eclipse.text/src/org/eclipse/text/html/RGB.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ public final class RGB implements Serializable {
4141
/**
4242
* the red component of the RGB
4343
*/
44-
public int red;
44+
public final int red;
4545

4646
/**
4747
* the green component of the RGB
4848
*/
49-
public int green;
49+
public final int green;
5050

5151
/**
5252
* the blue component of the RGB
5353
*/
54-
public int blue;
54+
public final int blue;
5555

5656
static final long serialVersionUID = 3258415023461249074L;
5757

0 commit comments

Comments
 (0)