Bug 26848 - [misc] Add Export As/Print As HTML
Summary: [misc] Add Export As/Print As HTML
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 93065 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-11-21 08:49 EST by Alex Blewitt CLA
Modified: 2019-09-06 15:31 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Blewitt CLA 2002-11-21 08:49:42 EST
For any text file, the colouring and formatting in Eclipse looks great.

It would be really useful if the colouring and formatting could be captured and exported to an HTML file. Obviously this is only going to work for text-based resources (rather than any GUI based ones) but the editor could easily spew out a table with a single cell-per-line, and also put the fontify-colourings in that are used to generate the comments etc. in the editor-of-your-choice.

For example, having a Java file:

import java.util.*;
/**
 * No comment
 */
public class Thing {

could be generated as:

<TABLE>
<TR><TD><SPAN class="keyword">import</SPAN> <SPAN class="class">java.util.*</SPAN>;</TD></TR>
<TR><TD><SPAN class="comment">/**</SPAN></TD></TR>
<TR><TD><SPAN class="comment">&nbsp;*</SPAN></TD></TR>
<TR><TD><SPAN class="comment">&nbsp;*</SPAN></TD></TR>
<TR><TD><SPAN class="keyword">public class</SPAN> <SPAN class="class">Thing,</SPAN></TR></TR>
</TABLE>

where the definitions could be done in an attached/generated/in-line stylesheet.
Of course, it doesn't even have to be that flexible; you could just read off the
colours from the JFace colourings and use that with a <FONT> tag instead.

It would also help in writing nicely coloured tutorials ;-)
Comment 1 Dani Megert CLA 2003-11-21 08:23:02 EST
Sounds like a perfect opportunity for a contribution.
Comment 2 Carolyn MacLeod CLA 2004-10-08 14:44:27 EDT
Here's a workaround (that doesn't currently work because of bug 64498)...
Before code folding was added, it used to be that you could select all, copy, 
and paste into MS Word or something, and the syntax coloring was maintained.
This won't work in eclipse 3.0, but if you are running a much older version of 
eclipse, this will still work. From MS Word, you can save as HTML or whatever 
you like.
Comment 3 Dani Megert CLA 2004-10-11 05:35:59 EDT
It still does work: simply disable folding before copying
Comment 4 Dani Megert CLA 2005-12-16 05:55:24 EST
*** Bug 93065 has been marked as a duplicate of this bug. ***
Comment 5 Eclipse Webmaster CLA 2019-09-06 15:31:28 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.