Summary: | [api] Make HTML2TextReader API | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Alex Fitzpatrick <agfitzp> |
Component: | Text | Assignee: | Platform-Text-Inbox <platform-text-inbox> |
Status: | ASSIGNED --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 | CC: | arvera, caniszczyk, daniel_megert, dmisic, Ed.Merks, nsand.dev, thatnitind |
Version: | 3.4 | Keywords: | api, helpwanted |
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Alex Fitzpatrick
2008-07-23 19:28:55 EDT
How/where do you display HTML? Maybe you could use org.eclipse.jface.text.DefaultInformationControl.DefaultInformationControl(Shell, boolean) which internally uses the reader. We actually want it for its ability to create (at least partially) formatted plaintext from HTML input. I could not see how to do that with DefaultInformationControl. Perhaps there is a way and I just missed it? Also... me simply using the other class does not address the issue of duplicated code. Clearly that class does something useful that people need. >Also... me simply using the other class does not address the issue of
>duplicated code. Clearly that class does something useful that people need.
In my opinion that duplication wasn't needed (will check that).
What exactly are you trying to do?
We're trying to display a plaintext equivilant of an HTML fragment, mostly in diagrams. >We're trying to display a plaintext equivilant of an HTML fragment, mostly in
>diagrams.
OK, so it's not inside a hover? The reason why we don't make this API is because it is only supports a very small subset of HTML (the one for simple rendering of Javadoc). Also, we got away from using this by showing the HTML directly inside the Browser widget. This gives much better HTML rendering. Wouldn't that also work in your case?
We are unable to embed the browser control in a GMF diagram (or so I've been told). Found another copy in the Ruby tooling: http://www.koders.com/?s=HTML2TextReader&la=*&li=* >(or so I've been told). Why? >Found another copy in the Ruby tooling: Well, just because you found a copy doesn't mean it is used right and doesn't mean that they are aware of all its limitations. Could you check if you could use the Browser widget? Because even if we made the current class API it would probably not fit all your needs (i.e. handle all your HTML tags). Also, assuming you can't use the Browser widget: would it work to use the (yet internal) org.eclipse.jface.internal.text.html.HTMLTextPresenter? Ping. I'm a little busy trying to ship a product... I'll try to give you a full response before the end of the week. However, there is no way we'll be embedding one or more browser controls in a diagram. OK, next week would also be good enough. To be disposed or fixed during 3.5. PDE's also interested in this as we use this class: org.eclipse.pde.internal.ui.editor.contentassist.display.HTML2TextReader org.eclipse.pde.internal.ui.editor.contentassist.display.BrowserInformationControl We looked at this and came to the conclusion to not make this API at this point. The reason is that our reader is very limited and explicitly fit to our internal needs i.e. only supports those tags we actually need. We don't want to make that state API and we don't have the resources to work on a full blown HTML2Text reader. If someone wants to contribute a complete HTML2TextReader along with test cases we are open for it. *** Bug 265997 has been marked as a duplicate of this bug. *** >PDE's also interested in this as we use this class: > >org.eclipse.pde.internal.ui.editor.contentassist.display.HTML2TextReader >org.eclipse.pde.internal.ui.editor.contentassist.display.BrowserInformationControl The latter is covered by bug 218482. |