[tasklist] JTidy/html support integrated

Tor Norbye <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.tasklist.devel
Organization Sun Microsystems, Inc
Message-ID <1048897691.5910.54.camel@proto>
FYI - the Jtidy stuff is in CVS now, and in the download
bundle as well.

-----Forwarded Message-----

From: Tor Norbye <[email protected]>
To: [email protected]
Subject: [nbdiscuss] JTidy (was: Gimme an LFI # ...)
Date: 28 Mar 2003 16:25:13 -0800

Re: JTidy integration: the LFI process roundtrip time was 8 weeks.


On Thu, 2003-01-30 at 02:07, Petr Kuzel wrote:
> Tor, once approved, could you place it under libs project, please?.
> XML modules could share it for formatting and pretty printing
> features.

I don't have commit privileges to libs - can you do it? The scrambled
version is available in tasklist/html/external/.

We should consider sharing more than the lib. The tasklist module
already has a class (ReportWriter) which accumulates JTidy errors
into method calls (instead of it getting dumped to stdout/stderr),
and it also has an action (RewriteAction) which lets you reformat
(and clean up) an HTML/JSP/XHTML document.  Note that this does not
just apply to XML files, it applies to HTML files and JSPs as well.
So I think it would be wrong to duplicate/move the code to the XML
modules; instead it makes sense to have a "jtidy" module which 
provides this functionality. Then the tasklist module can have a
simple bridge module which simply hooks the JTidy output into
the suggestions functionality, and if you have some specific
needs for XML that don't apply to HTML or JSPs, those can go in the
XML bridge module.

Does that make sense?

-- Tor


P.S. To try this, get the latest tasklist/html module with the
suggestions functionality (possibly available on the update center
soon, and definitely from the tasklist.netbeans.org downloads section)
and then open an HTML or XML document - then look in the Tools menu
for "JTidy: Clean up & Format...". It uses the diff module as well
to give you a before & after preview of the cleanup operation.
-- 
Tor Norbye <[email protected]>
Sun Microsystems, Inc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.