summaryrefslogtreecommitdiff
path: root/java/openjdk6/files/icedtea/openjdk/6851834-handle_renames.patch
blob: 0b9d615e7b919d5ac0674baee670726a7bf9374e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
This handles the rename bits of the original 6851834
diff -ruN openjdk.orig/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java openjdk/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java
--- langtools/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java	1969-12-31 19:00:00.000000000 -0500
+++ langtools/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java	2013-06-25 14:55:45.802321034 -0400
@@ -0,0 +1,298 @@
+/*
+ * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.doclets.formats.html;
+
+import java.io.*;
+import javax.tools.FileObject;
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
+import com.sun.tools.doclets.formats.html.markup.*;
+
+/**
+ * Converts Java Source Code to HTML.
+ *
+ * This code is not part of an API.
+ * It is implementation that is subject to change.
+ * Do not use it as an API
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ * @since 1.4
+ */
+public class SourceToHTMLConverter {
+
+    /**
+     * The number of trailing blank lines at the end of the page.
+     * This is inserted so that anchors at the bottom of small pages
+     * can be reached.
+     */
+    private static final int NUM_BLANK_LINES = 60;
+
+    /**
+     * New line to be added to the documentation.
+     */
+    private static final Content NEW_LINE = new RawHtml(DocletConstants.NL);
+
+    /**
+     * Relative path from the documentation root to the file that is being
+     * generated.
+     */
+    private static String relativePath = "";
+
+    /**
+     * Source is converted to HTML using static methods below.
+     */
+    private SourceToHTMLConverter() {}
+
+    /**
+     * Convert the Classes in the given RootDoc to an HTML.
+     *
+     * @param configuration the configuration.
+     * @param rd the RootDoc to convert.
+     * @param outputdir the name of the directory to output to.
+     */
+    public static void convertRoot(ConfigurationImpl configuration, RootDoc rd,
+            String outputdir) {
+        if (rd == null || outputdir == null) {
+            return;
+        }
+        PackageDoc[] pds = rd.specifiedPackages();
+        for (int i = 0; i < pds.length; i++) {
+            convertPackage(configuration, pds[i], outputdir);
+        }
+        ClassDoc[] cds = rd.specifiedClasses();
+        for (int i = 0; i < cds.length; i++) {
+            convertClass(configuration, cds[i],
+                    getPackageOutputDir(outputdir, cds[i].containingPackage()));
+        }
+    }
+
+    /**
+     * Convert the Classes in the given Package to an HTML.
+     *
+     * @param configuration the configuration.
+     * @param pd the Package to convert.
+     * @param outputdir the name of the directory to output to.
+     */
+    public static void convertPackage(ConfigurationImpl configuration, PackageDoc pd,
+            String outputdir) {
+        if (pd == null || outputdir == null) {
+            return;
+        }
+        String classOutputdir = getPackageOutputDir(outputdir, pd);
+        ClassDoc[] cds = pd.allClasses();
+        for (int i = 0; i < cds.length; i++) {
+            convertClass(configuration, cds[i], classOutputdir);
+        }
+    }
+
+    /**
+     * Return the directory write output to for the given package.
+     *
+     * @param outputDir the directory to output to.
+     * @param pd the Package to generate output for.
+     * @return the package output directory as a String.
+     */
+    private static String getPackageOutputDir(String outputDir, PackageDoc pd) {
+        return outputDir + File.separator +
+            DirectoryManager.getDirectoryPath(pd) + File.separator;
+    }
+
+    /**
+     * Convert the given Class to an HTML.
+     *
+     * @param configuration the configuration.
+     * @param cd the class to convert.
+     * @param outputdir the name of the directory to output to.
+     */
+    public static void convertClass(ConfigurationImpl configuration, ClassDoc cd,
+            String outputdir) {
+        if (cd == null || outputdir == null) {
+            return;
+        }
+        try {
+            SourcePosition sp = cd.position();
+            if (sp == null)
+                return;
+            Reader r;
+            // temp hack until we can update SourcePosition API.
+            if (sp instanceof com.sun.tools.javadoc.SourcePositionImpl) {
+                FileObject fo = ((com.sun.tools.javadoc.SourcePositionImpl) sp).fileObject();
+                if (fo == null)
+                    return;
+                r = fo.openReader(true);
+            } else {
+                File file = sp.file();
+                if (file == null)
+                    return;
+                r = new FileReader(file);
+            }
+            LineNumberReader reader = new LineNumberReader(r);
+            int lineno = 1;
+            String line;
+            relativePath = DirectoryManager.getRelativePath(DocletConstants.SOURCE_OUTPUT_DIR_NAME) +
+                    DirectoryManager.getRelativePath(cd.containingPackage());
+            Content body = getHeader();
+            Content pre = new HtmlTree(HtmlTag.PRE);
+            try {
+                while ((line = reader.readLine()) != null) {
+                    addLineNo(pre, lineno);
+                    addLine(pre, line, configuration.sourcetab, lineno);
+                    lineno++;
+                }
+            } finally {
+                reader.close();
+            }
+            addBlankLines(pre);
+            Content div = HtmlTree.DIV(HtmlStyle.sourceContainer, pre);
+            body.addContent(div);
+            writeToFile(body, outputdir, cd.name(), configuration);
+        } catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * Write the output to the file.
+     *
+     * @param body the documentation content to be written to the file.
+     * @param outputDir the directory to output to.
+     * @param className the name of the class that I am converting to HTML.
+     * @param configuration the Doclet configuration to pass notices to.
+     */
+    private static void writeToFile(Content body, String outputDir,
+            String className, ConfigurationImpl configuration) throws IOException {
+        Content htmlDocType = DocType.Transitional();
+        Content head = new HtmlTree(HtmlTag.HEAD);
+        head.addContent(HtmlTree.TITLE(new StringContent(
+                configuration.getText("doclet.Window_Source_title"))));
+        head.addContent(getStyleSheetProperties(configuration));
+        Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(),
+                head, body);
+        Content htmlDocument = new HtmlDocument(htmlDocType, htmlTree);
+        File dir = new File(outputDir);
+        dir.mkdirs();
+        File newFile = new File(dir, className + ".html");
+        configuration.message.notice("doclet.Generating_0", newFile.getPath());
+        FileOutputStream fout = new FileOutputStream(newFile);
+        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fout));
+        bw.write(htmlDocument.toString());
+        bw.close();
+        fout.close();
+    }
+
+    /**
+     * Returns a link to the stylesheet file.
+     *
+     * @param configuration the doclet configuration for the current run of javadoc
+     * @return an HtmlTree for the lINK tag which provides the stylesheet location
+     */
+    public static HtmlTree getStyleSheetProperties(ConfigurationImpl configuration) {
+        String filename = configuration.stylesheetfile;
+        if (filename.length() > 0) {
+            File stylefile = new File(filename);
+            String parent = stylefile.getParent();
+            filename = (parent == null)?
+                filename:
+                filename.substring(parent.length() + 1);
+        } else {
+            filename = "stylesheet.css";
+        }
+        filename = relativePath + filename;
+        HtmlTree link = HtmlTree.LINK("stylesheet", "text/css", filename, "Style");
+        return link;
+    }
+
+    /**
+     * Get the header.
+     *
+     * @return the header content for the HTML file
+     */
+    private static Content getHeader() {
+        return new HtmlTree(HtmlTag.BODY);
+    }
+
+    /**
+     * Add the line numbers for the source code.
+     *
+     * @param pre the content tree to which the line number will be added
+     * @param lineno The line number
+     */
+    private static void addLineNo(Content pre, int lineno) {
+        HtmlTree span = new HtmlTree(HtmlTag.SPAN);
+        span.addStyle(HtmlStyle.sourceLineNo);
+        if (lineno < 10) {
+            span.addContent("00" + Integer.toString(lineno));
+        } else if (lineno < 100) {
+            span.addContent("0" + Integer.toString(lineno));
+        } else {
+            span.addContent(Integer.toString(lineno));
+        }
+        pre.addContent(span);
+    }
+
+    /**
+     * Add a line from source to the HTML file that is generated.
+     *
+     * @param pre the content tree to which the line will be added.
+     * @param line the string to format.
+     * @param tabLength the number of spaces for each tab.
+     * @param currentLineNo the current number.
+     */
+    private static void addLine(Content pre, String line, int tabLength,
+            int currentLineNo) {
+        if (line != null) {
+            StringBuffer lineBuffer = new StringBuffer(Util.escapeHtmlChars(line));
+            Util.replaceTabs(tabLength, lineBuffer);
+            pre.addContent(new RawHtml(lineBuffer.toString()));
+            Content anchor = HtmlTree.A_NAME("line." + Integer.toString(currentLineNo));
+            pre.addContent(anchor);
+            pre.addContent(NEW_LINE);
+        }
+    }
+
+    /**
+     * Add trailing blank lines at the end of the page.
+     *
+     * @param pre the content tree to which the blank lines will be added.
+     */
+    private static void addBlankLines(Content pre) {
+        for (int i = 0; i < NUM_BLANK_LINES; i++) {
+            pre.addContent(NEW_LINE);
+        }
+    }
+
+    /**
+     * Given a <code>Doc</code>, return an anchor name for it.
+     *
+     * @param d the <code>Doc</code> to check.
+     * @return the name of the anchor.
+     */
+    public static String getAnchorName(Doc d) {
+        return "line." + d.position().line();
+    }
+}
diff -ruN openjdk.orig/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourceToHTMLConverter.java openjdk/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourceToHTMLConverter.java
--- langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourceToHTMLConverter.java	2013-06-25 14:55:45.802321034 -0400
+++ langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourceToHTMLConverter.java	1969-12-31 19:00:00.000000000 -0500
@@ -1,298 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-import javax.tools.FileObject;
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-
-/**
- * Converts Java Source Code to HTML.
- *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
- *
- * @author Jamie Ho
- * @author Bhavesh Patel (Modified)
- * @since 1.4
- */
-public class SourceToHTMLConverter {
-
-    /**
-     * The number of trailing blank lines at the end of the page.
-     * This is inserted so that anchors at the bottom of small pages
-     * can be reached.
-     */
-    private static final int NUM_BLANK_LINES = 60;
-
-    /**
-     * New line to be added to the documentation.
-     */
-    private static final Content NEW_LINE = new RawHtml(DocletConstants.NL);
-
-    /**
-     * Relative path from the documentation root to the file that is being
-     * generated.
-     */
-    private static String relativePath = "";
-
-    /**
-     * Source is converted to HTML using static methods below.
-     */
-    private SourceToHTMLConverter() {}
-
-    /**
-     * Convert the Classes in the given RootDoc to an HTML.
-     *
-     * @param configuration the configuration.
-     * @param rd the RootDoc to convert.
-     * @param outputdir the name of the directory to output to.
-     */
-    public static void convertRoot(ConfigurationImpl configuration, RootDoc rd,
-            String outputdir) {
-        if (rd == null || outputdir == null) {
-            return;
-        }
-        PackageDoc[] pds = rd.specifiedPackages();
-        for (int i = 0; i < pds.length; i++) {
-            convertPackage(configuration, pds[i], outputdir);
-        }
-        ClassDoc[] cds = rd.specifiedClasses();
-        for (int i = 0; i < cds.length; i++) {
-            convertClass(configuration, cds[i],
-                    getPackageOutputDir(outputdir, cds[i].containingPackage()));
-        }
-    }
-
-    /**
-     * Convert the Classes in the given Package to an HTML.
-     *
-     * @param configuration the configuration.
-     * @param pd the Package to convert.
-     * @param outputdir the name of the directory to output to.
-     */
-    public static void convertPackage(ConfigurationImpl configuration, PackageDoc pd,
-            String outputdir) {
-        if (pd == null || outputdir == null) {
-            return;
-        }
-        String classOutputdir = getPackageOutputDir(outputdir, pd);
-        ClassDoc[] cds = pd.allClasses();
-        for (int i = 0; i < cds.length; i++) {
-            convertClass(configuration, cds[i], classOutputdir);
-        }
-    }
-
-    /**
-     * Return the directory write output to for the given package.
-     *
-     * @param outputDir the directory to output to.
-     * @param pd the Package to generate output for.
-     * @return the package output directory as a String.
-     */
-    private static String getPackageOutputDir(String outputDir, PackageDoc pd) {
-        return outputDir + File.separator +
-            DirectoryManager.getDirectoryPath(pd) + File.separator;
-    }
-
-    /**
-     * Convert the given Class to an HTML.
-     *
-     * @param configuration the configuration.
-     * @param cd the class to convert.
-     * @param outputdir the name of the directory to output to.
-     */
-    public static void convertClass(ConfigurationImpl configuration, ClassDoc cd,
-            String outputdir) {
-        if (cd == null || outputdir == null) {
-            return;
-        }
-        try {
-            SourcePosition sp = cd.position();
-            if (sp == null)
-                return;
-            Reader r;
-            // temp hack until we can update SourcePosition API.
-            if (sp instanceof com.sun.tools.javadoc.SourcePositionImpl) {
-                FileObject fo = ((com.sun.tools.javadoc.SourcePositionImpl) sp).fileObject();
-                if (fo == null)
-                    return;
-                r = fo.openReader(true);
-            } else {
-                File file = sp.file();
-                if (file == null)
-                    return;
-                r = new FileReader(file);
-            }
-            LineNumberReader reader = new LineNumberReader(r);
-            int lineno = 1;
-            String line;
-            relativePath = DirectoryManager.getRelativePath(DocletConstants.SOURCE_OUTPUT_DIR_NAME) +
-                    DirectoryManager.getRelativePath(cd.containingPackage());
-            Content body = getHeader();
-            Content pre = new HtmlTree(HtmlTag.PRE);
-            try {
-                while ((line = reader.readLine()) != null) {
-                    addLineNo(pre, lineno);
-                    addLine(pre, line, configuration.sourcetab, lineno);
-                    lineno++;
-                }
-            } finally {
-                reader.close();
-            }
-            addBlankLines(pre);
-            Content div = HtmlTree.DIV(HtmlStyle.sourceContainer, pre);
-            body.addContent(div);
-            writeToFile(body, outputdir, cd.name(), configuration);
-        } catch (Exception e){
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     * Write the output to the file.
-     *
-     * @param body the documentation content to be written to the file.
-     * @param outputDir the directory to output to.
-     * @param className the name of the class that I am converting to HTML.
-     * @param configuration the Doclet configuration to pass notices to.
-     */
-    private static void writeToFile(Content body, String outputDir,
-            String className, ConfigurationImpl configuration) throws IOException {
-        Content htmlDocType = DocType.Transitional();
-        Content head = new HtmlTree(HtmlTag.HEAD);
-        head.addContent(HtmlTree.TITLE(new StringContent(
-                configuration.getText("doclet.Window_Source_title"))));
-        head.addContent(getStyleSheetProperties(configuration));
-        Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(),
-                head, body);
-        Content htmlDocument = new HtmlDocument(htmlDocType, htmlTree);
-        File dir = new File(outputDir);
-        dir.mkdirs();
-        File newFile = new File(dir, className + ".html");
-        configuration.message.notice("doclet.Generating_0", newFile.getPath());
-        FileOutputStream fout = new FileOutputStream(newFile);
-        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fout));
-        bw.write(htmlDocument.toString());
-        bw.close();
-        fout.close();
-    }
-
-    /**
-     * Returns a link to the stylesheet file.
-     *
-     * @param configuration the doclet configuration for the current run of javadoc
-     * @return an HtmlTree for the lINK tag which provides the stylesheet location
-     */
-    public static HtmlTree getStyleSheetProperties(ConfigurationImpl configuration) {
-        String filename = configuration.stylesheetfile;
-        if (filename.length() > 0) {
-            File stylefile = new File(filename);
-            String parent = stylefile.getParent();
-            filename = (parent == null)?
-                filename:
-                filename.substring(parent.length() + 1);
-        } else {
-            filename = "stylesheet.css";
-        }
-        filename = relativePath + filename;
-        HtmlTree link = HtmlTree.LINK("stylesheet", "text/css", filename, "Style");
-        return link;
-    }
-
-    /**
-     * Get the header.
-     *
-     * @return the header content for the HTML file
-     */
-    private static Content getHeader() {
-        return new HtmlTree(HtmlTag.BODY);
-    }
-
-    /**
-     * Add the line numbers for the source code.
-     *
-     * @param pre the content tree to which the line number will be added
-     * @param lineno The line number
-     */
-    private static void addLineNo(Content pre, int lineno) {
-        HtmlTree span = new HtmlTree(HtmlTag.SPAN);
-        span.addStyle(HtmlStyle.sourceLineNo);
-        if (lineno < 10) {
-            span.addContent("00" + Integer.toString(lineno));
-        } else if (lineno < 100) {
-            span.addContent("0" + Integer.toString(lineno));
-        } else {
-            span.addContent(Integer.toString(lineno));
-        }
-        pre.addContent(span);
-    }
-
-    /**
-     * Add a line from source to the HTML file that is generated.
-     *
-     * @param pre the content tree to which the line will be added.
-     * @param line the string to format.
-     * @param tabLength the number of spaces for each tab.
-     * @param currentLineNo the current number.
-     */
-    private static void addLine(Content pre, String line, int tabLength,
-            int currentLineNo) {
-        if (line != null) {
-            StringBuffer lineBuffer = new StringBuffer(Util.escapeHtmlChars(line));
-            Util.replaceTabs(tabLength, lineBuffer);
-            pre.addContent(new RawHtml(lineBuffer.toString()));
-            Content anchor = HtmlTree.A_NAME("line." + Integer.toString(currentLineNo));
-            pre.addContent(anchor);
-            pre.addContent(NEW_LINE);
-        }
-    }
-
-    /**
-     * Add trailing blank lines at the end of the page.
-     *
-     * @param pre the content tree to which the blank lines will be added.
-     */
-    private static void addBlankLines(Content pre) {
-        for (int i = 0; i < NUM_BLANK_LINES; i++) {
-            pre.addContent(NEW_LINE);
-        }
-    }
-
-    /**
-     * Given a <code>Doc</code>, return an anchor name for it.
-     *
-     * @param d the <code>Doc</code> to check.
-     * @return the name of the anchor.
-     */
-    public static String getAnchorName(Doc d) {
-        return "line." + d.position().line();
-    }
-}